Creating units in specific terrain types

Killerphill

New Member
Reaction score
1
hi guys, is there a way to create units in a specific terrain type, for example: create 1 footmen at random location in grass terrain type.

thanks in advance.
 

Metaldrummer

New Member
Reaction score
11
Best way, in my opinion, is to create him at a random position in playable map area. Then:
Trigger:
  • Conditions
    • (Terrain type at (Position of (Triggering unit))) Not equal to <Grass>

then move him instantly to another random point.
 

BRUTAL

I'm working
Reaction score
118
Code:
Untitled Trigger 001
    Events
        Time - Every 0.25 seconds of game time
    Conditions
    Actions
        Set TempPoint = (Random point in (Playable map area))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Terrain type at TempPoint) Equal to Lordaeron Summer - Grass
            Then - Actions
                Unit - Create 1 Footman for Player 1 (Red) at TempPoint facing Default building facing degrees
            Else - Actions
        Custom script:   call RemoveLocation (udg_TempPoint)
something like that would work, idk what kind of event youd use
 

Killerphill

New Member
Reaction score
1
Trigger:
  • ALL Hostile Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Equal to Neutral Hostile
    • Actions
      • Wait 40.00 seconds
      • Unit - Create 1 (Unit-type of (Dying unit)) for Neutral Hostile at (Random Location with cliffheight 7 in (Rect centered at (Position of (Dying unit)) with size (4000.00, 4000.00))) facing Default building facing (270.0) degrees


thats the kind of trigger i have, i wanna make it that a specific unit can only be created on a specific tile set.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top