I'm trying to make a racing engine with WASD movement. I just started working on some drift functionality, but have not been able to set the racer's rotation while ordering it to move (I order it to move while setting speed in order to achieve fluid movement). Also, there's probably a better way to accomplish this style of movement, so...
Question 1: Is there a way to set rotation independent of a "Movement Order" from the trigger menu? IOW, can I make the racer follow the path of the movement order but not necessarily be facing its destination?
Question 2: Instead of issuing an order to the racer, is there a way to just constantly set the position of the racer that would look smooth? I'm currently just looping infinitely using a timer as a throttle, so this probably wouldn't be difficult switch. I just haven't been able to do it without some "tearing" in the movement. Maybe someone can link me a good tutorial about this kind of movement?
Question 3: Can anyone think of a way to make a racing engine without much use of the trigger editor? As a programmer, the trigger editor makes a lot of sense to me, but I've found the data editor way of doing things rather confusing (behaviors, effects, etc). However, if I avoid triggers, I could significantly reduce input lag because I'd be relying on hotkeys : ) Maybe I just need to get some dang knowledge.
SOLVED. WTG SELF EXPERIEMENTATION! This might be very obvious to do, not sure. However, I was unable to find this anywhere in the forums, so I hope this information proves valuable to someone.
Alright, if you want to set a unit's rotation through the trigger editor while it's moving, you have to unflag the unit's e_unitFlagTurnable property! This can be found like so: Data Editor --> Units Tab --> ##Your Unit## --> Unit Tab (on the right) --> CUnit_FlagArray --> Scroll through the list until you find it. Once this is done, the unit WILL NOT TURN unless you tell it specifically to do so, and to my knowledge, this has to be done with an Action in the Triggers Editor. However, this allows you to do something like the following (and more):
1 Order Unit to Move to Somewhere
2 Make Unit face Somewhere Different over ZERO SECONDS
Instead of turning AFTER it moves, the unit will turn while moving. For some reason, if I set the duration to anything besides 0, the unit won't move. I've tried small and large values. It might have to do with how often I'm calling these two actions- I may be calling them while they're already being executed, and that may throw it off somehow. Perhaps there is another flag that needs to be altered : P
If you have any knowledge relevant to this method of movement/rotation, please share!
Hey there,
I'm trying to make a racing engine with WASD movement. I just started working on some drift functionality, but have not been able to set the racer's rotation while ordering it to move (I order it to move while setting speed in order to achieve fluid movement). Also, there's probably a better way to accomplish this style of movement, so...
Question 1: Is there a way to set rotation independent of a "Movement Order" from the trigger menu? IOW, can I make the racer follow the path of the movement order but not necessarily be facing its destination?
Question 2: Instead of issuing an order to the racer, is there a way to just constantly set the position of the racer that would look smooth? I'm currently just looping infinitely using a timer as a throttle, so this probably wouldn't be difficult switch. I just haven't been able to do it without some "tearing" in the movement. Maybe someone can link me a good tutorial about this kind of movement?
Question 3: Can anyone think of a way to make a racing engine without much use of the trigger editor? As a programmer, the trigger editor makes a lot of sense to me, but I've found the data editor way of doing things rather confusing (behaviors, effects, etc). However, if I avoid triggers, I could significantly reduce input lag because I'd be relying on hotkeys : ) Maybe I just need to get some dang knowledge.
Tips and suggestions are appreciated. Thanks!
SOLVED. WTG SELF EXPERIEMENTATION! This might be very obvious to do, not sure. However, I was unable to find this anywhere in the forums, so I hope this information proves valuable to someone.
Alright, if you want to set a unit's rotation through the trigger editor while it's moving, you have to unflag the unit's e_unitFlagTurnable property! This can be found like so: Data Editor --> Units Tab --> ##Your Unit## --> Unit Tab (on the right) --> CUnit_FlagArray --> Scroll through the list until you find it. Once this is done, the unit WILL NOT TURN unless you tell it specifically to do so, and to my knowledge, this has to be done with an Action in the Triggers Editor. However, this allows you to do something like the following (and more):
1 Order Unit to Move to Somewhere
2 Make Unit face Somewhere Different over ZERO SECONDS
Instead of turning AFTER it moves, the unit will turn while moving. For some reason, if I set the duration to anything besides 0, the unit won't move. I've tried small and large values. It might have to do with how often I'm calling these two actions- I may be calling them while they're already being executed, and that may throw it off somehow. Perhaps there is another flag that needs to be altered : P
If you have any knowledge relevant to this method of movement/rotation, please share!