It looks like you need excellent collision for banging on the snakes head only?
![](/ubbthreads/images/graemlins/smile.gif)
Hmmnnn
Okay, well I would make a special little invisible platform to follow the serpents head at all times. Make the platform out of blocks and in a .wmb file.
![](/ubbthreads/images/graemlins/wink.gif)
Okay next, I would attach an action to this new small little platform to make it follow the serpents head.
action snakehead // Just a little ole dumb head platform
{
while (1)
{
vec_set(my.x, snake.x); // copy snake.x to my.x
vec_set(my.y, snake.y); // copy snake.y to my.y
vec_set(my.z, snake.z); // copy snake.z to my.z
wait (1);
}
}
Now, what does the code above do? Well nothing but simply make the platform to follow the
center of the snake. Yeah, okay, but we don't want the center, but we want the head right?
Perhaps we should adjust the y cooridinate to get it on the head by doing something like below?
vec_set(my.y, snake.y) - 10; // copy snake.y to my.y minus 10
Okay, but your snake needs an action and have to be called an entity named SNAKE.
entity* snake;
action nicesnake
{
snake=me;
//do movement stuff below...
}
Now as far as the jumping goes just make a variable that sets as the player jumps, then make it reset once he hits ground. <not the poor snakey>
Then if that jumping variable is set, then is when you affect the snakes code action to either die or resist.
Anyways, that is how I would do it.
![](/ubbthreads/images/graemlins/laugh.gif)
Oh I forgot, make the invisible platform to be triggered once the player gets near it with a very small value.
![](/ubbthreads/images/graemlins/grin.gif)
This will take some coding to accomplish buddy!
![](/ubbthreads/images/graemlins/smile.gif)