I am making a puzzle map in which I want characters to push and pull objects into position, like in the Legend of Zelda series. I have put together a basic Effect - Target ability that causes the caster to "pull" the object backwards by using force effects to pull the object towards the caster and push the caster away from the object. This part works.
The problem is that I want the units to stop moving when the caster runs into a cliff or building. Instead what happens is the units simply "slide" along the cliff edge until the force persistent expires.
I have tried using a 2nd Create Persistent effect that has one periodic offset - (0, 1) and a period effect of a dummy search. The periodic validator is set to a custom "location pathable" validator. Unfortunately this setup does not seem to have any noticeable effect.
I don't really have any idea what I'm doing wrong or how to begin fixing this.
create the first persistant event at the maximum distance the target can be pushed. as init effect you add a set effect with create another persistant and destroy persistant. the set effect has an validator validating if it is pathable. if it is pathable the set effect won't trigger and you can do your push thingy here now. otherwise this persistant effect is destroyed and a new one with less distance is created doing the same thing again.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I am making a puzzle map in which I want characters to push and pull objects into position, like in the Legend of Zelda series. I have put together a basic Effect - Target ability that causes the caster to "pull" the object backwards by using force effects to pull the object towards the caster and push the caster away from the object. This part works.
The problem is that I want the units to stop moving when the caster runs into a cliff or building. Instead what happens is the units simply "slide" along the cliff edge until the force persistent expires.
I have tried using a 2nd Create Persistent effect that has one periodic offset - (0, 1) and a period effect of a dummy search. The periodic validator is set to a custom "location pathable" validator. Unfortunately this setup does not seem to have any noticeable effect.
I don't really have any idea what I'm doing wrong or how to begin fixing this.
Try setting the "Find" field in the validator to disabled instead of enabled?
@Nahotnoj: Go
create the first persistant event at the maximum distance the target can be pushed. as init effect you add a set effect with create another persistant and destroy persistant. the set effect has an validator validating if it is pathable. if it is pathable the set effect won't trigger and you can do your push thingy here now. otherwise this persistant effect is destroyed and a new one with less distance is created doing the same thing again.