I've been making my own map and have made some good progress on it, but now I've hit a snag.
In my game, the character must collect meat to eat, but also scrap metal to build things. I have given the hero and ability called "Eat Meat". "Eat Meat" can only be seen and used when there is meat in the inventory... so that's ok so far!
But how do I tell the game that, once this ability has been used, one "Meat" must be removed from the inventory?
Whilst that is a good idea, I also need this sort of thing for the building later on in the game. If the player picks up 3 pieces of scrap metal, he can build a structure, therefore I would need to remove 3 scrap metal from inventory.
Well, there is no trigger that allows you to do that. Maybe you can do something with the trigger that allows you to move items to different inventories.
I would've thought a trigger that allows you to reference specific items would have been necessary... damn, I'll have to think of an entirely different gameplay mechanic now. Thanks for your help, though, I appreciate it.
You mentioned earlier making the meat a consumable... how would I go about that?
for the 3 scrap stuff, use the condition number of units in Scrap units carried by your hero >= 3 and if its true, pick all units in the inventory and if the picked unit is scrap, remove it and set a counter +1.
then break the loop if the counter is 3.
Enable Liberty.SC2Campaign under dependencies and then take a look at the Healing Potion items, those are items with charges, too. Just modify them to suit your needs.
Edit: Be careful when you use Talon0815's trigger, because it will remove the scrap metals nonetheless, when you use the ability and you only have 1 or 2 of them.
This has been a great help, but I've just hit one snag.
I've got the entire trigger set up as you have it there, but in the area where I must input the action of my unit building, how do i do that? He has an ability to build a certain structure, how do I get an action such as "on activation of this abiility..." or some such?
When I click the item in the units inventory, it creates both a firebat and hotwheels unit. I can't seem to figure out why. If the conditions are being met, then why is running the other trigger.
Hey there,
I've been making my own map and have made some good progress on it, but now I've hit a snag.
In my game, the character must collect meat to eat, but also scrap metal to build things. I have given the hero and ability called "Eat Meat". "Eat Meat" can only be seen and used when there is meat in the inventory... so that's ok so far!
But how do I tell the game that, once this ability has been used, one "Meat" must be removed from the inventory?
Any help would be GREATLY appreciated!
You could make the meat a consumable item with 1 charge and just remove the ability from the unit.
@LonZealot: Go
Whilst that is a good idea, I also need this sort of thing for the building later on in the game. If the player picks up 3 pieces of scrap metal, he can build a structure, therefore I would need to remove 3 scrap metal from inventory.
Well, there is no trigger that allows you to do that. Maybe you can do something with the trigger that allows you to move items to different inventories.
@LonZealot: Go
Wow, really?
I would've thought a trigger that allows you to reference specific items would have been necessary... damn, I'll have to think of an entirely different gameplay mechanic now. Thanks for your help, though, I appreciate it.
You mentioned earlier making the meat a consumable... how would I go about that?
for the 3 scrap stuff, use the condition number of units in Scrap units carried by your hero >= 3 and if its true, pick all units in the inventory and if the picked unit is scrap, remove it and set a counter +1. then break the loop if the counter is 3.
@Talon0815: Go
Thanks for the quick response... but how do I do this?
I figure this could also be applied to the meat logic.
Sorry for being a bit of a noob at this stuff, but could you tell me how that would be done?
Sorry to quote myself, but I was wondering if anybody could help with this issue?
Additionally, is it possible for the following:
My unit has a build ability. It requires the following in an inventory:
Scrap Metal Power Battery
If he has these two, he should be able to build a Charging Station. How do I then get the game to remove these resources, as they have been used?
You could do that with the same method like the 3 scrap things. Look at the attachment to see how a trigger for this could look like
@Talon0815: Go
Thanks a lot, that's very helpful :)
As for the meat, I've decided to go the consumable item route.
"You could make the meat a consumable item with 1 charge "
How would I go about doing this?
Enable Liberty.SC2Campaign under dependencies and then take a look at the Healing Potion items, those are items with charges, too. Just modify them to suit your needs.
Edit: Be careful when you use Talon0815's trigger, because it will remove the scrap metals nonetheless, when you use the ability and you only have 1 or 2 of them.
@Talon0815: Go
This has been a great help, but I've just hit one snag.
I've got the entire trigger set up as you have it there, but in the area where I must input the action of my unit building, how do i do that? He has an ability to build a certain structure, how do I get an action such as "on activation of this abiility..." or some such?
sorry to jump in this thread, but I have a similiar question / problem.
I have triggers very similiar to the one posted above:
http://img716.imageshack.us/img716/4793/capture1jg.png
http://img841.imageshack.us/img841/6898/capture3r.png
When I click the item in the units inventory, it creates both a firebat and hotwheels unit. I can't seem to figure out why. If the conditions are being met, then why is running the other trigger.