End Game Screen

Posted By: mschoenhals

End Game Screen - 01/01/14 16:20

I'm using the code for level changing from this post:
Level Changing Level Changing
So the player is taken to an end game screen. Works fine when the player makes it to the touch entity but now I want to do the same thing when the player dies. I want to include in the player code something that will call up the function from another script. Is that possible?
Posted By: xbox

Re: End Game Screen - 01/01/14 17:21

Sure, in your player code, where ever you are handling the death sequence, just simply call the function.

Assuming you are using separate scripts, as long as each separate script (player script, level change script) are included using an include statement in your main script, you should be fine.
Posted By: mschoenhals

Re: End Game Screen - 01/01/14 21:14

I double checked the includes and I have the player script and the level change script included. I think it's how I'm calling the function:

function level_Change();

I've included that in the player script but it won't run. My guess is that my syntax is wrong but I don't know how to call the function from another script.
Posted By: xbox

Re: End Game Screen - 01/01/14 21:16

take out the word function and you should be good to go.
Posted By: mschoenhals

Re: End Game Screen - 01/03/14 14:42

Thanks xbox, that did work. :-)
Posted By: xbox

Re: End Game Screen - 01/03/14 17:17

No problem, glad I could help. laugh
© 2024 lite-C Forums