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
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 1,086 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
losing a life and restarting #128394
05/06/07 18:22
05/06/07 18:22
Joined: Oct 2005
Posts: 42
A
aslan123 Offline OP
Newbie
aslan123  Offline OP
Newbie
A

Joined: Oct 2005
Posts: 42
hi
say you have 3 lives, you get killed and you want to restart the level but with one less like and if you have no lives left, put up a splash screen saying game over and loading the menu

does anyone know how to code this

Re: losing a life and restarting [Re: aslan123] #128395
05/07/07 01:12
05/07/07 01:12
Joined: Mar 2005
Posts: 725
USA
TeutonicDarkness Offline
User
TeutonicDarkness  Offline
User

Joined: Mar 2005
Posts: 725
USA
Quote:

hi
say you have 3 lives, you get killed and you want to restart the level but with one less like and if you have no lives left, put up a splash screen saying game over and loading the menu

does anyone know how to code this





I have the method to do this
minus the splash screens ( thats easy ) but it for
the now considered out of date A5 templates.


It involves heavily modifying the origianl A5 template scripts.

If you told which version you use A5/ A6, A5 templates, A6 templates,
etc.....

it would help....


*** Teutonic Darkness ***

Re: losing a life and restarting [Re: TeutonicDarkness] #128396
05/07/07 10:05
05/07/07 10:05
Joined: Oct 2005
Posts: 42
A
aslan123 Offline OP
Newbie
aslan123  Offline OP
Newbie
A

Joined: Oct 2005
Posts: 42
hi im using a6 and im using my own script.

Re: losing a life and restarting [Re: aslan123] #128397
05/07/07 11:20
05/07/07 11:20
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
define a life counter first

var life_counter = 3;

and then code a function like this :-

function life _counter_dec()
{
life_counter -= 1;
IF(life_counter == 0) { death_panel.visible = on;}
}

death_panel is the panel shown after death(I hope you know what panels are,else
you can refer the manual)
On this panel add a button which can be clicked to load the mainmenu.

Hope it helps.
cheers!

zazang

Re: losing a life and restarting [Re: zazang] #128398
05/07/07 16:25
05/07/07 16:25
Joined: Oct 2005
Posts: 42
A
aslan123 Offline OP
Newbie
aslan123  Offline OP
Newbie
A

Joined: Oct 2005
Posts: 42
thanks for your reply

what happens if i have 2 lives left and i want to restart the level but with one less life

Re: losing a life and restarting [Re: aslan123] #128399
05/08/07 02:21
05/08/07 02:21
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
If(life_counter == 2) { restart_level();}

but you have to read the tutorial and manual to know what all needs to be written in that function.


I like good 'views' because they have no 'strings' attached..

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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