Staredit Network > Forums > SC2 Assistance > Topic: [Solved] Destroying an Item
[Solved] Destroying an Item
This topic is locked. You can no longer write replies here.
Sep 1 2010, 10:29 pm
By: Riney  

Sep 1 2010, 10:29 pm Riney Post #1



So I have this trigger that removes a charge every time you reload. Problem is it sets your charges to nobody knows, and turns the item grey. Well the problem is the triggers can still run. How do you destroy an item?

Also. The check box for destroy when depleted, doesnt work because of the trigger I use.



Riney#1693 on Discord. (Discord Community)
Riney on Steam (Steam)
Youtube Channel

-- Updated as of October 2019 --

Sep 2 2010, 12:31 am Temp Post #2



Have a variable keep track of it. Since you are probably doing all additions/subtractions through triggers have a variable that stores how many charges they have. If you are removing charges through an ability then have a trigger which runs when a unit receives an order to use the ability and subtract from your variable.

There might be a better way, I don't have the editor right now to check it out.



None.

Sep 2 2010, 1:42 am Riney Post #3



I ment an action that removes the item from the unit inventory.



Riney#1693 on Discord. (Discord Community)
Riney on Steam (Steam)
Youtube Channel

-- Updated as of October 2019 --

Sep 2 2010, 4:49 am Temp Post #4



You can use the kill/remove unit action



None.

Sep 2 2010, 4:06 pm Riney Post #5



Had a feeling that might work. Good thing theres only one instance of this item type in the player inventory at all times.



Riney#1693 on Discord. (Discord Community)
Riney on Steam (Steam)
Youtube Channel

-- Updated as of October 2019 --

Sep 4 2010, 1:46 am Riney Post #6



Got around to finally testing it and it worked perfectly. This topic can be closed.



Riney#1693 on Discord. (Discord Community)
Riney on Steam (Steam)
Youtube Channel

-- Updated as of October 2019 --

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:36 am]
O)FaRTy1billion[MM] -- u
[04:26 am]
RexyRex -- me
[2020-8-08. : 4:47 pm]
NudeRaider -- F1 2018 currently for free: https://www.humblebundle.com/store/f1-2018-free-game
[2020-8-08. : 10:55 am]
NudeRaider -- the :wob: ? I'm in! :wob:
[2020-8-08. : 8:29 am]
UndeadStar -- Tried magic boxes again, lost :thumbdown: , so back to where I was before trying. Only thing left to do, the ˸wob˸ :wob:
[2020-8-07. : 5:38 pm]
MTiger156 -- :wob: wob n' bob :wob:
[2020-8-07. : 12:43 am]
Wing Zero -- u
[2020-8-06. : 10:34 pm]
RIVE -- :wob:
[2020-8-06. : 9:42 pm]
lil-Inferno -- :wob:
Please log in to shout.


Members Online: Roy, KrayZee