• 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.

Ghoul spawning out of dead unit corpse / Hero turning to Vampire on death

Status
Not open for further replies.

kj_

kj_

Level 5
Joined
Aug 1, 2008
Messages
134
Hey guys
1. IS there a way to remove units from a map if they are not owned by a player(like the controller) I want them to spawn and I want a trigger to remove them if there isn't a user controlling it or not

2. I'm making a Vampire vs Human kind of map , but I want this to happen , if a say a lower unit level like (Peasant) dies I want say a ghoul to spawn out of it's corspe , can anyone help me with these :)

3. And when say a hero dies it turns into a Vampire
Help would be apprec
:spell_breaker:
-kj_
 
Level 14
Joined
Nov 4, 2006
Messages
1,241
for 2 and 3:
  • Events
    • Unit - A Unit dies
  • Conditions
  • Actions
    • if triggering Unit Unit-type equal to peasant create a ghoul at position of triggering Unit
    • if triggering Unit is a Hero then create a Vampire at position of triggering Unit
thats more or less how it works, change it according to your needs
 
Level 25
Joined
Apr 27, 2008
Messages
2,512
1-Event:player 2 (bleu) leaves the game
actions:pick every in (unit owned by player 2 (bleu)) and do action:
-remove picked unit from the game
2-you can give him the ability Spawn Hydra and change from hydra to ghoul
or: Event:unit die
condition: unit type of dying unit equal to pesent
action: create 1 ghoul for owner of dying unit at position of dying unit
3-if vampire unit you should do the same in 2
 
Level 7
Joined
Jun 16, 2008
Messages
327
  • Events
    • Time - Every 1.00 seconds of game time
  • Conditions
  • Actions
    • If ((Player 1 (Red) slot status) Not equal to Is playing) then do (Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Unit - Remove (Picked unit) from the game)) else do (Do nothing)
Use the single If/Then/Else action to execute the above trigger.
Add all human players to this trigger (e.g: Player 2 (blue) as well)
 
Level 15
Joined
Feb 9, 2006
Messages
1,598
I have got two examples for the event.

  • Trigger
    • Events
      • Map initialization
      • Time - Every 20.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) controller) Not equal to User
            • Then - Actions
              • Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
                • Loop - Actions
                  • Unit - Remove (Picked unit) from the game
            • Else - Actions
NOTE - I didn't bother to remove leaks.
 
Status
Not open for further replies.
Top