• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Charged-up Item stacking? What?

Status
Not open for further replies.
Level 3
Joined
Oct 14, 2004
Messages
33
Yo,
The map I'm making at the moment, it's one based off the 'Real Life' maps, is gonna have weapon items in it. I know how to put the items at a set number of rounds for a gun, say 8 shots for a pistol, but I don't know how to stack the items so they don't fill up your inventory.
So if somebody had a shotgun with 4 shots, I wanna be able to make it so when they pick up another 4 shots, instead of adding another shotgun to their inventory, the original shotgun goes from 4 to 8 rounds. Did that make sense? And if it did, can somebody tell me how to do this?

Thanks,
-Jase
 
Level 8
Joined
Apr 3, 2004
Messages
507
It takes a few basic triggers that run all the time.

When you make your shotgun item, make it a charged item with as many charges as you want the player to possibly be able to carry.

Then, when you get your first shotty, change the quantity of charges (via an "Item" action) to 4. Whenever you get a shotgun after that, change the number of charges on the existing shotty to the number of current charges + 4, and remove the new shotty item.
 
Level 3
Joined
Oct 14, 2004
Messages
33
Thanks for the help, but could you explain it like this please?

Events
Conditions
Actions

This would make it a little easier to understand for me.
 
Level 9
Joined
Sep 8, 2004
Messages
633
Code:
Events: 
Unit - a unit aquires an item

Conditions:
none

Actions:

If/then/else - multiple conditions
If - Unit has item of type (shotgun)
Then - Item Remove (aquired item) from the game
        - Item add 4 charges to (attach a variable to each weapon picked up...)
Else - do nothing

That should do the basics.... that is code done without the editor though.
 
Level 3
Joined
Oct 14, 2004
Messages
33
I couldn't find the If/Then/Else conditions or actions. Could you try it out and tell me them again so I can find them please?
 
Level 8
Joined
Apr 3, 2004
Messages
507
For the love of Pete, open the trigger editor up, make a new trigger, and make a new action in that trigger. Almost right away there's the action "If - Multiple Actions".

In order to be able to develop triggers, you're going to need to be willing to dive in and try things out before running for help. There's simply too much for people to tell you how to do everything.
 
Level 3
Joined
Oct 14, 2004
Messages
33
Let me redefine what I meant before you go flaming my mapping skills.
I could find If/Then/Else in the Actions menu, but I couldn't find the
"Unit has item of type"
"Remove (aqiured item) from the game"
or "Item add 4 charges to (variable)"
Okay? Now could you please tell me the correct actions and conditions to use in the If/Then/Else function?
 
Status
Not open for further replies.
Top