• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Ice sliding

Status
Not open for further replies.
Level 8
Joined
Jun 16, 2008
Messages
333
I am making an escape and I got the ice in it but I don't know how to make it where you step on the ice you slide. I need to know how to make it turn to but I would also like it where there is one that doesn't make you turn.
 
Level 8
Joined
Jun 16, 2008
Messages
333
Ok so I made this trigger
  • SlideOnIce
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Custom script: local location udg_Slide_loc
      • Set SlideGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in SlideGroup and do (Actions)
        • Loop - Actions
          • Set Slide_loc[1] = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Terrain type at Slide_loc[1]) Equal to Northrend - Ice
            • Then - Actions
              • Set Slide_loc[2] = (Slide_loc[1] offset by 12.00 towards (Facing of (Picked unit)) degrees)
              • Set Slide_loc[3] = Slide_loc[2]
              • Unit - Move (Picked unit) instantly to Slide_loc[3]
            • Else - Actions
              • For each (Integer A) from 1 to 3, do (Custom script: call RemoveLocation(udg_Slide_loc[GetForLoopIndexA())))
      • Custom script: call RemoveLocation(udg_Slide_loc[GetForLoopIndexA)
But I keep getting an error that says that says something wrong with it and it is this part:
  • For each (Integer A) from 1 to 3, do (Custom script: call RemoveLocation(udg_Slide_loc[GetForLoopIndexA())))
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Should be like this:
  • (Custom script: call RemoveLocation(udg_Slide_loc[GetForLoopIndexA()]))
And also don't forget to clear the unit group leak at the end of your trigger, else the game will be sluggish:
  • Custom script: call DestroyGroup(udg_SlideGroup)
Edit: Now I looked closer to your trigger and ask myself why you need the Custom Script at the beginning? =O

Greetings
~ The Bomb King > Dr. Boom
 
Status
Not open for further replies.
Top