• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Will This Work?

Status
Not open for further replies.
Level 4
Joined
Jun 23, 2011
Messages
70
I really have no decent way of testing it in worldedit... is this properly set?

  • LoadHorse
    • Events
      • Unit - A unit enters Horse Region <gen>
    • Conditions
      • ((Triggering unit) belongs to an enemy of Player 1 (Red)) Equal to True
      • HorseisLoading Equal to 1
    • Actions
      • Unit - Remove (Triggering unit) from the game
      • Set HorseContents = (HorseContents + 1)
      • Game - Display to (All enemies of Player 1 (Red)) the text: (Units in Horse: + ((String(HorseContents)) + /50))
      • Set ControlTracker[HorseContents] = (Player number of (Triggering player))
      • Set ControlTypeTracker[HorseContents] = (Unit-type of (Triggering unit))
  • HorseComplete
    • Events
      • Unit - A unit enters Region 008 <gen>
    • Conditions
      • (Triggering unit) Equal to Horse
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WhatRinHorse Equal to 1
        • Then - Actions
          • Unit - Create 1 ControlTypeTracker[UnloadCounter] for (Player(ControlTracker[UnloadCounter])) at (Center of Region 008 <gen>) facing Default building facing degrees
          • Set UnloadCounter = (UnloadCounter + 1)
          • Wait 0.01 seconds
and repeat...
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
I really have no decent way of testing it in worldedit... is this properly set?

  • LoadHorse
    • Events
      • Unit - A unit enters Horse Region <gen>
    • Conditions
      • ((Triggering unit) belongs to an enemy of Player 1 (Red)) Equal to True
      • HorseisLoading Equal to 1
    • Actions
      • Unit - Remove (Triggering unit) from the game
      • Set HorseContents = (HorseContents + 1)
      • Game - Display to (All enemies of Player 1 (Red)) the text: (Units in Horse: + ((String(HorseContents)) + /50))
      • Set ControlTracker[HorseContents] = (Player number of (Triggering player))
      • Set ControlTypeTracker[HorseContents] = (Unit-type of (Triggering unit))
Player number of Triggering player wont work, use Owner of Triggering unit instead.

  • HorseComplete
    • Events
      • Unit - A unit enters Region 008 <gen>
    • Conditions
      • (Triggering unit) Equal to Horse
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WhatRinHorse Equal to 1
        • Then - Actions
          • Unit - Create 1 ControlTypeTracker[UnloadCounter] for (Player(ControlTracker[UnloadCounter])) at (Center of Region 008 <gen>) facing Default building facing degrees
          • Set UnloadCounter = (UnloadCounter + 1)
          • Wait 0.01 seconds
and repeat...

For what case is there a 0,01 wait?
Im not sure what your triggers are about, could be discribe what are you trrying to do?
 
Level 4
Joined
Jun 23, 2011
Messages
70
It's part of a rather long trigger that I tried to throw together. The idea is that when units enter an area, it removes them from the game and remembers what unit type it was, and who it belonged to... then, when the horse enters the target region at the end, it re-creates those same units, remembering the unit types and controllers...

The .01 wait is an accident, I think. Basically those last 2 lines (without the wait) are repeated about 50 times.
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
Creating unit via unit handle? For sure yes.
If im not mistaken there is also option to hide given unit via Action Unit - hide
and when you need it back in other region, just use Unit - Move instantly to taregt location, and follow it by Action Unit - unhide. Wasn't checking if hiden units blocks path though.
 
Status
Not open for further replies.
Top