If... Trigger...

caniboy

New Member
Reaction score
2
Hi,
iam new in this Forum and i need help!
Thats my Problem:
I make a "Zombie vs. Survivors" map...
I add some Triggers i know...
Now my problem is that i just want to activate a trigger if a bulding is not death. (sorry for my bad english)
I add a timer:
Every 10 Seconds a unit respawn at a Cameras Place...
Now but if a enemy destroy my building then the trigger must stop (respawning my units) Like Footmen Frenzy
How can i do that?
Thx
 

vaziocs

New Member
Reaction score
5
Hi,
iam new in this Forum and i need help!
Thats my Problem:
I make a "Zombie vs. Survivors" map...
I add some Triggers i know...
Now my problem is that i just want to activate a trigger if a bulding is not death. (sorry for my bad english)
I add a timer:
Every 10 Seconds a unit respawn at a Cameras Place...
Now but if a enemy destroy my building then the trigger must stop (respawning my units) Like Footmen Frenzy
How can i do that?
Thx

event a "your building" dies
action - turn(ur trigger) off

or put in condition of ur trigger.
Unit is alive equal to true
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
Code:
Untitled Trigger 001
    Events
        Time - Every 10.00 seconds of game time
    Conditions
        ([I]YourStructure[/I] is alive) Equal to True
    Actions
        ...
YourStructure is your structure... well if its preplaced you can just set it, if you create it via trigger you got to set it to a variable.
 

caniboy

New Member
Reaction score
2
Sorry but a other question (The last i hope)
Now if e.g. Player 2 is not in game (blue) then i want that the House dont respawn (the bulding)
How i do that?
 

Weegee

Go Weegee!
Reaction score
102
Check if the Units is playing and if its controlled by a user ill post up the trigger in a few sec



Code:
Stuff
     
     Events
    
     Conditions
        (Player 2 (Blue) controller) Equal to User
        (Player 2 (Blue) slot status) Equal to Is playing
    
      Actions
 

caniboy

New Member
Reaction score
2
hmmm...

but now if i made that, that the "building" respawn if e.g. player 1 is playing i cant "shut down" the trigger! i mean the "Unit Spawn trigger"...

x=If Player 1 is playing then building1 respawn at camera place 1
y=Respawn every 10 sec. 1 Unit at camera place 2 if x
z=if x is death shut or not playing down trigger y (spawn trigger) and loose player 1

NOW
at Z is the problem i mean!
if i made it exactly like there i cant make Z because i cant choose the "building1" because its not there!

OMG :D
Please help me!
Thank you all very much
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
save the respawned building into a unit variable and use the variable in Z.
 

greatsmite

New Member
Reaction score
3
I've got a far simpler meathod, if you'd like to hear it.

Make the player start location (the unit "player start location" that is) the point where the "your structure" is created. In the begining of the game tell it to create the building at "player start location" just like the main base in the Melee initilization triggers(cept make it make your building, not the start units). Then tell the creeps you want to spawn, to spawn at the player start location. this way IF A PLAYER ISN'T PLAYING IT WONT SUMMON THE BASE OR SPAWN THE UNITS. Create at start location should be under create units facing angle, click on the "center of (playable map area)" part and change it to "player-player start location"

AS for Z, make a unit variable (with number of arrays equal to number of players) and have it set the "last unit created" in this first trigger, to "your_building [1]" and player 2's should be "your_building [2]".
-----------------------------------------------------------------------------------------------------
map stuff
Events
Map initialization
Conditions
Actions
Unit - Create 1 Town Hall for Player 1 (Red) at (Player 1 (Red) start location) facing Default building facing degrees
Set your_building[1] = (Last created unit)
---------------------------------------------------------------------------------------
spawn stuff
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit - Create 1 Footman for Player 1 (Red) at (Player 1 (Red) start location) facing Default building facing degrees
Unit - Create 1 Footman for Player 2 (Blue) at (Player 2 (Blue) start location) facing Default building facing degrees
----------------------------------------------------------------------------------------
dead
Events
Unit - A unit Dies
Conditions
Or - Any (Conditions) are true
Conditions
(Dying unit) Equal to your_building[1]
(Dying unit) Equal to your_building[2]
(Dying unit) Equal to your_building[3]
(Dying unit) Equal to your_building[4]
Actions
Trigger - Turn off spawn stuff <gen>
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
the players start position is still in the game even if the player left or is not playing. your trigger wont work.
the start locations are preplaced.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
thats wrong. it does exist as long as the start position is set in the editor. if you set the amount of players to 5 there will be all 5 starting positions ingame no matter if the players are playing/owned by computer/left etc...
 

greatsmite

New Member
Reaction score
3
but it doesnt matter, i'm trying to tell you. i tested it myself as i posted the reply, just in case. It works, it really does.
 

caniboy

New Member
Reaction score
2
Somebody want to help me if i send him the map??? and we make "Team Viewer"??? (google it)
 

greatsmite

New Member
Reaction score
3
i could help, sure well maybe, i'm not sure i have the time.

do you not understand my trigger? because i'd be glad to talk you through it some more. just ask questions.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top