Quote: know this is simple but how do I implement that when I touch something it dissapears ? for instance when I touch the snake head I want the sname head to disappear. I know it's my.enable_impact =on; to touch but to make the snakehead to disappear what do I put ?
Hi, The key is "entity.invisible=on;" Here is a way to do it below.
Code:
function headhit // only do this upon impact! { my.invisible=on; }
action snakehead { my.enable_entity=on; my.enable_impact=on;// on impact do function assigned below MY.EVENT = headhit; // assign headhit function to this action
// Now do more movement below in a while loop! }
Of course once the headhit function is entered upon impact, then you need to check the jumping variable and see if the player jumped or not. If not jumping, then exit the function and do not make it invisible and stuff...
So, it will only work if the player is jumping on top of the poor snakey.
Yes, that morphing idea should work for you. Let us know if it does not though...