21 posts Antarctica!... uhh... sorry, Australia. joined
#1
Charged-up Item stacking? What?
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?
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.
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.
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.
21 posts Antarctica!... uhh... sorry, Australia. joined
#9
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?