Staredit Network

Staredit Network -> UMS Assistance -> switch question
Report, edit, etc...Posted by Arconna on 2005-04-08 at 19:59:52
I'm curious about switches. If I have in the conditions that the switch is cleared and have another condition where the player has to bring a unit to a certain location, and then have actions that would say create units if that unit is at that location, when the switch is off will the trigger still work or does that switch have to be on for any of the actions to take place? Thanks
Report, edit, etc...Posted by warhammer40000 on 2005-04-08 at 20:12:07
What u said is kind of confusing. But I'll give you a good example-


Trigger
Description:
Start the protoss attack
Players:
¤ Player 1*
Conditions:
¤ Player 1 brings one marine* to location Start Protoss Attack*
Actions:
¤ Set* switch 23


and

Trigger
Description:
Protoss Attacks!
Players:
¤ Player 4*
Conditions:
¤ Switch 23* is set*
Actions:
¤ Create 23 zealots at location Protoss Base*
¤ Create 21 Dragoons at location Start Protoss Attack*
¤ Order all units owned by player 4 to location Terran Base*
¤ wait 25564*
¤ Create 24 Scouts* at location Start Protoss Attack*
¤ Order all units owned by player 4 to location Terran Base*


Something like that.... or maybe-

Trigger
Description:
Protoss Attacks!
Players:
¤ Player 4*
Conditions:
¤ Switch 23* is set*
Actions:
¤ Order all units owned by player 4* to Terran Base*


You know what i mean, the one right above this means the units were preplaced.

*Can be changed

I hope this helped, cuz it took me forever.
Report, edit, etc...Posted by Arconna on 2005-04-08 at 20:22:55
QUOTE(warhammer40000 @ Apr 8 2005, 05:12 PM)
You know what i mean, the one right above this means the units were preplaced.

*Can be changed

I hope this helped, cuz it took me forever.
[right][snapback]183323[/snapback][/right]


That helps me with the other map I'm working on tongue.gif.
I guess I wasn't really clear. What I'm trying to do is this. In this game you can spawn ultralisks, hydras, or zerglings in the beginning but you only get one like every 3 seconds, and you only have one civ so you can only choose one unit. What I'm trying to do is make the zerg units more importan to the game. I've got a beacon set up elsewhere that gives the player 100 gas when he places a civ there, the civ dies, you get a civ in that location every 100 kills. What I was trying to do was set up a trigger/switch bit that goes off of that 100 gas, player has 100 gas the first swithc is set. What I wanted the switch to do is make it so instead of spawning 1 zerg unit (like 1 hydra or 1 zergling, etc), it would do two at a time. It would move up from there, get 200 gas, and extra 2, etc etc etc, probably capping at only 10 max. So I have the trigger set up sort of like this for activating the switchs.

Player
Force One, Current Player
Condition
Current players accumulates 100 gas
Action
Activate Switch 1

(then another for 200 gas, set switch 2, clear swithc 1, etc etc)

then the switch

Player
Force One, Current Player
Condition
Switch 1 is Set
Current Player Brings Civ to Location blah
Action
Create 1 zergling
Preserve trigger

Does that look like it will work the way I was trying to do it?

Thanks
Report, edit, etc...Posted by TheOddAngel on 2005-04-08 at 20:30:06
Yes I do believe that that would work smile.gif
Report, edit, etc...Posted by Arconna on 2005-04-08 at 22:56:30
QUOTE(TheOddAngel @ Apr 8 2005, 05:30 PM)
Yes I do believe that that would work smile.gif
[right][snapback]183331[/snapback][/right]


Question, would the trigger I described above present a delay for hte original trigger that had no switches just spawned 1 at a time? The switches are just adding to the 1 independently, so having no delays would be nice lol.
Report, edit, etc...Posted by (U)Bolt_Head on 2005-04-09 at 01:04:26
Im rather confused about what you are saying but i'll try to clareify some things.

1. All conditions need to be true in order for the actions of the trigger to exicute.
2. Switchs start the game cleared.

Secondly in the example in your last post you proboly do NOT need a switch at all. Combineing the conditions "Current players accumulates 100 gas" and "Current Player Brings Civ to Location blah" will work pretty much the same way.

You would only need the switch if players are spending there gas and you want them to continue receaving the units even after they have less than 100 gas as long as they had it preveiously.
Report, edit, etc...Posted by Arconna on 2005-04-09 at 01:14:47
QUOTE((U)Bolt_Head @ Apr 8 2005, 10:04 PM)
Im rather confused about what you are saying but i'll try to clareify some things.

