• 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.

[Trigger] Ice Sliding Help

Status
Not open for further replies.
Level 9
Joined
Dec 4, 2007
Messages
562
Hello everybody, sometimes when a unit is on my ice, it just doesnt react (doesnt change facing angle even tho I tell him to).

The ice work perfect except for this (that he doesnt always change facing angle)

Dunno if it is something with trigger or something else, but I realy need help. :)
  • Normal Ice
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Set Player1_Position = (Position of Player1_Unit)
      • Set World = (Playable map area)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain type at Player1_Position) Equal to Icecrown Glacier - Ice
        • Then - Actions
          • Unit - Move Player1_Unit instantly to (Player1_Position offset by 5.00 towards (Facing of Player1_Unit) degrees)
        • Else - Actions
          • Do nothing
      • Custom script: call RemoveLocation (udg_Player1_Position)
PS: Do somebody know how to make it like 1 trigger for every players so that I dont have to make 11 triggers just for that :)

{EDIT}
Hey everybody, I am creating an Ice sliding map. I made the ice sliding trigger and such, but sometimes my unit justs freezes.
Can this be because I click on the same place to much?
And do anybody know how to change the turn speed because atm it will be like impossible to turn for him.
 
Last edited by a moderator:
  • Angry
Reactions: Rui
Level 6
Joined
Oct 4, 2008
Messages
263
  • Normal Ice
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For every integer a between 1 and 12, do actions
      • Set Player_Position[a] = (Position of Player_Unit[a])
      • Set World = (Playable map area)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain type at Player_Position[a]) Equal to Icecrown Glacier - Ice
        • Then - Actions
          • Unit - Move Player_Unit[a] instantly to (Player_Position[a] offset by 5.00 towards (Facing of Player_Unit[a]) degrees)
        • Else - Actions
          • Do nothing
      • Custom script: call RemoveLocation (udg_Player_Position[a])
arrays, tah daaaah!
 
Level 6
Joined
Oct 4, 2008
Messages
263
arrays are like variables that can store more like one value. basically, instead of setting player1_unit to player 1's unit, player2_unit to player 2's unit etc, you set player_unit[1] to player 1's unit, and so on.
 
Level 9
Joined
Dec 4, 2007
Messages
562
I have done it a long time ago Zack1996 :), and didnt understand very much of it. But anyways I know how a array works.....But I will still need to use like


  • Action
    • Set Player_Position[1] = (Position of Player_Unit[1])
  • Set Player_Position[2] = (Position of Player_Unit[2])
  • Set Player_Position[3] = (Position of Player_Unit[3])
and so on, right?
 
Level 8
Joined
Aug 4, 2008
Messages
279
This should help you:
  • Master Turn Point
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Prisoner
      • (Terrain type at (Position of (Triggering unit))) Equal to Icecrown Glacier - Ice
    • Actions
      • Unit - Order (Triggering unit) to Stop
      • Unit - Move (Triggering unit) instantly to (Position of (Triggering unit)), facing (Target point of issued order)
And this to, just for anti bugs:
  • Master Turn Unit
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Prisoner
      • (Terrain type at (Position of (Triggering unit))) Equal to Icecrown Glacier - Ice
    • Actions
      • Unit - Order (Triggering unit) to Stop
      • Unit - Move (Triggering unit) instantly to (Position of (Triggering unit)), facing (Position of (Target unit of issued order))
The unit type condition, just change it to yours unit type to slide.
 
I have done it a long time ago Zack1996 :), and didnt understand very much of it. But anyways I know how a array works.....But I will still need to use like


  • Action
    • Set Player_Position[1] = (Position of Player_Unit[1])
  • Set Player_Position[2] = (Position of Player_Unit[2])
  • Set Player_Position[3] = (Position of Player_Unit[3])
and so on, right?

