• 🏆 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!

Pick up Weapons with Ammo

Status
Not open for further replies.
Level 4
Joined
Sep 2, 2009
Messages
39
Hi, I'm creating a map there you should be able to pick up weapons.

I want it to work like this:
  1. Picking up an item replaces your start weapon with a new weapon.
  2. New weapon shall use ammo.
  3. Ammo is displayed by an ability. (like abilities with charges do)
  4. Clicking the ability will drop the item.
  5. Picking up an identical item adds ammo to your weapon.
  6. Picking up a different item drops the old item and adds a new weapon.
  7. Picking up a dropped item gives the ammo the weapon had when dropped.
  8. Running out of ammo shall remove the item from inventory.
*note: 1 unit per player, 10 players, two computers (attackers)


Entry 1:
Starting weapon is a bayonet.
When picking up a weapon, a trigger adds an ability.
This ability has charges and an effect that uses a behaviour to suppress the bayonet, and at the same time access the new weapon.
Every attack removes the behaviour and so the ability auto-cast the effect again (validator: unit has behaviour == 0)
Every time you pick up a weapon a Trigger it adds +X charges to the ability.

Entry 2:
When creating a weapon I add a behaviour that stack X times
upon picking up the weapon a trigger reads how many behaviours there is, and adds this to the ability.
I added an ability in a submenu that allows you to drop your main weapon.
When pressed, the ability removes the behaviour that suppresses bayonet and a trigger create the item and add X stack of a behaviour that is equal to your ability's charges remaining.
Added an arrayed string that keeps track of what weapon a unit have.

Entry 3:
When dropping a weapon, the drop ability removes all charges and a trigger creates a weapon and give it X charges of a buff.


  1. Make more weapons and grenades
  2. Difficulty adjustment

Any solution of how to do this would be greatly appreciate!

Map name will be "Horror Mansion" (not out yet)
 
Last edited:
Level 4
Joined
Sep 2, 2009
Messages
39
u could try it with the pickeble items from the bonus mission?

Yeah, I tried that, but since they are relaying on that a unit get close to the item rather then pick it up, they will only have the effect that I can't drop it nor choose what item to pick up. And in addition to that, they don't activate a weapon with them.

Didn't help any but thanks anyway.
 
Last edited:
Status
Not open for further replies.
Top