• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Lumber Max for players, TRIGGER HELP

Status
Not open for further replies.
Level 3
Joined
Jun 16, 2004
Messages
36
Im making a map involving Marines and stuff, defending a town, and i need some help.

Im going to have ammo sysem in the game, like it NOTD and stuff, i got that down basily, but im using Lumber as my ammo, and i need some help with that.

First, im going to have at lease 2 classes to start with, but each unit uses different Ammo. Example, my assul marine has 100rounds, while my sniper would more or less use like 10, befor reloading. I also have the reoad system down. But when theyt reload, i dont waht the ammmo to go more the what there gun can carry. SO how would i have it so that if a player pick a assult marinem the map ammo is 100, and if a player picks a sniper, 10 would be the max. Can someone help me?

I am just getting to use varible, so i dont know how they really work, but i have an idea.

Here it is,

If a unit enters reagio(nAssult or sniper unit)

Then Set (varibale)- to 100(or 10 for sniper)

And then, maybe soemthing likes

If (players) Lumber is equal to or greater then (Varable for that player)

Then Set players lumber to (blahblah)

DO i have the basic Idea or am i just plan dumb?
Please help, Ill give credit if you help me! Thanks

ELthanor

BTW, love the forum, keep it up!
 
Level 6
Joined
Sep 17, 2005
Messages
276
yes you are on the right way, thats what i would have suggested you.

for the variable you can set at begin eg when the unit enters the selection-circle or whatever you have:

set maxAmmo[1] to 10 -that would be the sniper
set maxAmmo[2] to 100 -assault-rifles etc....
.....

where maxAmmo[] is an integer array with size of the maximum players you can have on your map.

this should work pretty good - i have used that in my resevil-map too.
 
Status
Not open for further replies.
Top