• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Ammunition system

Status
Not open for further replies.
Level 15
Joined
Jan 31, 2007
Messages
502
I thought of creating an ammunition system for my map.

Such a simple thing with clips and reloading - this is no problem and i definitely dont need help there

But i was thinking of the event the units shoots and releases the bullet...
- I can get the even the projectile hits the target and deals damage
- I can get the event the unit gets the "Attack" Order

But both are not exactly the time the projectile is created (unless you set the "Animation Damage Point" value of the unit in the object editor to 0.00 which looks ugly)

Whats the best way to get this moment the projectile of a ranged unit is created?

I can imagine some modification with the "Unit Gets attacked" and a wait of the "Animation Damage Point"-value of the units and a check of the units order but all these ideas could be abuseable
 
Level 3
Joined
Sep 13, 2008
Messages
63
Second event "unit attacks". Add a timer for however long it takes to get the shot off, then check if the unit is still on the "attack" order. Not perfect but it should work.
 
Level 15
Joined
Jan 31, 2007
Messages
502
I dont know what the "Sniper system" is
yes a system with ammunition as lumber or gold and i need the time when the projectile is created

Yes , i thought of doing it this way with the timer too but if the unit would get an stop order it can have again the attack order when the timer expires (hard to explain)

But i got an idea with storing the No. of the shot in the game and a check of this number
 
Status
Not open for further replies.
Top