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
613
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
613
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.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      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