Komaqtion
You can change this now in User CP.
- Reaction score
- 469
Ok, so I was planning of redoing (A little at least ) my Slide on Ice tutorial here on the forum, and one major flaw was that you could order the unit to move, ad it would slide faster... To fix this I thought I'd try to remove the ability to order units to move while sliding. This seemed quite easy at first, but I then noticed that there isn't really an easy way of doing this while still keeping the ability to order him to face angles...
This is what I have atm:
But this doesn't work properly, since the unit doesn't turn right away... It takes some time for it to turn, meaning that if I order him to move to a point 180 degrees from him (Behind him I mean ) then he'll slide in a crescent (Half-moon) but he'll end up now sliding the the right angle (Facing before turn +- 180) but he'll be offset the real path by the diameter of the half-moon... XD
Hopefully someone'll understand this mixed up explanation
Thanks
This is what I have atm:
Trigger:
- Slide on Ice
- Events
- Time - Every 0.02 seconds of game time
- Conditions
- Actions
- Set Temp_Group = (Units in (Playable map area) matching ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is alive) Equal to True)))
- Unit Group - Pick every unit in Temp_Group and do (Actions)
- Loop - Actions
- Set TempPoint = (Position of (Picked unit))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- (Terrain type at TempPoint) Equal to Icecrown Glacier - Ice
- (Terrain type at TempPoint) Equal to Icecrown Glacier - Dark Ice
- Conditions
- Or - Any (Conditions) are true
- Then - Actions
- Set TempPoint2 = (TempPoint offset by 7.00 towards (Facing of (Picked unit)) degrees)
- Custom script: call SetUnitX(GetEnumUnit(),GetLocationX(udg_TempPoint2))
- Custom script: call SetUnitY(GetEnumUnit(),GetLocationY(udg_TempPoint2))
- Custom script: call RemoveLocation(udg_TempPoint2)
- Else - Actions
- If - Conditions
- Custom script: call RemoveLocation(udg_TempPoint)
- Loop - Actions
- Custom script: call DestroyGroup(udg_Temp_Group)
- Events
Trigger:
- Slide on Ice Object Order Check
- Events
- Unit - A unit Is issued an order targeting an object
- Conditions
- Actions
- Trigger - Turn off (This trigger)
- Set TempPoint = (Position of (Triggering unit))
- Set TempPoint2 = (Position of (Target unit of issued order))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- (Terrain type at TempPoint) Equal to Icecrown Glacier - Ice
- (Terrain type at TempPoint) Equal to Icecrown Glacier - Dark Ice
- Conditions
- Or - Any (Conditions) are true
- Then - Actions
- Unit - Pause (Triggering unit)
- Unit - Order (Triggering unit) to Stop
- Unit - Unpause (Triggering unit)
- Custom script: call SetUnitFacing(GetTriggerUnit(), AngleBetweenPoints(udg_TempPoint, udg_TempPoint2) )
- Else - Actions
- If - Conditions
- Custom script: call RemoveLocation(udg_TempPoint)
- Custom script: call RemoveLocation(udg_TempPoint2)
- Trigger - Turn on (This trigger)
- Events
Trigger:
- Slide on Ice Point Order Check
- Events
- Unit - A unit Is issued an order targeting a point
- Conditions
- Actions
- Trigger - Turn off (This trigger)
- Set TempPoint = (Position of (Triggering unit))
- Set TempPoint2 = (Target point of issued order)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- (Terrain type at TempPoint) Equal to Icecrown Glacier - Ice
- (Terrain type at TempPoint) Equal to Icecrown Glacier - Dark Ice
- Conditions
- Or - Any (Conditions) are true
- Then - Actions
- Unit - Pause (Triggering unit)
- Unit - Order (Triggering unit) to Stop
- Unit - Unpause (Triggering unit)
- Custom script: call SetUnitFacing(GetTriggerUnit(), AngleBetweenPoints(udg_TempPoint, udg_TempPoint2) )
- Else - Actions
- If - Conditions
- Custom script: call RemoveLocation(udg_TempPoint)
- Custom script: call RemoveLocation(udg_TempPoint2)
- Trigger - Turn on (This trigger)
- Events
But this doesn't work properly, since the unit doesn't turn right away... It takes some time for it to turn, meaning that if I order him to move to a point 180 degrees from him (Behind him I mean ) then he'll slide in a crescent (Half-moon) but he'll end up now sliding the the right angle (Facing before turn +- 180) but he'll be offset the real path by the diameter of the half-moon... XD
Hopefully someone'll understand this mixed up explanation
Thanks