Slide Region Ice help!

electricrain

New Member
Reaction score
0
Can someone write me a step by step understandable way to make me slide in an ice region on world editor? PLZZ!! i really need help for somereason this is the only thing that people dont have step by step i! :(! :mad: plz post step by step
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Ok, to start with, here's the trigger:
Trigger:
  • Slide on Ice
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area) matching ((Terrain type at (Position of (Matching unit))) Equal to Icecrown Glacier - Ice))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of (Picked unit))
          • Set TempPoint2 = (TempPoint offset by 5.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)
          • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_Temp_Group)


For this you'll need a couple of variables:
Temp_Group - Unit-Group variable
TempPoint - Point variable
TempPoint2 - Point variable

So this trigger will make the units that are currently on ice, move slightly towards their facing, ever 0.01 seconds...

To change the speed of the slide, jusr change the value "5" in the TempPoint2 variable setting :D
 

electricrain

New Member
Reaction score
0
step by step >_< im an ignorant little thing

ive worked with triggers but
idk how to get it to all that
can u just tell me step by step
...er like
"click new action then blah then blackt hen ok then blah!"plZP:D
 

electricrain

New Member
Reaction score
0
Ok, to start with, here's the trigger:
Trigger:
  • Slide on Ice
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area) matching ((Terrain type at (Position of (Matching unit))) Equal to Icecrown Glacier - Ice))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of (Picked unit))
          • Set TempPoint2 = (TempPoint offset by 5.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)
          • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_Temp_Group)


For this you'll need a couple of variables:
Temp_Group - Unit-Group variable
TempPoint - Point variable
TempPoint2 - Point variable

So this trigger will make the units that are currently on ice, move slightly towards their facing, ever 0.01 seconds...

To change the speed of the slide, jusr change the value "5" in the TempPoint2 variable setting :D





step by step >_< im an ignorant little thing

ive worked with triggers but
idk how to get it to all that
can u just tell me step by step
...er like
"click new action then blah then blackt hen ok then blah!"plZP
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Ok, well first open op you Trigger Editor :D

Then we're gonna make the variables as a first step...
So press Ctrl + B and a small window will pop up.
Now press Ctrl + N and another smaller window will pop up.
Now we're creating a variable, so first type in the name of it... It's easier if you write exactly what I wrote, Temp_Group.
Then, in the drop down below the name, select Unit-Group and click ok, and you've created a Unit-Group variable ;)

Now press Ctrl + N again and instead type TempPoint and in the drop down select Point.
Then do the same again, but type TempPoint2 instead as the name, and select Point again :D

So now we're done with the variables, and gonna start with the trigger.
So first create a new trigger (Ctrl + T), and name it something... Mine is named "Slide on Ice" ;)

Then Ctrl + E to create an event for this, and select the event, Time - Periodic Event.
Then change the blue word to 0.01 and click ok.

It should look like this now:
Trigger:
  • Slide on Ice
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions


Now we've gotten to the actions :D

So press Ctrl + R to create a new action, and in the drop down select "Set Variable".
Here change the red word "Variable" to your newly created Unit-Group variable, Temp_Group.
Then change the (now) red word "Value" to "Units In Region Matching Condition".

Now click the red "Condition", and the there should be a drop down saying Boolean Comparison...
Change that to Terrain-Type Comparison.
Now it should say something like this (in blue):

(Terrain-type at (Center of (Playable map area))) Equal to Lordaeron Summer - Dirt

Here you should change (Center of (Playable map area)) to (Position of (Matching unit)) and Lordaeron Summer Dirt to Icecrown Glacier - Ice.

So first click the first blue words, and click the drop down menu, and select "Position of Unit".
to change the first one, click the red blue "Triggering unit" and change to "Matching unit".
Then click "Ok" till you come to the Trigger Editor again, and it should look something like this:

Trigger:
  • Set Temp_Group = (Units in (Playable map area) matching ((Terrain type at (Position of (Matching unit))) Equal to Icecrown Glacier - Ice))


Now we're going to make a Unit-Group loop from this unit group which was just set.
So create a new action, and select:

Unit Group - Pick Every Unit In Unit Group And Do Multiple Actions

Now change the blue part here, to your newly created Unit Group variable, Temp_Group.
Click "Ok", and now Right-Click this:
Code:
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
    [COLOR="Red"]Loop - Actions[/COLOR]

And select "New Action" and select "Set Variable"... Now we're going to set the "TempPoint" variable. So select that one where it says "Variable" (in red).

Now click the drop down menu, and select "Position of Unit", and change the blue "Triggering unit" to "Picked unit".
Click "Ok", and create another one of the "Set Variable" action, which has to be beneath the one we just made.
Here, you're going to set TempPoint2 to the action, "Point With Polar Offset".

