Staredit Network

Staredit Network -> UMS Assistance -> Activating the same trigger at different places
Report, edit, etc...Posted by xtremebob on 2004-10-18 at 22:50:38
I'm trying to activate this trigger at ten different location
Trigger
Conditions:
¤ Player 1 brings 1 marine to Location A
Actions:
¤ Display Text: +1 Gas
¤ Modify reasources for player 1: add 1 vespene gas

Then to Location B, C, D, ect.
How would I set this up so that if they bring it to any one of the locations they will get there 1 gas?
Report, edit, etc...Posted by KiLLeR2001 on 2004-10-19 at 00:00:12
Ok I'm not exactly sure what you want but here's my go at it...

First off make a trigger like this:

Trigger
Players:
¤ Whatever
Conditions:
¤ Player brings unit to location(A-Z)
¤ Player suffers 0 death count of unit
Actions:
¤ Set death count of unit to 1
¤ Preserve Trigger


You must do this trigger for each separate location.

----------

Trigger
Players:
¤ Whatever
Conditions:
¤ Player suffers exactly 1 death of unit
Actions:
¤ Move all units at location to another location
¤ Display Text "+1 gas"
¤ Modify resources add 1 gas to player
¤ Set deaths of unit to 0
¤ Preserve Trigger
Report, edit, etc...Posted by Nozomu on 2004-10-19 at 00:03:23
Unfortunately, the trigger system is a fairly simplistic programming language. It can't even handle a simple "or" condition, which even QBasic offers. So, to answer the question, you have to make ten different triggers, one for each location. It should be easy with the Copy function available on the right side of the trigger window.
Report, edit, etc...Posted by DT_Battlekruser on 2004-10-19 at 00:11:56
Well put Nozumo.

btw, what is QBasic? Some obscene form of Basic?
Report, edit, etc...Posted by Nozomu on 2004-10-19 at 00:31:09
QBasic is QuickBasic, only abbreviated. It was the first and only (unless you count the trigger system) programming language I ever learned. I guess it's a simplified version of Basic.
Report, edit, etc...Posted by xtremebob on 2004-10-19 at 00:37:21
After two hours I just realized I put the answer to my question in my question. What I meant was, I want it to something completely different.
What I want to do is, When you bring the unit to one of the locations, I want it to add to one gas, then if you find another location and you have already one gas, it will not add one gas and show this a message of the sort "Sorry you cannot pickup more than one gas at a time", so that means that, that location will not work if you have 1 gas, so that whenever you a trigger it will give you a different message and not give you the one gas. Also that I'm pretty sure that I will be using switches and if you read my other post you will know that I am pretty new to switches and I can barely organize five switches. The only way switch work on my map right no is beacuse it was a simple switch or I was told how set it up. Can someone help me on the real problem?
Thanks in advance!
Report, edit, etc...Posted by DT_Battlekruser on 2004-10-19 at 00:38:32
QUOTE(KiLLeR2001 @ Oct 18 2004, 09:00 PM)
Ok I'm not exactly sure what you want but here's my go at it...

First off make a trigger like this:







Trigger
Players:
¤ Whatever
Conditions:
¤ Player brings unit to location(A-Z)
¤ Player suffers 0 death count of unit
Actions:
¤ Set death count of unit to 1
¤ Preserve Trigger


You must do this trigger for each separate location.

----------







Trigger
Players:
¤ Whatever
Conditions:
¤ Player suffers exactly 1 death of unit
Actions:
¤ Move all units at location to another location
¤ Display Text "+1 gas"
¤ Modify resources add 1 gas to player
¤ Set deaths of unit to 0
¤ Preserve Trigger

[right][snapback]86469[/snapback][/right]


Use this tirgger and add an "accumulate" condition to it like they accumlate at most 0 gas.
Report, edit, etc...Posted by xtremebob on 2004-10-19 at 01:10:47
Cool, though I didn't use the triggers you guys gave me, but still really appreciate help biggrin.gif, it gave the right push towards my answer. What I did is this:
Trigger
Conditions:
¤ Player 1 accumulates exactly 0 vesoene gas
¤ Player 1 brings exactly 1 marine to location A
Actions:
¤ Modify Player 1 resource: Set to 1 vespene gas
¤ Display Text: +1 gas
¤ Clear Switch 1
¤ Set Switch 2

