Noob question

Post Reply
Winter
Terran Settler (Unemployed)
Terran Settler (Unemployed)
Posts: 3
Joined: Thu Jul 03, 2008 6:03 am

Noob question

Post by Winter »

I've just started getting into making maps and such and I've come across a problem when I want to preserve a trigger.  I want to create a trigger that whenever the condition is met the action is executed but I want the condition to be able to do it multiple times.  Eg.

Condition:
Zergling dies

Action:
Create Zergling
Preserve trigger


What I am aiming for is that whenever a zergling dies, another is created but what is happening is the action is repeated infinitely leaving me with an uncontrollable zergling population.

I'm feeling pretty stupid so any help would be appreciated.
Winter
Terran Settler (Unemployed)
Terran Settler (Unemployed)
Posts: 3
Joined: Thu Jul 03, 2008 6:03 am

Re: Noob question

Post by Winter »

Ok i've figured it out :) I need to add the 'Always' condition.
User avatar
omega20
Zerg Ultralisk Waste Manager
Zerg Ultralisk Waste Manager
Posts: 692
Joined: Sun Apr 06, 2008 7:38 am

Re: Noob question

Post by omega20 »

Winter wrote: Ok i've figured it out :) I need to add the 'Always' condition.
No, the 'always' condition is just to place the trigger in a space of time. You must use switches. For example:

1st TRIGGER

Condition:
Player _ commands at most 0 Zergling

Action:
Set Switch 1
Preserve trigger


2nd TRIGGER

Condition:
Switch 1 is set

Action:
Create 1 Zergling in (location)
Clear Switch 1
Preserve trigger


This should work. ;)
Last edited by omega20 on Thu Jul 03, 2008 6:39 am, edited 1 time in total.
[imgwh 400x120]http://www.sigrealm.com/freesigs/178_Starcraft2MultSig.jpg[/imgwh]
Winter
Terran Settler (Unemployed)
Terran Settler (Unemployed)
Posts: 3
Joined: Thu Jul 03, 2008 6:03 am

Re: Noob question

Post by Winter »

Awesome tnx
User avatar
Revan
Terran Dropship Flight Attendant
Terran Dropship Flight Attendant
Posts: 154
Joined: Wed Dec 26, 2007 11:15 am

Re: Noob question

Post by Revan »

One trigger is enough for that, without using that switch:

C: Player x commands at most/exatly 0 zergling
A:Create 1 zergling for player x
A:Preserve Trigger

Or, if you want to get back that zergling instantly, no matter how much you command then use this:

C: Player X has suffered at least 1 deaths of Zergling
A: Set deaths for player x: Subtract 1 for Zergling
A: Create 1 Zergling for player x
A: Preserve Trigger
Signature can be found here.
User avatar
omega20
Zerg Ultralisk Waste Manager
Zerg Ultralisk Waste Manager
Posts: 692
Joined: Sun Apr 06, 2008 7:38 am

Re: Noob question

Post by omega20 »

Oh! It's true.

At least, my comment has served as something, because it may serve as an example for other triggers that require switches.
[imgwh 400x120]http://www.sigrealm.com/freesigs/178_Starcraft2MultSig.jpg[/imgwh]
Post Reply