Why not just give each unit the salvage ability. Just scale it for each one
ex:
salvage for tower 1
cost - .2 min
salvage for tower 2
cost -.4 min
Yes it takes longer but data doesn't have a limit while triggers do (256 or something like that)
but if you still want to do it with triggers
create a switch with a different return for each tower
Ex
switch
if tower 1
Player - Modify player (Owner of (Triggering unit)) Minerals: Add ((Minerals cost of (Unit type of (Triggering unit))) / 5)
if tower 2
Player - Modify player (Owner of (Triggering unit)) Minerals: Add ((Minerals cost of (Unit type of (Triggering unit))) / 5)
Player - Modify player (Owner of (Triggering unit)) Minerals: Add ((Minerals cost of tower 1)) / 5)
I'm watching you
ElBushido Regular ShmoeHi all! My problem would be is how do i sell a tower thats been upgraded from another tower (tower 1 morphed to tower 2) for the 20% of the cost of both towers: Tower 1 = 100 minerals, upgrade to Tower 2 = 100 minerals sell tower 1= 20 minerals refund (20 % of 100), sell Tower 2 = 40 minerals refund (20% of 200). I have the "Sell Tower" button and the trigger :
Sell Tower
Events
Unit - Any Unit uses Sell Tower at Effect4 - Channel stage (Ignore shared abilities)
Local Variables
Conditions
(Triggering ability stage) != Generic4 - Cancel
Actions
Player - Modify player (Owner of (Triggering unit)) Minerals: Add ((Minerals cost of (Unit type of (Triggering unit))) / 5)
So when i sell tower 1 its working but when i upgrade it and sell it still gives only 20 minerals back. I saw "Onetwo" 's tutorial and he is talkin about "(none) - Repair Resource" field that for the love of my life i can't find ( yes i have all the boxes checked like Show advanced fields and stuff)
Can someone tell me how to find that or what other options i have?
Thx!