Triggered Movements

skyblader

You're living only because it's illegal killing.
Reaction score
159
I was just wondering if there is an efficient way to disable movement by clicking altogether, and only allow triggered movements? It's okay if the move icons and all are removed, but I want the unit to be able to move through triggers. Also, I can't use a unit owned by another player with changed colour because I need the abilities to be seen. Abilities and items.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
Doesn't adding the Ward classification do all that? Plus a 0 default movement speed, which you change when moving through triggers.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
I was thinking ward classification.. but it doesn't stop movement. Changing the speed won't work, because they might control their unit while the trigger is moving them.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
I realised there's been a lot of talk about this kind of topic lately. Use a trigger that repeats the previous order when that unit is given another order.
To make a unit uncontrollable, you'll need to do a bit of things.

You need to give the unit the "ward" classification. This basically removes all command icons (such as Move, Patrol, etc) from the unit. However, this still allows the player to give the unit a "smart" order. Thus, you need a trigger to combat this.

Trigger:
  • Remove Control
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
          • (Owner of (Triggering unit)) Equal to Player 7 (Green)
    • Actions
      • Trigger - Turn off (this trigger)
      • Set TempPoint = SomePoint <-- This is set to the location where you want the creeps to attack-move to
      • Unit - Order (Triggering unit) to Attack-Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Trigger - Turn on (this trigger)


This will cause the units to continually attack-move towards the specified location. The only problem with this method it's not actually making units uncontrollable. It simply causes the units to be given an attack-move order when receiving any other order.

You can use something like this.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
As I said... The trigger is constantly moving the unit, if I have to turn this trigger off, while my other trigger moves the unit, means the player can move the unit, while my other trigger is moving the unit.
 

chobibo

Level 1 Crypt Lord
Reaction score
48
Dude, that's confusing, you want to trigger the movement of a unit, and if you need to disable it, another trigger moves the unit and the player can move it while another trigger moves it? Could you rephrase that?

Just remove the 'Amov' ability and use triggers, use the setunitposition function, and also you can't add the 'Amov' ability once you remove it.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
All I'm trying to say is that, the unit should not be moved by the player, at all. But the triggers will move it. I'm just explaining why I can't use the solution he gave.

Is it okay if I don't, slide the units around?
 

chobibo

Level 1 Crypt Lord
Reaction score
48
I'll tell you again, you need to remove the ability 'Amov' to make a unit stop from moving, the patrol and move command cards will be removed and the unit won't be able to move when you order it to go somewhere.

Try the map I attached.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
I understand... To disallow the player from controlling the unit, I'll have to remove the Amov ability. But, will it require me to slide the units around? That's a yes right? Anyway could you show me how to do that in GUI, or at least tell me what's it doing :)
 

chobibo

Level 1 Crypt Lord
Reaction score
48
That's a yes right?
Yes, that's the disadvantage, you can't re-add the ability once you remove it so you'll have to slide it.

Do you mean this? or the slide?
Trigger:
  • RemoveMove
    • Events
    • Conditions
    • Actions
      • Custom script: call UnitRemoveAbility(unit,'Amov')

If you need a slide system you could get 1 here, It's for GUI so I think you won't have any problem for it, sorry I couldn't help much with GUI, I get dizzy using (coz I dunno how to use it) that lol.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Hmm okay. Actually I know how to slide them around... Just wondering how you do it nicely with the acceleration, decceleration the facing angle and such. But I'll try it on my own, thanks anyway :)
 

chobibo

Level 1 Crypt Lord
Reaction score
48
Oh!

For acceleration, you need a variable to hold the offset distance (the one you put on the Distance between points in GUI), if the user presses up increment the variable, let's say for example 0.25 per iteration/ 0.025 of a second. Then decide a limiting value for the offset, I picked 12.

Trigger:
  • Accelerate
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
      • UP_PRESSED Equal to True
    • Actions
      • If (offset Greater than or equal to 12.00) then do (Set offset = 12.00) else do (Set offset = (offset + 0.25))


Lemme just make a more elaborate explanation using another map, please wait for it, maybe give me until tomorrow, okay? LOL I haven't slept yet haha.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Uh okay. Thanks a lot for the help. This is something new for me :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top