Move and turn are both "move orders" so if you check for "any unit is issued an order to move" it will trigger when the unit turns, too.
To check if a unit is moving from point a to point b is easy. just get the position and about 0.1s later the position again. compare them and you know if the unit is walking or turning. so you could try to make that a function like about:
And yeah I considered the problem to be them sharing the move order, and tried to check if it was editable in the data, but I wasn't sure where to look anyway :<
Oh btw, what I'm trying to make is automatic pathing based on terrain height so that you can move down steep terrain but not up.
Edit: Actually, how about making a turn order separate from the move order? I dug around some just now and found out how to make it show up in the event list, but I haven't yet made it work as far as giving the unit orders.
Edit 2: I just got another idea, since I use a wasd movement system. I need to make it store the direction in which the move order was made, then check if that direction contains a major height change. At least that's the theory of my new theory (Still gonna need turn to be separate though I believe)
Hey again, I ended up solving it by using a way simpler method than I orignally thought of; I just made it do the check before the movement order was issued instead of after... :x
Thanks anyway for the suggestion earlier miheinen! Although I didn't end up using it.
Now I just got to solve wallwalking! (still lets you scale very steep hills by walking sideways, as it used to do in early-days WoW) and camera clipping the ground. But I think I got an idea of how to fix those things too now ^^
Edit: Oh and if anyone happens to have read this far; is there any way to use the scroll wheel to make a camera change distance to target with triggers or could it perhaps be done in data?
(I've disabled the original scroll in data atm since it messes up my third person camera).
Edit 2: Gah! I always manage to solve it just after I ask :p anyway that zoom thing could be done in the data editor ^^
I had too much fun digging around the ground-height based pathing system and I've now ended up with a system that instead checks 16 points around the target.
The opposites are compared with a check that decides if they are within range of a negative and positive value, if the difference between them is outside that value the character will fall towards the lower, or well, so far he just walks with you unable to control it)
Another question, as I don't want to spam new threads ^^
I recall the wc3 editor to have special effects, but I can't find something like that in the sc2 editor, I probably don't just know where to look - and so now I wonder, how would you guys go about to make a temporary smoke effect spawn at the units feet while sliding down a cliff?
I think the best way would be with the Data editor, but I can't help you with that. With triggers you could create an actor model at the units point and move the created actor while he slides down. when finished you destroy the created model.
How do I specificly check that the order the unit is issued is the move order in the conditions of a trigger?
I need the actions to ignore the turn order while the move order is allowed.
As for events I have "any unit is issued an order to move" but it doesn't seem to recognize only move, but also turn.
Thanks in advance!
that's kinda hard.. because if I'm right the turn is a move order.. and you can't really make a difference between 2 the same orders.
Move and turn are both "move orders" so if you check for "any unit is issued an order to move" it will trigger when the unit turns, too.
To check if a unit is moving from point a to point b is easy. just get the position and about 0.1s later the position again. compare them and you know if the unit is walking or turning. so you could try to make that a function like about:
Then you could do something like this
Maybe this helps you
I'll try that, thanks.
And yeah I considered the problem to be them sharing the move order, and tried to check if it was editable in the data, but I wasn't sure where to look anyway :<
Oh btw, what I'm trying to make is automatic pathing based on terrain height so that you can move down steep terrain but not up.
Edit: Actually, how about making a turn order separate from the move order? I dug around some just now and found out how to make it show up in the event list, but I haven't yet made it work as far as giving the unit orders.
Edit 2: I just got another idea, since I use a wasd movement system. I need to make it store the direction in which the move order was made, then check if that direction contains a major height change. At least that's the theory of my new theory (Still gonna need turn to be separate though I believe)
Ok. Let me know if this worked for you :)
Hey again, I ended up solving it by using a way simpler method than I orignally thought of; I just made it do the check before the movement order was issued instead of after... :x
Thanks anyway for the suggestion earlier miheinen! Although I didn't end up using it.
Now I just got to solve wallwalking! (still lets you scale very steep hills by walking sideways, as it used to do in early-days WoW) and camera clipping the ground. But I think I got an idea of how to fix those things too now ^^
Edit: Oh and if anyone happens to have read this far; is there any way to use the scroll wheel to make a camera change distance to target with triggers or could it perhaps be done in data? (I've disabled the original scroll in data atm since it messes up my third person camera).
Edit 2: Gah! I always manage to solve it just after I ask :p anyway that zoom thing could be done in the data editor ^^
I had too much fun digging around the ground-height based pathing system and I've now ended up with a system that instead checks 16 points around the target. The opposites are compared with a check that decides if they are within range of a negative and positive value, if the difference between them is outside that value the character will fall towards the lower, or well, so far he just walks with you unable to control it)
Another question, as I don't want to spam new threads ^^
I recall the wc3 editor to have special effects, but I can't find something like that in the sc2 editor, I probably don't just know where to look - and so now I wonder, how would you guys go about to make a temporary smoke effect spawn at the units feet while sliding down a cliff?
I think the best way would be with the Data editor, but I can't help you with that. With triggers you could create an actor model at the units point and move the created actor while he slides down. when finished you destroy the created model.
Oh, that actor model thing sounds like what I was looking for, I'll check it out in a bit - thanks! :>