Now change (Center of (Playable map area)) to TempPoint, and change 256.00 to 5.
Now click the 0.00, and beside where it says "Function", click the drop down menu.
Go down to Unit - Facing Angle, and change this to Facing of (Picked unit)
Click ok till you come back to the Trigger Editor.

Now it should look like this:
Trigger:
  • Slide on Ice
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area) matching ((Terrain type at (Position of (Matching unit))) Equal to Icecrown Glacier - Ice))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of (Picked unit))
          • Set TempPoint2 = (TempPoint offset by 5.00 towards (Facing of (Picked unit)) degrees)



Hope it does for you :D

Now it's only 5 actions left, and all of them are called "Custom Script", and here you just write with your keyboard, so as long as you copy what I've written, you shouöd be fine:D

So create a new action, and in the drop down, select Custom Script.
Now click the red ""Script Code" and copy this:

call SetUnitX(GetEnumUnit(),GetLocationX(udg_TempPoint2))

then create another one of this action, and copy this:

call SetUnitY(GetEnumUnit(),GetLocationY(udg_TempPoint2))

And another one with this:

call RemoveLocation(udg_TempPoint2)

And then this:

call RemoveLocation(udg_TempPoint)

Now you're going to Right-Click this:


Code:
[COLOR="Red"]Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)[/COLOR]
    Loop - Actions

And create another "Custom Script" action, and copy this:

call DestroyGroup(udg_Temp_Group)

And now it should look like this:

Trigger:
  • Slide on Ice
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area) matching ((Terrain type at (Position of (Matching unit))) Equal to Icecrown Glacier - Ice))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of (Picked unit))
          • Set TempPoint2 = (TempPoint offset by 5.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)
          • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_Temp_Group)


And you're done :D

Now you just need to put the terrain, Icecrown Glacier - Ice somewhere on the map, and the units should slide ;)

Hope you get it working, and good luck with the map :D
 

electricrain

New Member
Reaction score
0
Ok, well first open op you Trigger Editor :D

Then we're gonna make the variables as a first step...
So press Ctrl + B and a small window will pop up.
Now press Ctrl + N and another smaller window will pop up.
Now we're creating a variable, so first type in the name of it... It's easier if you write exactly what I wrote, Temp_Group.
Then, in the drop down below the name, select Unit-Group and click ok, and you've created a Unit-Group variable ;)

Now press Ctrl + N again and instead type TempPoint and in the drop down select Point.
Then do the same again, but type TempPoint2 instead as the name, and select Point again :D

So now we're done with the variables, and gonna start with the trigger.
So first create a new trigger (Ctrl + T), and name it something... Mine is named "Slide on Ice" ;)

Then Ctrl + E to create an event for this, and select the event, Time - Periodic Event.
Then change the blue word to 0.01 and click ok.

It should look like this now:
Trigger:
  • Slide on Ice
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions


Now we've gotten to the actions :D

So press Ctrl + R to create a new action, and in the drop down select "Set Variable".
Here change the red word "Variable" to your newly created Unit-Group variable, Temp_Group.
Then change the (now) red word "Value" to "Units In Region Matching Condition".

Now click the red "Condition", and the there should be a drop down saying Boolean Comparison...
Change that to Terrain-Type Comparison.
Now it should say something like this (in blue):

(Terrain-type at (Center of (Playable map area))) Equal to Lordaeron Summer - Dirt

Here you should change (Center of (Playable map area)) to (Position of (Matching unit)) and Lordaeron Summer Dirt to Icecrown Glacier - Ice.

So first click the first blue words, and click the drop down menu, and select "Position of Unit".
to change the first one, click the red blue "Triggering unit" and change to "Matching unit".
Then click "Ok" till you come to the Trigger Editor again, and it should look something like this:

Trigger:
  • Set Temp_Group = (Units in (Playable map area) matching ((Terrain type at (Position of (Matching unit))) Equal to Icecrown Glacier - Ice))


Now we're going to make a Unit-Group loop from this unit group which was just set.
So create a new action, and select:

Unit Group - Pick Every Unit In Unit Group And Do Multiple Actions

Now change the blue part here, to your newly created Unit Group variable, Temp_Group.
Click "Ok", and now Right-Click this:
Code:
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
    [COLOR="Red"]Loop - Actions[/COLOR]

And select "New Action" and select "Set Variable"... Now we're going to set the "TempPoint" variable. So select that one where it says "Variable" (in red).

Now click the drop down menu, and select "Position of Unit", and change the blue "Triggering unit" to "Picked unit".
Click "Ok", and create another one of the "Set Variable" action, which has to be beneath the one we just made.
Here, you're going to set TempPoint2 to the action, "Point With Polar Offset".

