Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 1,151 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
End Game Screen #434999
01/01/14 16:20
01/01/14 16:20
Joined: Aug 2013
Posts: 101
M
mschoenhals Offline OP
Member
mschoenhals  Offline OP
Member
M

Joined: Aug 2013
Posts: 101
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?

Re: End Game Screen [Re: mschoenhals] #435005
01/01/14 17:21
01/01/14 17:21
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline
Senior Member
xbox  Offline
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
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.

Re: End Game Screen [Re: xbox] #435015
01/01/14 21:14
01/01/14 21:14
Joined: Aug 2013
Posts: 101
M
mschoenhals Offline OP
Member
mschoenhals  Offline OP
Member
M

Joined: Aug 2013
Posts: 101
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.

Re: End Game Screen [Re: mschoenhals] #435016
01/01/14 21:16
01/01/14 21:16
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline
Senior Member
xbox  Offline
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
take out the word function and you should be good to go.

Re: End Game Screen [Re: xbox] #435151
01/03/14 14:42
01/03/14 14:42
Joined: Aug 2013
Posts: 101
M
mschoenhals Offline OP
Member
mschoenhals  Offline OP
Member
M

Joined: Aug 2013
Posts: 101
Thanks xbox, that did work. :-)

Re: End Game Screen [Re: mschoenhals] #435173
01/03/14 17:17
01/03/14 17:17
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline
Senior Member
xbox  Offline
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
No problem, glad I could help. laugh


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1