• 🏆 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!

Units are "dropped in" when trained

Status
Not open for further replies.
Level 5
Joined
Feb 27, 2009
Messages
236
So when a unit is trained at a building, it stays exactly the same, then during the last few (say 3 seconds) an air transport (currently using zeppelin until I start making custom units) spawns on a random point of the map, flies towards the building, and drops off the trained units, then flys off the map, and disappears. Is there a way to make this happen???
 
Level 5
Joined
Aug 24, 2010
Messages
133
so you trained a unit then a zepplin spawns picks it up and drops it somewhere else?
or
you want to click train then instead of training it spawns a zepplin with the unit which you wanted to train and drops it at the building
 
Level 15
Joined
Jul 9, 2008
Messages
1,552
so you trained a unit then a zepplin spawns picks it up and drops it somewhere else?
or
you want to click train then instead of training it spawns a zepplin with the unit which you wanted to train and drops it at the building

he wants it so that when your train a unit the unit doesent just pop up after training.
make it look as if the unit is being dropped off by the zepplin i believe

OFF TOPIC:JUST FOR LOLs

BANG :goblin_boom: BANG :goblin_boom: BANG :goblin_boom:

:goblin_wtf: wtf why did you do that
 
Level 5
Joined
Aug 24, 2010
Messages
133
lol
ok
im not sure if you can create a unit in the cargo of another unit (cant in gui anyway)
but you could make an area make it load then move it to a random position
something like
  • Events
  • Unit - A unit begins training a unit
  • Conditions
  • Actions
  • Unit - Order training unit to stop
  • Set trained_unit = trained unit
  • Set trainer_point = position of training unit
  • Unit - create 1 Zepplin for (triggering player) at loadpoint
  • Set zep_var = last created unit
  • Unit - create 1 trained_unit for triggering player at loadpoint
  • Unit - order zep_var to load last created unit
  • Set ran_point = random point in playable map area
  • Unit - move zep_var instantly to ran_point
  • Unit - issue order to zep_var to unload all at trainer_point
  • Custom script: call RemoveLocation (udg_ran_point)
  • Custom script: call RemoveLocation (udg_load_point)
  • Custom script: call RemoveLocation (udg_trainer_point)
Edit: hmm that gives the cost of the unit back
but several ways around that
what you could do is make it a dummy research or something then make it finishes researching an upgrade or
make it finishes a unit and move that unit to location rather than making a new one
 
Triggers and map!

This one will load unit into Transopr unit (Transport ^^) and order it to move to some place!

  • Untitled Trigger 001
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Footman
    • Actions
      • Set TempPoint[1] = (Center of Region 000 <gen>)
      • Unit - Create 1 Goblin Zeppelin for Player 1 (Red) at TempPoint[1] facing Default building facing degrees
      • Set Transopr = (Last created unit)
      • Set Footman = (Trained unit)
      • -------- x --------
      • Unit - Move Footman instantly to TempPoint[1]
      • Wait 0.00 seconds
      • Unit - Order Transopr to Load Footman
      • Wait 0.00 seconds
      • Unit - Order Transopr to Right-Click Barracks 0000 <gen>
      • -------- x --------
      • Custom script: call RemoveLocation (udg_TempPoint[1])
This one drop unit when he come into barrack range (check map)
You can set this to region or whatever!

  • Untitled Trigger 002
    • Events
      • Unit - A unit comes within 300.00 of Barracks 0000 <gen>
    • Conditions
    • Actions
      • Set TempPoint[2] = (Position of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Goblin Zeppelin
        • Then - Actions
          • Unit - Order (Triggering unit) to Unload All At TempPoint[2]
          • Wait 0.00 seconds
          • Unit - Remove (Triggering unit) from the game
        • Else - Actions
      • Custom script: call RemoveLocation (udg_TempPoint[2])
It's MUI works fine, leaks are cleaned!

Oh I removed transport unit after dropping footman, you can replace:
Unit - Remove (Triggering unit) from the game
with
Unit - Order Transopr to Move To TempPoint[3]

but use
Set TempPoint[3] = (Center of Region 001 <gen>)
(another region somowere)
Then just remove leak with
Custom script: call RemoveLocation (udg_TempPoint[3])
 

Attachments

  • Test Map.w3x
    15.3 KB · Views: 1,380
Status
Not open for further replies.
Top