Ok, in my map, there is a passive behavior that units can gain. It is called "Redemption" and works as such:
If unit is below 40% hp, every 1 second the unit has a 35% chance to teleport to safety (to a Hive structure in this case)
I thought I could figure it out but I've been unable to achieve it in the data editor, and I would prefer to not use triggers.
One problem is that I do not quite understand the way targets are passed to different effects.
I tried a behavior "Redemption" that has a periodic effect every 1 second.
The periodic effect is a Search Area, and searches for a Hive within 500 range. I set "launch location effect" to a Teleport effect.
On the "Redemption Teleport" effect (type Teleport), it has a .35 chance, 500 range and targets Target Unit.
Anyway it doesn't work, the best it has done is just cancelled the unit's order queue (since the Teleport effect is flagged to clear it). So I know it's triggering, it just isn't automatically teleporting anywhere.
Anyone know how to get it to target a hive and teleport the unit there?
What do you mean by launch location effect? You need to use the effect for the area. In the field Area+ you add an area and there is also, where you pick the desired effect.
The search effect impacts at Target Unit, but it should probably be Source Unit/Point. The teleport target should be target unit/point, placement around should be source unit, arc should be 360
Ok, in my map, there is a passive behavior that units can gain. It is called "Redemption" and works as such:
I thought I could figure it out but I've been unable to achieve it in the data editor, and I would prefer to not use triggers.
One problem is that I do not quite understand the way targets are passed to different effects. I tried a behavior "Redemption" that has a periodic effect every 1 second. The periodic effect is a Search Area, and searches for a Hive within 500 range. I set "launch location effect" to a Teleport effect. On the "Redemption Teleport" effect (type Teleport), it has a .35 chance, 500 range and targets Target Unit.
Anyway it doesn't work, the best it has done is just cancelled the unit's order queue (since the Teleport effect is flagged to clear it). So I know it's triggering, it just isn't automatically teleporting anywhere.
Anyone know how to get it to target a hive and teleport the unit there?
What do you mean by launch location effect? You need to use the effect for the area. In the field Area+ you add an area and there is also, where you pick the desired effect.
The rest sounds pretty much correct for me.
@Kueken531: Go
Well it is still not working and I can't figure out why.
Here are 3 pictures:
1 of the behavior 1 of the search area effect 1 of the teleport effect
@scmapcritic: Go
Bump.
Remove impact and launch location effects from the search.
In the teleport effect, switch Source with Caster if it wont work.
The search effect impacts at Target Unit, but it should probably be Source Unit/Point. The teleport target should be target unit/point, placement around should be source unit, arc should be 360
@TheAlmaity: Go
That worked out great. Thanks very much. Thanks also kueken.