Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Need Help With Ammo System
Need Help With Ammo System
Aug 3 2009, 4:07 am
By: Phenix53  

Aug 3 2009, 4:07 am Phenix53 Post #1



I could use a bit of help as I am stuck right now, and this site looks promising.

I am trying to create an ammo system like this;
-A full clip is 75 gas.
-If you kill a unit you lose 3 gas.
-If you reach 0 gas, you cannot attack anymore.
-To reload, you build a Corsair, this sets your gas at 75 again.
-Process repeats.

I have a system kind of worked out, but I have run into problems. I want to see how you would do it, as I am completely out of ideas. Please help me out.

Thanks,
Phenix



None.

Aug 3 2009, 5:23 am samsizzle Post #2



http://www.staredit.net/wiki/Ammo_Systems
This should help you out. Im kind of busy right now so thats all for now.



None.

Aug 3 2009, 6:01 am rockz Post #3

ᴄʜᴇᴇsᴇ ɪᴛ!

FYI, this is very easy to do. Why 3 gas though?

Also, note that you can only detect when the unit dies through normal means, you can't detect when the unit actually attacks via simple triggers (unless it's always 1 hit kills).

The wiki should help you out tremendously. If it doesn't, ask for clarification on the part you don't understand. Also, you seem to be thinking very well in terms of triggers, since they are simply IF THEN statements.

For example:
-A full clip is 75 gas. - If current player has at least 1 gas
-If you kill a unit you lose 3 gas. - if current player score is some number (see kills to cash
-If you reach 0 gas, you cannot attack anymore. - if current player has exactly 0 gas
-To reload, you build a Corsair, this sets your gas at 75 again. - if current player commands at least 1 corsair



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Aug 3 2009, 6:46 am Phenix53 Post #4



Wow, thanks for the reply's guys. I feel so dumb, lol. I can't believe I missed that.

samsizzle,
Thanks for directing me to where I needed to go.

rockz,
Thanks for the reply and help. I understand now, and yes, it was actually very easy =P
To answer your question about "Why 3 gas?" Well... It's just numbers =P Makes it look more like a clip of ammo. You know what I'm saying?

Anyways, thanks guys. I'll let you know how it works out.

EDIT: Works great, thanks guys.

Post has been edited 1 time(s), last time on Aug 4 2009, 5:09 am by Phenix53.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-9-25. : 2:22 pm]
Oh_Man -- https://youtu.be/Lfo4C0xzU04
[2026-9-25. : 12:00 am]
Oh_Man -- he hasnt won a single game so far this is hilarious
[2026-9-24. : 11:41 pm]
Oh_Man -- new arty username Rage Against The Machine
[2026-9-24. : 10:14 pm]
Oh_Man -- https://m.youtube.com/watch?v=KPXri8q9ZBs artys vsing the bot now
[2026-9-24. : 8:12 pm]
Ultraviolet -- do you even lift bro?
[2026-9-23. : 5:21 pm]
NudeRaider -- Oh_Man
Oh_Man shouted: NudeRaider yeh thts straight up cheating
the mutas yes, the wraiths probably not. Have you even watched the video? ;)
[2026-9-23. : 12:56 pm]
Oh_Man -- NudeRaider
NudeRaider shouted: Oh_Man Artosis hasn't caught on how devastating the perfect focus fire is. With the mutas he was like "the Mutas always seem to have less hp than against a human". But he didn't notice that the flock he had selected always just had one muta that was hurt. Same with the wraiths here. He's talking about how valks+wraith is gonna destroy Pluto's valks, then 5s later he's dumbfounded the human player's air is just gone and he never figured out why. And for some reason didn't even think to go back and look at the battle.
yeh thts straight up cheating
[2026-9-23. : 12:24 pm]
Oh_Man -- arty's done another vid. he's also announced he's going to organise showmatches with pro, with NO maphacks, so we can see its actual capabilities
[2026-9-23. : 10:09 am]
NimoStar -- It can by playing the same map thousands of times. It is similar to AI speedrunning games
Please log in to shout.


Members Online: O)FaRTy1billion[MM]