Reactive platform

O Ilusionista

Captain 100K
There is a way to code reactions for platform? Like you once you step on it, it cracks and you fall?

Something which crossed my mind is to code it as an enemy and use a range check on its attack to trigger the crumble animation. Or maybe just a NONE type which makes that check.

What is the best way?
 
I'd say one is as good as another really. Definitely a range check is the way to go. Make it hostile to everything and then you can use aggression to determine about how long the platform hangs around before it crumbles. I say about because there is a random factor in there. If the aggression is super high (instant fall) you can't tell, but as the delay goes up so does the random factor.

Personally I think the random factor would be very cool, but if you want precise timing or your own random just keep the super aggression and do the timing with animations.

DC

 
The only universal location based triggers in OpenBOR are out of bounds thresholds and groups. If an entity goes outside the screen boundary a certain distance along the X axis or to a certain Y depth they are killed. The latter is how pits work. Other than that there is really no type of location based trigger <you step here and this happens> at all in OpenBOR.

We started to add them, but then quickly realized if we did, it would just be the exact same thing entities are already doing (checking for objects in specific range on every update). For now we decided it was better for authors to leverage that rather than add more engine code.

DC
 
for this i used platform with attack in idle animation , it had follow configured and noreflect so player won play pain or fall, follow anim is platform being destroyed.
 
Back
Top Bottom