Staredit Network

Staredit Network -> UMS Assistance -> [SOLVED]Adding gas per second
Report, edit, etc...Posted by JordanN_3335 on 2006-08-30 at 09:30:49
This sounds newbie but how do I make it so that it adds one vespene gas per second and I want it to still to add but when it reaches 1000 I want it so it keeps hitting 999 untill a purchase is done again for example:

Human purchases a unit thats 100 while he has 999gas it goes to 899 and still keeps adding gas.
Report, edit, etc...Posted by Killer_Kow(MM) on 2006-08-30 at 09:34:45
Current player accumalates at most 1000 gas

Set resources: add one gas
preserve trigger

Is that what you mean?
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-08-30 at 10:06:08
What about the "Once per second" part? How many times per second do hyper triggers fire? (i.e. what would you need to do if you were using HTs)
Report, edit, etc...Posted by StarmanJr. on 2006-08-30 at 10:49:29
QUOTE(Lord_Agamemnon @ Aug 30 2006, 06:05 AM)
What about the "Once per second" part?  How many times per second do hyper triggers fire? (i.e. what would you need to do if you were using HTs)
[right][snapback]553455[/snapback][/right]


For that, you'll need to add some kind of death counter.

Condition: Always
Action: Add 1 deaths of 'unit' for current player
Preserve trigger.

Condition: Current player suffered at least 12 (close enough to 1 second) of 'unit'
Action: Add 1 resource.
Set to 0 deaths of 'unit' for current player.
Preserve trigger.

This is just an example trigger.
Report, edit, etc...Posted by Lord-Omega on 2006-08-30 at 11:11:26
You need a number of trigs for this and here are 2.....



Trigger
Description:
Trigger 1
Players:
¤ Player
Conditions:
¤ Player acumaltes at most 1000 resources
¤ Always
¤ Switch "gas" is set
Actions:
¤ Set "player" resources: add 1 gas
¤ Prserve Trigger



Trigger
Description:
Trig2
Players:
¤ Player
Conditions:
¤ Player acumaltes exactly 1000 resources
Actions:
¤ Clear Switch "gas"
¤ Preserve Trigger


that should work

if not, take out the switches
Report, edit, etc...Posted by MoonlighTurtle on 2006-08-30 at 12:17:46
You only need two triggers.

Condition:
Currentplayer accumulates at most 999 gas (may be replaced with Always)
Action:
Add 1 death of X unit for currentplayer
Preserve Trigger

Condition:
Currentplayer accumulates at most 999 gas
Currentplayer has suffered at least 12 deaths of X unit
Action:
Set deaths of X unit for currentplayer to 0
Add 1 gas for currentplayer
Preserve.

The 12 deaths per second only applies if hyper triggers are used.

At most 999 should be used if you want the max to be 1000. Using at most 1000 will make the max 1001.

In the buy trigger you will simply just have the action: Subtract X gas for currentplayer.
Report, edit, etc...Posted by JordanN_3335 on 2006-08-30 at 14:33:56
Sorry must of all got mixed up. I forgot to mention when a player controls a certain unit (example vespene tank) it adds 1 gas per second.

And then when it reaches 1000 I want it so it doesnt go beyond that.
Report, edit, etc...Posted by MoonlighTurtle on 2006-08-30 at 14:36:35
Just add the condition:

Currentplayer brings exactly 1 of X unit to anywhere

or

Currentplayer commands exactly 1 of X unit

To both of the triggers I posted. And in my trigger, the condition Currentplayer accumulates at most 999 gas keeps the max at 1000, it will not add anymore gas above 1000.
Report, edit, etc...Posted by fritfrat(U) on 2006-08-30 at 16:19:45
Use moonlight's triggers.
Report, edit, etc...Posted by Lord-Omega on 2006-08-30 at 16:58:27
ok tested, this works for me


Trigger
Description:
Only trigger
Conditions:
¤ Player commands exactly 1 "unit"
¤ Player accumaltes at least 0 gas
¤ Player accumaltes at most 1000 gas
Actions:
¤ set resources for Player: add 1 gas
¤ Preserve Trigger



it works perfectly, suggest not useing hyper trigger
Report, edit, etc...Posted by Urmom(U) on 2006-08-30 at 17:03:46
That would give the player 1001 gas because the trigger activates still when the player accumulates 1000 gas. The "Accumulates at least 0 gas" isn't needed either.
Report, edit, etc...Posted by Lord-Omega on 2006-08-30 at 17:10:32
well than change it to accumaltes at most 999 gas
Report, edit, etc...Posted by Laser_Dude on 2006-08-30 at 18:48:56
You've received many many responses, the majority all crumbled up in tiny buts, yet alltogether are complete.

I use a similar system in my map, except if the player has 2, he gets 2 gas, all the way up to 255, just using 9 simple triggers.

Here are all the triggers you need.


