• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Wind

Status
Not open for further replies.
Level 3
Joined
Feb 14, 2011
Messages
43
what i want to do is add wind in my game.... my map is kindly like sliding on ice with normal speed , exp : Area of Ice Escape.. and in the map have many stages to complete... each stage will change to different map... i know my explanation isn't good enough... but i want to learn this kind of trigger if there is any of it...
the wind will increase the speed of my heros/car when sliding on ice...
i have no idea on how to do that.. please any help?:vw_sad::vw_sad::vw_sad:
 
Level 5
Joined
Nov 30, 2010
Messages
184
Make a trigger that moves the unit in the direction of the wind when on ice.

Trigger1
Event: every 1 second
Condition
Action: pick every unit in playable map area and do actions
Loop: set windpoint to position of picked unit
If then else multiple functions
If terrain type at windpoint is ice
Then instantly move unit to windpoint offset by 25 in 90 degrees

The 25 in the move unit action can be changed to make the wind 'stronger'. Similarly, you can adjust the periodic event. The 90 in the move unit action determines the direction of the wind. 360/0 is up, 90 is right, 180 down and 270 left. This is for very realistic wind as wind only blows in one direction =)
 
Level 12
Joined
Apr 4, 2010
Messages
862
Very funneh.
Hold-on, I'll post teh triggers for ya!

Edit:
You need some variables:
Point variable named "TempPoint", array 1.
Real variable named "Speed", array 1.
Unit Group variable named "TempGroup", array 1.


  • settings
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Speed[1] = 5.00
      • Set Speed[1] = 10.00
  • move
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set TempGroup[1] = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Not equal to Neutral Hostile)))
      • Unit Group - Pick every unit in TempGroup[1] and do (Actions)
        • Loop - Actions
          • Set TempPoint[1] = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Terrain type at TempPoint[1]) Equal to Northrend - Ice
            • Then - Actions
              • Set TempPoint[2] = (TempPoint[1] offset by Speed[1] towards (Facing of (Picked unit)) degrees)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Terrain type at TempPoint[1]) Equal to Icecrown Glacier - Ice
            • Then - Actions
              • Set TempPoint[2] = (TempPoint[1] offset by Speed[2] towards (Facing of (Picked unit)) degrees)
            • Else - Actions
          • Unit - Move (Picked unit) instantly to TempPoint[2]
          • Custom script: call RemoveLocation(udg_TempPoint[1])
          • Custom script: call RemoveLocation(udg_TempPoint[2])
      • Custom script: call DestroyGroup(udg_TempGroup[1])
 
Level 11
Joined
May 31, 2008
Messages
698
To make them slide but still able to walk/cast abilities or anything else, you should do set x and y. To do this, you can just add to giant crabs trigger.

set x = (X of (TempPoint[1]))
set y = (Y of (TempPoint[1]))
custom script: call SetUnitX(GetEnumUnit(), x)
custom script: call SetUnitY(GetEnumUnit(), y)

x and y are "Real" variables

If you just set the units location, it will pretty much be disabled and you wont be able to order it to do anything, idk if you want that to happen.
 
Status
Not open for further replies.
Top