Scripting - making units uncontrollable

A forum for discussing map making ideas and problems for the Myth series.
Post Reply
User avatar
Phex
Posts: 251
Joined: Tue Aug 24, 2004 6:26 pm

Post by Phex »

Hello,

I have some trouble with scripting. My basic aim is to make a unit that is followed by another unit uncontrollable and reverse the process later.

First I apply these three flags to the desired unit:
- Cannot be Autotargeted: true
- Does not Autotarget: true
- Held: true
Then I stop the unit with the General Action Command Type 0.
Later - to reverse the process - I apply all the above flags with the value 'false'.

Now something strange happens: Whenever the unit gets controllable again and I let it move somewhere, it stops after moving a tiny step but the walk animation keeps going on (this looks like the classical 'moonwalk' :cool:).
The Unit has also limited abilities to attack, because no projectile is generated - only the attack animation is drawn.

Anybody has an idea what happened?
Thank you for your help,
Phex.
Image
User avatar
iron
Site Admin
Posts: 2006
Joined: Thu Feb 26, 2004 1:21 am
Location: diving out of the Sun at 10 o'clock high!
Contact:

Post by iron »

Don't use Held - that will freeze the unit in place and cause the oddities you're seeing. To make the unit uncontrollable, set Ignores User Control to True, and Receives User Control to False. Reverse those flags to make it controllable again.
...playing as long5hot on War Thunder
User avatar
Phex
Posts: 251
Joined: Tue Aug 24, 2004 6:26 pm

Post by Phex »

Hey iron,

the held flag wasn't actually the cause for the strange unit behaviour. On the other hand I dont know what I did wrong. In the end my solution was simple: I just copied a similar script from another map and altered it...

Phex.
Image
Graydon
Posts: 1605
Joined: Sun Mar 21, 2004 5:10 pm

Post by Graydon »

What I want to figure it out is how bungie does the following: Make units go blue, Move them to a location, trigger X. Now.. I make em go blue.. stop em.. move em. They dont move. WTF. I know my scripts... this works sometimes, and other tiems it doesnt.. Bungie's script always works.. some of mine works.. some of it doesnt.. it's all the same script design though. Is there some trick to making the MOVE action work to stopped blue units? The problem seems to occur in the following fassion: I have a TUNI with a closed geometry testing for ___ as subj. ACOS--->Stop them and make them blue (2 actions.. the GENE and the CTRL). When the CTRL activates--->Move. They never move... If I've clicked somewhere inside the geometry.. they move to that location.. then sit there blue.. I cant do anything with em. Khel looked at it and didnt know how to fix it.. he said he had a similar problem and just adjusted a flag (did the same to mine with no effect..) Any ideas guys? Iron... got a fix for this one? :)
Image
Post Reply