Trigger
Description:
Trigger 1 - Add Ore
Players:
¤ Note: Feel Free to swap players to your demands
Conditions:
¤ Accumulate(P1,AtMost,999,Ore);
¤ Deaths(P1,AtMost,0,Nuclear Missile);
Actions:
¤ SetResources(P1,Add,1,Ore);
¤ SetDeaths(P1,SetTo,12,Nuclear Missile);
¤ Preserve Trigger();



Trigger
Description:
Trigger 2 - Set Deaths
Players:
¤ Feel free to swap the players again
Conditions:
¤ Always();
Actions:
¤ SetDeaths(P1,Subtract,1,Nuclear Missile);


It's letter for letter in starforge

Easy as pie, unless, of course you're a really bad cook.

I'm also assuming you're using hypers
Report, edit, etc...Posted by Queaven on 2006-09-02 at 08:20:10
dude , use deathcounters for adding gas , and a simply trigger to put 1000 as max



for example if its player 1 , lets use flags for death counters



CONDITIONS
-Always

ACTIONS
-Add 1 death for Flag for player 1
-Preserve Trigger


then u do next trigger

CONDITIONS
-Player 1 has suffered exactly 12 deads of Flag

ACTIONS
-Set resources for player 1 : add 1 gas
-Set death counts for player 1 : set to 0 gas
-Preserve trigger


(IF U USE HYPER TRIGGERS , PUT TO 12 DEADS OF FLAG , BUT WITHOUT THEM , PUT TO 5)


Then u do the trigger for gas max


CONDITIONS
-Player 1 Accumulates At Least 1000 Vespene Gas

ACTIONS
-Modify resources for player 1 : Subtract 1 Vespene gas
-Preserve Trigger




Well , that should add u 1 gas per second over all the game without messing waiting triggers , and gets u a max of 1000 gas. I hope this helped u
Report, edit, etc...Posted by MoonlighTurtle on 2006-09-02 at 08:35:32
Triggers on how to add 1 gas per second were already posted by me and several other people. Also there is no need for a third trigger to keep the max at 1000. Only 2 triggers total are needed.

There's no need to post anything now until the topic starter has replied to all these posts. There's really no more information that needs to be added. His question has already thoroughly been answered.
Report, edit, etc...Posted by roryfenrir on 2006-09-08 at 09:47:20
The first person who replied was right, in my game ff8 battle i had it add 5 gas per second until it was at 500 then it stoped, but after they bought something it went down.

Just do it like this! no switches! no crap!

Accumulate(CurrentPlayer,AtMost,999,Gas);

SetResources(CurrentPlayer,Add,1,Gas);
PreserveTrigger();


Its as simple as that, those other guys are just crazy and have too big of triggers and confusing switches.
(these are starforge triggers btw, you can copy and paste em right off of here)
Report, edit, etc...Posted by Killer_Kow(MM) on 2006-09-08 at 16:16:00
He is using hypertriggers, silly. It won't work.
Report, edit, etc...Posted by Staredit.Net Essence on 2006-09-08 at 16:54:35
Meh. This is stupid. It seems, everytime we come up with a solution, Mini Goose comes up with a counter.

:/
Report, edit, etc...Posted by roryfenrir on 2006-09-08 at 17:21:45
Dude my method works, just use it! Its the VERY easist and i had a game where i had the exact same set up TRUST ME
Report, edit, etc...Posted by JordanN_3335 on 2006-09-09 at 11:03:40
QUOTE(Killer_Kow(MM) @ Sep 8 2006, 04:15 PM)
He is using hypertriggers, silly. It won't work.
[right][snapback]557407[/snapback][/right]


Silly Kow, in this topic I never mentioned hypertriggers in my posts.

QUOTE(trinity)
Meh. This is stupid. It seems, everytime we come up with a solution, Mini Goose comes up with a counter.

:/


Well I guess I just countered the above part but the reason why I asked this was because during the map contest my map required those Gas per second like what is used in those RPGS were it gas per second adds for spells.
Report, edit, etc...Posted by dark_templar_99 on 2006-09-09 at 19:23:03
Wow we can't all agree on anything. Did you want the number to stop on 999 or 1000?
Use "At Most" 999 or 1000 and when it hits that number it will go up 1.

- So to stop it at 999 set it to:
accumulates(Currentplayer, atmost, 998, gas);

- Like the others said, adding:
command(currentplayer,exactly,1,"vespene gas sac");
will make it so you need 1 gas sac.

If you are NOT using hyper triggers this will give you 1 gas every 2 seconds.

- SO, you can say:
setresources(currentplayer,2,ore);
and you will have 2 every 2 seconds, reduce that and that is 1 every 1 second.

You really only need 1 trigger
Report, edit, etc...Posted by Killer_Kow(MM) on 2006-09-10 at 09:34:02
QUOTE(Mini_Goose_2707 @ Sep 9 2006, 12:03 PM)
Silly Kow, in this topic I never mentioned hypertriggers in my posts.
[right][snapback]557805[/snapback][/right]


Then what was wrong with my first post? (Besides the 1000 thing)
Next Page (1)