OK so i have a trigger written for a slide.
Not sure why i made the variables arrays but it shouldn't matter
Basically, if i set the time so that the slide is smooth and looks good, i cannot turn my unit. If i make the time interval slower, i'm able to turn my unit decently while sliding, but it choppy and he like blinks along.
What is the best code for a smooth slide trigger that gives you the ability to change the direction of your units?
Code:
White Marble
Events-every 0.04 Seconds
Conditions
Actions- Set temp_group(0)= (units of type (unit type))
Unit Group - Pick every unit in temp_group(0) and do (actions)
Loop-Actions
Set temp_point(0) = (position of (picked unit))
If (all conditions are true) then do (then actions) else do (else actions)
If Conditions
Terrain type at temp_point(0) Equal to Cityscape-white marble
((Picked unit) is alive) equal to true
Then actions
Unit-move (picked unit) instantly to (temp_point(0) offset by 11.00 towards (facing of(picked unit)) degrees)
Custom Script: call DestroyGroup(udg_temp_group(0))
Custom Script: call RemoveLocation(udg_temp_point(0))
Else actions-
Do nothing
Not sure why i made the variables arrays but it shouldn't matter
Basically, if i set the time so that the slide is smooth and looks good, i cannot turn my unit. If i make the time interval slower, i'm able to turn my unit decently while sliding, but it choppy and he like blinks along.
What is the best code for a smooth slide trigger that gives you the ability to change the direction of your units?