As the title says, is there any way to get the position that a unit died in? I want to have a chance of creating resources at the position an enemy unit died in. The thing here is, I can't use the "Position of Triggering Unit" function here, as enemies in my map respawn after a certain time, and have their custom values set to the position they started in. (This is done to make sure they respawn at the same position they were created in) This means that any units spawned in "Position of Triggering Unit" (the dying unit) function will spawn the resources at the location that the unit started in. Does that make sense?
Anyway, is there another way of doing this? Preferably one that doesn't take up several lines of triggering?
StarCraft II: Annihilation Campaign - A 24 mission single-player campaign featuring unique heroes, custom tracks, boss battles, a varied set of mission scenarios and three intersecting storylines.
I don't think what you said made any sense... Maybe you're having problems because you're using position of triggering unit after a wait action? In that case just store the position in a local variable at the start of the trigger, then recall it later.
Alternatively (Data Solution) you could use a behavior with a death effect of spawning a unit (the resource). To make it a percentage chance, just give it a value of less than 1.
I'm assuming you want resource pallets or something similar to spawn.
every unit has a loot field which does exactly what you want. you dont even need the death response. i must add that Loot does work but you need to set it up correctly (it's not intuitiv)
As the title says, is there any way to get the position that a unit died in? I want to have a chance of creating resources at the position an enemy unit died in. The thing here is, I can't use the "Position of Triggering Unit" function here, as enemies in my map respawn after a certain time, and have their custom values set to the position they started in. (This is done to make sure they respawn at the same position they were created in) This means that any units spawned in "Position of Triggering Unit" (the dying unit) function will spawn the resources at the location that the unit started in. Does that make sense?
Anyway, is there another way of doing this? Preferably one that doesn't take up several lines of triggering?
StarCraft II: Annihilation Campaign - A 24 mission single-player campaign featuring unique heroes, custom tracks, boss battles, a varied set of mission scenarios and three intersecting storylines.
Starcraft II: A War Story Campaign - A multi-act campaign with custom factions. Follow my discord for updates: https://discord.gg/Ztu44gZ
If you want to see a list of other awesome campaigns, go to: Custom Campaign Initiative
every second game time, move point (A) to (position of (unit X))
unit X dies, turn (above trigger) (off) and create (resource field) at (point (A))
I don't think what you said made any sense... Maybe you're having problems because you're using position of triggering unit after a wait action? In that case just store the position in a local variable at the start of the trigger, then recall it later.
Alternatively (Data Solution) you could use a behavior with a death effect of spawning a unit (the resource). To make it a percentage chance, just give it a value of less than 1.
I'm assuming you want resource pallets or something similar to spawn.
every unit has a loot field which does exactly what you want. you dont even need the death response. i must add that Loot does work but you need to set it up correctly (it's not intuitiv)