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.
[10:41 am]
ManCubuS -- Seems like something's broken regarding the site then. Sadge...
[07:36 am]
Oh_Man -- have i ever told u guys my SC2 pro-gamer story
[2026-7-26. : 11:30 pm]
Ultraviolet -- That's strange, it looks like you targeted the base image file (sometimes people make the mistake of just using the imgur page link which doesn't work for embedding) but it still didn't work it sounds like.
[2026-7-26. : 3:34 pm]
ManCubuS -- Used : " [img=https://i.imgur.com/gpOjTuD.jpeg] "
[2026-7-26. : 3:28 pm]
ManCubuS -- Even tried with imgur, doesn't attach.
[2026-7-26. : 3:14 pm]
ManCubuS -- I should try a workaround, thanks! Sadly imgur is blocked in my country for some unknown reason.
[2026-7-26. : 3:05 pm]
NudeRaider -- I think SEN has trouble with https or hotlinking is forbidden. It certainly is nothing about the size, it just fails to get any size. You can get it working if you use imgur and include the actual image link for the img tag. Like this: [img=https://i.imgur.com/ddYqXZa.jpeg]
[2026-7-26. : 11:15 am]
ManCubuS -- Hey fellas! Anyone knows why when I try to upload an image it says "failed to get image size"? I even tried making it so small. Imgur isn't working here and I tried postimg no luck.
[2026-7-23. : 6:40 am]
Oh_Man -- true
[2026-7-23. : 3:16 am]
RIVE -- Still annoyed there was never a trigger to stop or pause wavs.
Please log in to shout.


Members Online: Symmetry