Scrypting question......... - giving units out to the closest player

A forum for discussing map making ideas and problems for the Myth series.
Post Reply
User avatar
ozone
Posts: 744
Joined: Wed Mar 24, 2004 5:05 pm

Post by ozone »

I was wondering if its possible to send player # data to a ctrl.

In this map im making you have to heal POWs to save them. They arent controllable until you heal/save them. What I want to do is give the unit to the closest player or the one who healed the POW not to the captain....

any ideas?
do it.
User avatar
Phex
Posts: 251
Joined: Tue Aug 24, 2004 6:26 pm

Post by Phex »

Hello,

I started answering to your question when I thought this problem is easier. In the middle of my reply I realized it is more complicated that I thought - the reason was that I dont know how to get a Player ID from a given monster (which is maybe also your only problem). Nevertheless will Post my old solution later in this reply... it might be wrong or helpful.

Another (laborious) solution that wont require a Player ID came to me later: giving the Soldier that saves a POW an artifact which allows him to have a Binding Dream attack (like the Deceiver), then make him attack the saved POW and so detaching the POW to the Player that owns the saving Soldier. If you hush it good enough (e.g. by changing the Binding Dream attack sequence to NULL etc.), nobody will notice anything.

Btw, I am sure there is an easier solution.

rgds,
- Phex.


-------------------------------------------------------------------------------------
PS: My old (incomplete) solution:

GEOMETRY FILTER "Get saved POW": Execute it, when someone saves a POW
- Entire Map: true
- Tests for Monsters of Type: the POWS' Monster Tag ID
- Results Action Identifier with an empty Action as element, lets call it "<saved POW>"
- Tested Items Inside Field Name: subj
- Activates on Success: "Get saving Soldier"

GEOMETRY FILTER "Get saving Soldier"
- Monster as its centerpoint: "<saved POW>"
- circle radius as wide as the range of the healing attack (or as wide as the saving distance).
- Subtract Monster Lists: true
- Maximum Number of Items: 1
- Minimum Number of Items: 1 (to prevent that the POW is given to nobody)
- Results Action Identifier with an empty Action as element, lets call it "<saving soldier>"
- Tested Items Inside Field Name: subj
- Activates on Success: (now we would need an action that gets the ID of the Player possessing the Soldier and a UNIT CONTROL that gives the POW to the Player ...)
- Activates on Failure: the Action mentioned here will be executed when the POW is detached to nobody and should detach the POW to the captain for example.
- Link: a subj List with all Soldiers and an obje List with all POWs
Image
User avatar
haravikk
Site Admin
Posts: 987
Joined: Mon Mar 22, 2004 12:56 pm
Location: Scotland

Post by haravikk »

iirc the binding dream (charm) attack gives control of the unit to the team captain, not the player using the binding dream. Let me know if I'm remembering wrong though as it could be useful =)

Also, for your solution it might be easier just to have the artifact given to all soldiers and name it 'knife' or something like that so you can 'cut' the ropes trapping the POW




Edited By haravikk on 1105985635
Being Haravikk gets you girls like these:
Image
Brainbug
Posts: 319
Joined: Fri Mar 19, 2004 6:28 pm
Location: The Mekka Of Techno
Contact:

Post by Brainbug »

u are wrong hara, binding dream gives (as far as i know) control to the player in control of the unit that uses the attack
Post Reply