Now change (Center of (Playable map area)) to TempPoint, and change 256.00 to 5.
Now click the 0.00, and beside where it says "Function", click the drop down menu.
Go down to Unit - Facing Angle, and change this to Facing of (Picked unit)
Click ok till you come back to the Trigger Editor.

Now it should look like this:
Trigger:
  • Slide on Ice
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area) matching ((Terrain type at (Position of (Matching unit))) Equal to Icecrown Glacier - Ice))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of (Picked unit))
          • Set TempPoint2 = (TempPoint offset by 5.00 towards (Facing of (Picked unit)) degrees)



Hope it does for you :D

Now it's only 5 actions left, and all of them are called "Custom Script", and here you just write with your keyboard, so as long as you copy what I've written, you shouöd be fine:D

So create a new action, and in the drop down, select Custom Script.
Now click the red ""Script Code" and copy this:

call SetUnitX(GetEnumUnit(),GetLocationX(udg_TempPoint2))

then create another one of this action, and copy this:

call SetUnitY(GetEnumUnit(),GetLocationY(udg_TempPoint2))

And another one with this:

call RemoveLocation(udg_TempPoint2)

And then this:

call RemoveLocation(udg_TempPoint)

Now you're going to Right-Click this:


Code:
[COLOR="Red"]Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)[/COLOR]
    Loop - Actions

And create another "Custom Script" action, and copy this:

call DestroyGroup(udg_Temp_Group)

And now it should look like this:

Trigger:
  • Slide on Ice
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area) matching ((Terrain type at (Position of (Matching unit))) Equal to Icecrown Glacier - Ice))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of (Picked unit))
          • Set TempPoint2 = (TempPoint offset by 5.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)
          • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_Temp_Group)


And you're done :D

Now you just need to put the terrain, Icecrown Glacier - Ice somewhere on the map, and the units should slide ;)

Hope you get it working, and good luck with the map :D



er...im stuck...there is no Terrain-Type Comparison. >_< i think my world editor has aids.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Hmm... There should be XD
It's right below Tect-Type Comparison, and right above Trigger Comparison :thup:

But check out my tutorial on this instead, as that one is better :D
 

electricrain

New Member
Reaction score
0
Hmm... There should be XD
It's right below Tect-Type Comparison, and right above Trigger Comparison :thup:

But check out my tutorial on this instead, as that one is better :D

its not there
unless my eyes are like not able to see it! hereill screen shot for you.


do you have like am im messanger and stufF?


faster help lol ><
 

electricrain

New Member
Reaction score
0
its not there
unless my eyes are like not able to see it! hereill screen shot for you.


do you have like am im messanger and stufF?


faster help lol ><

sadf.jpg
not there :(
 

Ayanami

칼리
Reaction score
288
There should be Terrain-type comparison. I have it. And no, I don't have NewGen. Make sure your World Editor version is the latest one.
 

gwcadu942

New Member
Reaction score
0
There

Trigger:
  • Ice
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Set temp_Group = (Units of type Escape)
      • Unit Group - Pick every unit in temp_Group and do (Actions)
        • Loop - Actions
          • Set temp_Point = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Terrain type at temp_Point) Equal to Northrend - Ice
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • Unit - Move (Picked unit) instantly to (temp_Point offset by 11.00 towards (Facing of (Picked unit)) degrees)
            • Else - Actions
              • Custom script: call RemoveLocation(udg_temp_Point)
              • Custom script: call DestroyGroup(udg_temp_Group)


:D i make
 

oossx

New Member
Reaction score
0
hmm i did everything Komaqtion said and it did slide but whenever you changed direction by clicking, the unit speeds up for a second with walk animation and then slides normally.how do you make it so that the unit doesnt speed up whenever you click
 

Komaqtion

You can change this now in User CP.
Reaction score
469
ok.
i give up ./..
lol
my trigger looks like yours.
but
it isnt working..

No, actually it doesn't look the same...
You need to move those two last actions outside the "Else" part, to they are aligned with the "Set temp_Point" action ;)

hmm i did everything Komaqtion said and it did slide but whenever you changed direction by clicking, the unit speeds up for a second with walk animation and then slides normally.how do you make it so that the unit doesnt speed up whenever you click

Well, I'd say try setting it's movement speed to 0 when he starts sliding :D

Like this:
Trigger:
  • Slide on Ice
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area))
      • 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
              • (Terrain type at TempPoint) Equal to Icecrown Glacier - Ice
            • Then - Actions
              • Set TempPoint2 = (TempPoint offset by 10.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)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current movement speed of (Picked unit)) Greater than 0.00
                • Then - Actions
                  • Unit - Set (Picked unit) movement speed to 0.00
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current movement speed of (Picked unit)) Less than or equal to 1.00
                • Then - Actions
                  • Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
                • Else - Actions
          • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_Temp_Group)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top