1.  All conditions need to be true in order for the actions of the trigger to exicute.
2.  Switchs start the game cleared.

Secondly in the example in your last post you proboly do NOT need a switch at all. Combineing the conditions "Current players accumulates 100 gas" and "Current Player Brings Civ to Location blah" will work pretty much the same way.

You would only need the switch if players are spending there gas and you want them to continue receaving the units even after they have less than 100 gas as long as they had it preveiously.
[right][snapback]183537[/snapback][/right]


Well the players can't spend the gas, most everything that would require gas has had that turned to zero. So the gas is sort of like a marker, you get 100 gas, the switch 1 turns on and now when you put your civ in the beacon for zergling spawn, you get the original one from the original trigger, plus the one from the new switch trigger. Then it happens at 200 gas, you activate switch 2 and turn off switch 1, now you get the 1 + 2. It happens like that all the way through until you get 1 + 8.

I guess I see what you are saying, I could just get rid of the switches and instead just put an additional trigger that occurs with the 100 gas, which is basically what I'm doing now, just no switch. Hmm, that's something to consider I guess. Probably would make things a lot easier. I'll look at it a bit more.
Thanks
Report, edit, etc...Posted by (U)Bolt_Head on 2005-04-09 at 13:23:48
Ok the way you described it i see two ways to do it. You can ither have one trigger add all of it or all of them work together.

If you have one add all of it then you would need to do this.
Conditions:
-Current player brings at least one civ to location.
-Current player accumulates at least 100 gas
-Current player accumulates at most 199 gas
Actions:
-Add 2

then

Conditions:
-Current player brings at least one civ to location.
-Current player accumulates at least 200 gas
-Current player accumulates at most 299 gas
Actions:
-Add 3



Your option is to use all the triggers to work together by not including the "at most" condition.

Conditions:
-Current player brings at least one civ to location.
-Current player accumulates at least 100 gas
Actions:
-Add 1

Conditions:
-Current player brings at least one civ to location.
-Current player accumulates at least 200 gas
Actions:
-Add 1

If you had 200 gas in this example your original trigger would fire + the two i listed so you would get 3 extra gas.
Report, edit, etc...Posted by Heimdal on 2005-04-09 at 13:35:01
You don't need 10 triggers for that. And why is it 100 gas instead of just 1?

Trigger
Players:
¤ Anyone
Conditions:
¤ Current Player accumulates at least 1 gas
¤ Current Player accumulates exactly 0 ore
¤ Some timing condition
Actions:
¤ Create 1 zerg unit at somewhere for current player
¤ Subtract 1 gas for current player
¤ Add 1 ore for current player
¤ Preserve trigger


Trigger
Players:
¤ Anyone
Conditions:
¤ Current Player accumulates at least 1 ore
¤ Current Player accumulates exactly 0 gas
¤ Some timing condition
Actions:
¤ Create 1 zerg unit at somewhere for current player
¤ Subtract 1 ore for current player
¤ Add 1 gas for current player
¤ Preserve trigger


2 Triggers is all you need. Of course if you need ore for something else, use a death counter. In fact, unless you want the player to see what "level" they're on, you could use a death counter for both variables.
Report, edit, etc...Posted by Arconna on 2005-04-10 at 02:02:09
I used 100 just because it's a round nifty number, and other than that, it's got no purpose, that's just what I stuck with. The idea behind my triggers isn't to just create a zerg somewhere when the trigger goes off, but to make the spawning of zerg units increase in frequency. In the beginning there are three beacons all the human players can go to, one for zerglings, hydras, and ultras. You put your once civ on the beacon, that unit spawns for you at your spawn point one every 2000 milliseconds. What I'm trying to do is change that so instead of that 1, it will become two, but in order to do that you have to earn 100 kills, get a civ that is at another locked off location and put it in the appropriate beacon that gives 100 gas, with that gas you now could spawn 2 at a time, instead of the one, and so on up to an addition 8 to the 1. I'm basically trying to make the zerg units seem more important in the game, because at the moment they are just basically cannon fodder in the game, filler that serve no purpose other than to save your butt in the beginning. This would make them a little more powerful, and you can upgrade them just like terran and toss, and the only downside is the limit on unit types. The effect would be permanent and the gas would stay there and just accumulates the more you choose the beacon that activates this.
I actually removed all the switches and just made regular triggers for this and I have yet to test it, but hopefully it will all work.

BoltEdit: Deleted long quote of heimdal's post directly above yours (not needed)
Next Page (1)