Change entity animation if it finds itself on top of a plaform or wall

oldyz

Well-known member
i figured out a way for my blood splatter entities to work by using spawnbind and an offset trick instead of setlayer 5,
but i need this version of the animation to only happen when the blood spawns on top of a platform entity or on top of a wall..

can anyone help?
 
There's a function to find platform below defined coords called checkplatformbelow(x, z, y) with x, y, z are the checking coords. If the function finds a platform, it will return the handle of the platform. You can then decide if finding a platform is enough to be considered as being on top of a platform. Or run more checks to decide being on top of a platform condition.

Then there's a function to find wall at defined coords called checkwall(x,z) with x and z are the checking coords. If there were a wall there, it will return the height of the wall. You should compare blood's y with the height to decide if blood is on top of a wall or not.

There might be more checks needed to decide being on top of a platform or not but those are the basics.
 
@Bloodbane
thanks, i was going to reply until i got a working sample , but i am running into a new obstacle,

i was trying to implement the alternate animations based on branch name first , to later test them using heckplatformbelow
but turns out that my plan may not work, becasue it seems that the way the animations work on the blood entities is at odds with previous examples i have been workig on....

i might have to re-name this topic or open a new one to address that problem....
 
Back
Top Bottom