HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

help on ammo plz

06-20-2003, 01:44 PM#1
Vilex
i am making this map where u r on a mission and u get this boat and it has chainguns... how do i make it so it has clips like in "night of the dead1.1" like the gold would be the ammo on the round and wood would be clips anyone know how to do that plz tell me8)
06-20-2003, 05:02 PM#2
Dead-Inside
I've never played any such kind of map...
And I don't know what the event would be...
But, I'll do the event I think is right for the attack, anyone else has any suggestions, correct me.

E: A unit is attacked
C: Attacking unit = YourMachinegunThingyWhoAttacks(Unit)
A:
Set AmmoCount = AmmoCount - 1
If AmmoCount = 0 do Set ClipCount -1 else do nothing
If AmmoCount = 0 do Set AmmoCount = AmmoValvue

Okay, AmmoValvue is the number of ammo per clip your unit has.
AmmoCount is the number of the current Ammo your unit has.
ClipCount is the current clips your unit has.
What do you want to happen when you need to reload? Auto reload with time or you need to do something?? What will happen when you are out of Clip/Ammo??

AmmoCount is an integer variable with describes the ammo count your unit has, set the initial valvue to whatever ammo-per-clip you want.
ClipCount is also an integer variable, set it to whatever number of clips you want to initialy have.

Regards
Dead-Inside

It's not complete, you need triggers that do something when you run out of ammo, and when you need a new clip...
06-20-2003, 06:37 PM#3
Vilex
ok thx. when the boat runs out of the current clip i want it to wait 5 sec b4 it reloads. and for the ammocount do i need to make it a variable?
06-20-2003, 06:38 PM#4
Vilex
opps forget the variable part wasnt reading carfully
06-20-2003, 06:44 PM#5
Vilex
oh and ya i want the gold to be the ammo and the wood to be the clips
06-20-2003, 07:13 PM#6
Dead-Inside
Yes I know, I'll make you the complete trigger. I just need to know what you want to happen when you have NO clips and NO ammo left, in other words out of shots to fire?

Regards
Dead-Inside
06-20-2003, 08:56 PM#7
Vilex
ok thx alot man. anywayz i want when ship runs out of clips he cant attack anymore hes usless all he can do is just roam around. thats then where il add boxes when u run over a box u get 1 clip of ammo
06-21-2003, 07:57 AM#8
Dead-Inside
E: A unit is attacked
C: Attacking unit = YourMachinegunThingyWhoAttacks(Unit)
A:
Set AmmoCount = AmmoCount - 1
Set PlayerX Gold = AmmoCount
If AmmoCount = 0 do Run (trigger 2) checking conditions else do nothing

Trigger 2:
A: Remove YourMachinegunThingyWhoAttacks(Unit) from the game
Create DummyMachinegunThingyWhoAttacks(Unit) for player X at (Last Removed unit) using default buidling facing
If ClipCount = 0 do Display Text Message: You are out of ammo! else do nothing
If ClipCount = 0 do skip remaning actions else do nothing
Select (Last created unit)
Wait for 5.00 seconds
Set AmmoCount = AmmoValvue (Your initial AmmoCount valvue, shots per clip)
Set PlayerX Gold = AmmoCount
Set ClipCount = ClipCount -1
Set PlayerX Wood = ClipCount
Remove DummyMachinegunThingyWhoAttacks(Unit) from the game
Create YourMachinegunThingyWhoAttacks(Unit) for player X at (Last Removed unit) using default buidling facing
Select (Last created unit)

Now... We need a "Clip Box Powerup"
You need to create a unit for this...

There may be a unit-type for the box, "A Unit-Type ClipBoxPowerup"
E: ClipBoxPowerup(Unit) comes in XXX range of YourBoat(Unit)
A: Remove (Unit in range of YourBoat(Unit)) from the game
Set ClipCount = ClipCount +1
Set PlayerX Wood = ClipCount
Set PlayerX Gold = AmmoCount
If AmmoCount = 0 do run (Trigger 2) else do nothing

Sooo... The DummyMachinegunThingyWhoAttacks doesn't actually attack. It's the exact same unit but it doesn't have an attack.
Anything not clear?

Side Thought, do you need to spawn ClipBoxPowerups or are they pre-placed? (In the editor)

Regards
Dead-Inside
06-21-2003, 05:32 PM#9
Vilex
hey thx alot il try those triggers but for some reason i cant get them right will u make me a map with them in it? il tell u if i can work the triggers or not...
06-21-2003, 05:45 PM#10
Vilex
ummm...some of the triggers dont really make sense...well they do but i need u to specify it like A:unit gruop like that.
06-21-2003, 07:39 PM#11
Dead-Inside
okay, I'll make it for you. Just as an example...
06-21-2003, 08:17 PM#12
Dead-Inside
Okay.. now... I didn't do the "Unit comes within X range of unit X" becuase I am unsure of the correct way to do it. Please ask someone else for that event.
Everything else should work... add some units and test it for me.

Regards
Dead-Inside
06-21-2003, 08:44 PM#13
Vilex
everything works great but am not sure the clips work il try to see if i can make em work
06-22-2003, 06:28 AM#14
Dead-Inside
Oh, rofl... I think I forgot to set the ClipCounts initial valvue.
It should be something like 3, it's initial valvue.
06-22-2003, 06:37 AM#15
Dead-Inside
Sooo... I fixed the initial valvue. This time you can notice the wood is at 3 in the beginning.
It works excellent. You just need to get the boxes up and running. There are 2 bugs I fixed.. One is a "reloading" message and the other is a selection thingy...

Regards
Dead-Inside