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

Starcraft Zerg Larvea Spawn trigger

Status
Not open for further replies.
Level 7
Joined
Jan 1, 2005
Messages
133
while working on my new map updates i thought it would b best if for me 2 make a trigger that would respawn larvea that were killed by enemy players just like how it does in the actual starcraft game. At first the trigger i made worked like a treat but as i began testing all different senarios i had 1 probelm with respawning more then 1 larvea at a time, lagging the map up, and if a player left the trigger would stop respawning larvea for every1 else.

here is the trigger;

Larvea Spawn
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Zerg Larvae
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 1 (Red) slot status) Equal to Has left the game
Then - Actions
Trigger - Destroy (This trigger)
Else - Actions
Wait 10.00 seconds
Unit - Create 1 Zerg Larvae for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) slot status) Equal to Has left the game
Then - Actions
Trigger - Destroy (This trigger)
Else - Actions
Wait 10.00 seconds
Unit - Create 1 Zerg Larvae for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 3 (Teal) slot status) Equal to Has left the game
Then - Actions
Trigger - Destroy (This trigger)
Else - Actions
Wait 10.00 seconds
Unit - Create 1 Zerg Larvae for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 4 (Purple) slot status) Equal to Has left the game
Then - Actions
Trigger - Destroy (This trigger)
Else - Actions
Wait 10.00 seconds
Unit - Create 1 Zerg Larvae for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 5 (Yellow) slot status) Equal to Has left the game
Then - Actions
Trigger - Destroy (This trigger)
Else - Actions
Wait 10.00 seconds
Unit - Create 1 Zerg Larvae for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 6 (Orange) slot status) Equal to Has left the game
Then - Actions
Trigger - Destroy (This trigger)
Else - Actions
Wait 10.00 seconds
Unit - Create 1 Zerg Larvae for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 7 (Green) slot status) Equal to Has left the game
Then - Actions
Trigger - Destroy (This trigger)
Else - Actions
Wait 10.00 seconds
Unit - Create 1 Zerg Larvae for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 8 (Pink) slot status) Equal to Has left the game
Then - Actions
Trigger - Destroy (This trigger)
Else - Actions
Wait 10.00 seconds
Unit - Create 1 Zerg Larvae for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees

I think the destroy trigger actions i put in might b the problem but if any1 can help me plz post ur suggestions here.

wat i basically need is that wen a larvea dies a 1 new larvea respawns in its place until the player has left or been killed.
 
Level 6
Joined
Sep 17, 2005
Messages
276
following trigger should help you: (sry im not able to give you exact functions cz of no WE but i think its clear what i meant):

EVENT:
unit-a unit dies

COND:
AND-
-UnitType of dying unit equal to larve
-Player(x) slotStatus is equal to IsPlaying

ACTION:
create 1 larve for player(y) at point of dying unit


hope this works, havent tried it yet. :wink:
 
Status
Not open for further replies.
Top