• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Units take damage or die after the air transport beeing shot down

Status
Not open for further replies.
Level 12
Joined
Sep 11, 2011
Messages
1,176
when the air transport gets killed/destroyed the passengers die too
similar to broodwar or sc2
in wc3 they just get unloaded...

wait up, TaShadan. i almost finished the system.

EDIT : DONE!


  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script : set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Goblin Zeppelin
            • Then - Actions
              • Set TransportCount = (TransportCount + 1)
              • Set Transport[TransportCount] = (Picked unit)
            • Else - Actions
  • Detect Transports
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Goblin Zeppelin
    • Actions
      • Set TransportCount = (TransportCount + 1)
      • Set Transport[TransportCount] = (Triggering unit)
  • Loading Units
    • Events
      • Unit - A unit Is loaded into a transport
    • Conditions
    • Actions
      • For each (Integer IntegerVariable) from 1 to TransportCount, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Transporting unit) Equal to Transport[IntegerVariable]
            • Then - Actions
              • Unit Group - Add (Triggering unit) to tempGroup[IntegerVariable]
            • Else - Actions
  • Dead Transports
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • For each (Integer IntegerVariable) from 1 to TransportCount, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Triggering unit) Equal to Transport[IntegerVariable]
            • Then - Actions
              • Unit Group - Pick every unit in tempGroup[IntegerVariable] and do (Actions)
                • Loop - Actions
                  • Unit - Kill (Picked unit)
              • Custom script: call DestroyGroup (udg_tempGroup[udg_IntegerVariable])
            • Else - Actions
the Melee Initialization can be combined with your Melee Initialization.

here is a test map
 

Attachments

  • Transport System.w3x
    17.8 KB · Views: 43
Last edited:
Level 12
Joined
Sep 11, 2011
Messages
1,176
Its easy to detect, units in transport will get dizziness buff, which you can check for condition with trigger, then kill those unit with dizzyness buff (or whatever its called)

never thought of this method. thanks a lot! :D

@TaShadan

just as TKF said, when the transport dies, you can pick all unit in playable map area that has a buff of dizziness then kill them.

you only need this trigger, the other one from my previous post doesn't needed.
in the conditions, list all transport that you use in your map.

  • Dead Transports
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Multiple Conditions
        • (Unit-type of (Triggering Unit)) Equal to Goblin Zeppelin
        • (Unit-type of (Triggering Unit)) Equal to Any Transport
        • (Unit-type of (Triggering Unit)) Equal to Any Transport
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff Dizziness) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
here is a test map.
 

Attachments

  • Dead Transports.w3x
    17.5 KB · Views: 36
Level 12
Joined
Sep 11, 2011
Messages
1,176
I think it will look more realistic if removes the unit, has no sense make the unit dies at the feet of the transport.

Also, you need to pick units in range of the transport, what happen if another unit in the map has this buff? It will be killed by the trigger.

people might get confused if the unit just disappeared.

i think as long as he doesn't use any dizziness buff on his map, it's okay.
i never happen to use this kind of buff either.
 
Status
Not open for further replies.
Top