Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Reduce Player's Life?

Author
Message
Yearcut
User Banned
Posted: 30th Nov 2009 06:00 Edited at: 30th Nov 2009 08:05
Just wondering if there is a action to reduce plr lives or directly show the game over screen? My game have 3 lives and I want the game to end if the player shot a hostage.


Thanks in Advance! Excitingly looking forward for replies!

Your signature has been erased by a mod. please make it no larger than 9999999 x 9999999
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 4th Dec 2009 05:09
Using vanilla FPSC< I don't believe you can.

Using PB/PG:

(should work)


The one and only,


Yearcut
User Banned
Posted: 4th Dec 2009 09:10
thanks, proud to be an owner of PBUM

Your signature has been erased by a mod. please make it no larger than 9999999 x 9999999
Yearcut
User Banned
Posted: 7th Dec 2009 05:48 Edited at: 7th Dec 2009 06:48
Is there any condition in vanilla FPSC or modded that can check how many lives the player have right now?

Basically I want all the lives to reset every new level, my game is a bit hard so i want to give the player 3 lives every new level. But, the problem is, if i add 3 lives to player (in lvl2) and player have already 2 lives so it the user will have 5 lives which i don't want.

So, I want to check if player lives is less than 3 (say 1), if yes, then i will add 2 lives, but if the player have 3 lives and full health i will not give him any extra lives.

Can it be done?

I just want to reset player lives to 3 in each level.

Your signature has been erased by a mod. please make it no larger than 9999999 x 9999999
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 9th Dec 2009 09:41
The internal variable (PBUM only) called "$PL" is for player lives. Set it, check it, do what you want with it.

Stick this script onto a dynamic light somewhere in the level (or triggerzone) and it will set the player's lives to 3, then destroy itself, so it will only do it once per level.




The one and only,


Login to post a reply

Server time is: 2024-11-25 05:26:33
Your offset time is: 2024-11-25 05:26:33