I want to do ice escape (slide map). Please look what do not right in my triggers:
Event:
TriggerAddEventUnitRegion((UnitLastCreated()), Ice Smooth,true)
Local Variables:
a=(UnitGetFacing((EventUnit())))) <fixed>
x=(UnitGetPosition((UnitLastCreated()))) <point>
Actions:
SetVariable(a, (UnitGetFacing((EventUnit()))))
SetVariable(x, (UnitGetPosition((EventUnit()))))
Repeat Forever()
actions:
Wait(0.001 c_timeGame)
UnitSetPosition((UnitLastCreated()), (PointWithOffsetPolar(x, 0.1, a)), true)
When start the map and unit go on ice,he just walks on ice and there is a lot of mistakes "can not be obtained unit of parameter unitsetposition (value 0,0?)
I want to do ice escape (slide map). Please look what do not right in my triggers:
Event:
TriggerAddEventUnitRegion((UnitLastCreated()), Ice Smooth,true)
Local Variables:
a=(UnitGetFacing((EventUnit())))) <fixed>
x=(UnitGetPosition((UnitLastCreated()))) <point>
Actions:
SetVariable(a, (UnitGetFacing((EventUnit()))))
SetVariable(x, (UnitGetPosition((EventUnit()))))
Repeat Forever()
actions:
Wait(0.001 c_timeGame)
UnitSetPosition((UnitLastCreated()), (PointWithOffsetPolar(x, 0.1, a)), true)
When start the map and unit go on ice,he just walks on ice and there is a lot of mistakes "can not be obtained unit of parameter unitsetposition (value 0,0?)
Please instert your trigger in code tags (click the Markup Type icon, and click ok, then instert your code inside the tags created for you)
Done
@Jendos88: Go Try using these <<>> instead of these [ ].
You can download my "random slide" map from bnet. (or at least from the europe server for sure) It has a nicely working sliding mechanism.
I made a tutorial for this function:
Triggered Unit Movement Tutorial