No, you will just use this:
  • Trigger
  • Actions
    • For each (IntegerA) from 1 to 12, do (Actions)
      • Loop - Actions
        • Set Player_Position[IntegerA] = (Position of (Player_Unit[IntegerA]))
        • Custom script: call RemoveLocation (udg_Player_Position[bj_forLoopAIndex])
 
Level 9
Joined
Dec 4, 2007
Messages
562
  • Animation - Change YOUR_UNIT turn speed to 1.00

I know, but does that make him turn faster? I dont seem to understand, because it still looks like he is turning at the same speed to me.

And Chilla, the trigger part of this sliding is here.

http://www.hiveworkshop.com/forums/triggers-and-scripts-269/ice-sliding-help-133196/

xD

I just needed to know why he sometimes just is unable to change direction when he is on the ice.
And how to make the unit be able to turn faster.

{EDIT}
No, you will just use this:
  • Trigger
  • Actions
    • For each (IntegerA) from 1 to 12, do (Actions)
      • Loop - Actions
        • Set Player_Position[IntegerA] = (Position of (Player_Unit[IntegerA]))
        • Custom script: call RemoveLocation (udg_Player_Position[bj_forLoopAIndex])

Okay, I dont know anything about those array things :cry:

*burst out in tears*

And dimitri231, I'll try that. Thanks.:sad:
 
Last edited by a moderator:
Level 6
Joined
Oct 4, 2008
Messages
263
the beauty of arrays is, instead of the index(number between square brackets), you can put a variable. like the integer A from the "for every integer A from 1 to 12, do X" action. that means it will do it once with 1 as A, once with 2 as a, and so on.
 
Level 9
Joined
Dec 4, 2007
Messages
562
Thanks.


This should help you:
  • Master Turn Point
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Prisoner
      • (Terrain type at (Position of (Triggering unit))) Equal to Icecrown Glacier - Ice
    • Actions
      • Unit - Order (Triggering unit) to Stop
      • Unit - Move (Triggering unit) instantly to (Position of (Triggering unit)), facing (Target point of issued order)
And this to, just for anti bugs:
  • Master Turn Unit
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Prisoner
      • (Terrain type at (Position of (Triggering unit))) Equal to Icecrown Glacier - Ice
    • Actions
      • Unit - Order (Triggering unit) to Stop
      • Unit - Move (Triggering unit) instantly to (Position of (Triggering unit)), facing (Position of (Target unit of issued order))
The unit type condition, just change it to yours unit type to slide.

Doesnt that just make him teleport forward 1 time?


Why doesnt this work? It says that the custom script (at bottom) isnt correct. Help plz

  • Normal Ice
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Set Player_Position[(Integer A)] = (Position of Player_Unit[(Integer A)])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain type at Player_Position[(Integer A)]) Equal to Icecrown Glacier - Ice
        • Then - Actions
          • Unit - Move Player_Unit[(Integer A)] instantly to (Player_Position[(Integer A)] offset by 10.00 towards (Facing of Player_Unit[(Integer A)]) degrees)
        • Else - Actions
          • Do nothing
      • Custom script: call RemoveLocation (udg_Player_Position[(Integer A)])
xD
 
Last edited:
Level 4
Joined
Jun 7, 2008
Messages
37
Thanks.




Doesnt that just make him teleport forward 1 time?


Why doesnt this work? It says that the custom script (at bottom) isnt correct. Help plz

  • Normal Ice
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Set Player_Position[(Integer A)] = (Position of Player_Unit[(Integer A)])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain type at Player_Position[(Integer A)]) Equal to Icecrown Glacier - Ice
        • Then - Actions
          • Unit - Move Player_Unit[(Integer A)] instantly to (Player_Position[(Integer A)] offset by 10.00 towards (Facing of Player_Unit[(Integer A)]) degrees)
        • Else - Actions
          • Do nothing
      • Custom script: call RemoveLocation(udg_Player_Position[(Integer A)])
xD

No space between removelocation and the parenthesis.
 
Status
Not open for further replies.
Top