-----------------------------------------------------------------------------------------------
Trigger
Conditions:
¤ Player 1 accumulates exactly 0 vesoene gas
¤ Player 1 brings exactly 1 marine to location B
Actions:
¤ Modify Player 1 resource: Set to 1 vespene gas
¤ Display Text: +1 gas
¤ Clear Switch 2
¤ Set Switch 1

-----------------------------------------------------------------------------------------------
Trigger
Conditions:
¤ Player 1 accumulates exactly 1 vespene gas
¤ Player 1 brings exactly 1 marine to location A
¤ Set Switch 1
Actions:
¤ Display Text: You cannot carry more than 1 gas at a time.

-----------------------------------------------------------------------------------------------
Trigger
Conditions:
¤ Player 1 accumulates exactly 1 vespene gas
¤ Player 1 brings exactly 1 marine to location B
¤ Set Switch 2
Actions:
¤ Display Text: You cannot carry more than 1 gas at a time.

-----------------------------------------------------------------------------------------------
And yes I just magically understand switches now dots.gif lmfao.gif
Report, edit, etc...Posted by (U)Bolt_Head on 2004-10-19 at 03:13:41
QUOTE(xtremebob @ Oct 19 2004, 12:10 AM)
And yes I just magically understand switches now dots.gif  lmfao.gif
[right][snapback]86492[/snapback][/right]


Uhh yeah your gettin there. . .

Here let me show you a better way to do it.

Trigger
Conditions:
¤ Current player brings at least 1 men to location A
¤ Switch 'ore' is clear
Actions:
¤ Add one ore for player 1
¤ Set Switch 'Ore'


Trigger
Conditions:
¤ Current player brings at least 1 men to location B
¤ Switch 'ore' is clear
Actions:
¤ Add one ore for player 1
¤ Set Switch 'Ore'


Trigger
Conditions:
¤ Current player brings at least 1 men to location A
¤ Switch 'ore' is Set
Actions:
¤ Display Text "You already got ore foo"


Trigger
Conditions:
¤ Current player brings at least 1 men to location B
¤ Switch 'ore' is Set
Actions:
¤ Display Text "You already got ore foo"


Understanding switches kinda has a weird pattern, your at the first step (just learned there purpose).
Generally when people are at your stage they massively overuse switches, like you did above. When you start to learn them better you will realize more purposes for them, better ways to use them and how to use less. Then you will get the the point where you realize how not to use them at all (for example it is likely the accumulate condition can compleatly replace your switch)

With your example the switches do not prevent a person from getting ore from both places. If some one spent there ore after receaving it from location A, then they would receave ore again when they go to location B. If that is what you want then you shouldn't have used switches at all.

I don't know if this was done by accident or not but the way you have it set up someone will only receave the error message if there on the oppset place they were when they got the ore. So if they leave location A then come back to it they won't get a error message. My method doesn' have that issue but instead you might complain that it will start giving you the error message as soon as you get ore and your still standing on the location. However i belive there are better ways to overcome that little obstical to avoid using more than one switch. And since you would have to set up the seperate switches for each player it would be annoying to have to make more than you need too.

Well i hope my babble was actually helpfull to you good luck learning switches.
Report, edit, etc...Posted by Basan on 2004-10-19 at 07:26:14
QUOTE(Bolt Head)
With your example the switches do not prevent a person from getting ore from both places. If some one spent there ore after receaving it from location A, then they would receave ore again when they go to location B. If that is what you want then you shouldn't have used switches at all.


That's what I though in the 1st place. blink.gif
The trigger will work even with the switch in it... I would've made it the same way u did. happy.gif
Report, edit, etc...Posted by CheeZe on 2004-10-19 at 08:01:33
Can't you move the location around so you don't have to use 10 triggers?
Report, edit, etc...Posted by xtremebob on 2004-10-19 at 15:31:08
Nope, the gas is used to upgrade your guy, but you need to find the ten locations if you want to fully upgrade your guy.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-10-19 at 20:21:10
QUOTE(CheeZe(U) @ Oct 19 2004, 07:01 AM)
Can't you move the location around so you don't have to use 10 triggers?
[right][snapback]86541[/snapback][/right]


There are alot of things you could do. But i think were trying to keep it somewhat simple. It is no use telling people triggers they do not understand. Sure they can copy it but they learn nothing from it.
Report, edit, etc...Posted by Nozomu on 2004-10-19 at 20:23:58
True, he could use 2 triggers, one checking to see if the unit was in the location, and one continually moving the location around the map, centering it on burrowed neutral units or something. But that's overdoing it for such a simple concept.
Next Page (1)