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.
[02:55 pm]
Voyager7456 -- Splash (Enemy) is what Firebats do - it just prevents damage to your own units
[02:51 pm]
MTiger156 -- ...although in my case its ranged units vs. melee zombies and stuff
[02:50 pm]
MTiger156 -- I thought the "Splash (Enemy)" already does that. I've switched Arclite Shock Cannon ans Psi Storm to that and never had friendly-fire issues in PvE maps.
[02:48 pm]
O)FaRTy1billion[MM] -- they probably found some trickery with EUDs and like player IDs or something
[02:47 pm]
O)FaRTy1billion[MM] -- that's why i'm not sure how they did it
[02:16 pm]
Voyager7456 -- :thinking: nothing jumped out to me after looking at the damage functions
[01:48 pm]
O)FaRTy1billion[MM] -- there are EUD maps with splash that doesn't hit allies, but I'm not sure how they did it
[01:34 pm]
Voyager7456 -- Corbo
Corbo shouted: dem0n's gonna go in first round
We must work to allow the RAWRZ!!! ^_^ Monster the victory it has long deserved O_O
[01:33 pm]
Voyager7456 -- You need to do some GPTP plugin shit if you want to avoid that
[01:33 pm]
Voyager7456 -- Through .dat editing you can have splash not affect your units, but it will always affect other players, even allies
Please log in to shout.


Members Online: jun3hong, Roy, jjf28, lil-Inferno