HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help with my ammo system.

03-08-2005, 09:37 PM#1
Ponzini
Ok basically I am using the food limit for ammo in clip/extra ammo left. Now when someone reloads I need to know how to take whatever is left in the food cap with a max of lets say 125 for Heavy Machine Gun. I also need to find out how to make it so that the food cap will go above 100. I will post my triggers for reference and for any ideas to make my trigger or system better in any way. Thanks for any and all help.

Quote:
Picksup:
Events
Unit - A unit Acquires an item
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item being manipulated)) Equal to Shotgun
Then - Actions
Unit - Replace (Hero manipulating item) with a Marine (shotgun) using The old unit's relative life and mana
Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
Set MarinesUnit[(Player number of (Owner of (Triggering unit)))] = Marine (shotgun)
Player - Set (Owner of (Triggering unit)) Food max to 32
Player - Set (Owner of (Triggering unit)) Food used to 8
Player - Set (Owner of (Triggering unit)) Food cap to 0
Else - Actions

Quote:
Ammo:
Events
Unit - A unit Acquires an item
Conditions
(Item-type of (Item being manipulated)) Equal to Ammo
Actions
If ((Unit-type of (Triggering unit)) Equal to Marine (HMG)) then do (Player - Add 75 to (Owner of (Triggering unit)) Food cap) else do (Do nothing)


Quote:
Reload:
Events
Player - Player 1 (Red) skips a cinematic sequence
Conditions
Actions
Set CurrentClip[(Player number of (Triggering player))] = ((Triggering player) Food used)
Set CurrentAmmo[(Player number of (Triggering player))] = ((Triggering player) Food cap)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MarinesUnit[(Player number of (Triggering player))] Equal to Marine (HMG)
Then - Actions
Player - Add CurrentClip[(Player number of (Triggering player))] to (Triggering player) Food cap
====HERE IS WHERE I NEED TO TAKE LEFT FOOD CAP WITH MAX OF 125====
Else - Actions
Do nothing

Quote:
Attacks:
Events
Unit - A unit Is attacked
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Attacking unit)) Food used) Less than or equal to 0
Then - Actions
Unit - Order (Attacking unit) to Stop
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Attacking unit)) Food used) Greater than 0
Then - Actions
Player - Add -1 to (Owner of (Attacking unit)) Food used
Else - Actions
Do nothing
03-08-2005, 11:36 PM#2
Azhag
To make the food cap go higher, look under Gameplay Constants. I believe it is there. Sorry I can't help on your other problems. Hopefully other people will.
03-09-2005, 01:06 AM#3
Ponzini
Quote:
Originally Posted by Azhag
To make the food cap go higher, look under Gameplay Constants. I believe it is there. Sorry I can't help on your other problems. Hopefully other people will.

What do you mean gameplay constants? Sorry I havent made to many complex maps up to this point and dont know to much yet.

The other problem i thought should have been simple but its more difficult than it looked. I think im going to have to do another If/then and do If food cap < 125 then take a variable set to the players food cap and just take that amount and put it into food used. Yes that should work i hope.

Still need it to let me have more than 100 food cap tho. I thought I could raise food max and that would do it but it didnt work. Either it isnt working or thats not a way I can do it.

EDIT- small mistake
03-09-2005, 02:22 AM#4
Ponzini
NM I found it hehe I guess I gotta learn the editor a bit more. Thanks