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 / Player detected in a trigger zone, restart level

Author
Message
BlueFox
15
Years of Service
User Offline
Joined: 2nd Nov 2009
Location:
Posted: 1st Dec 2009 00:08
I am having a difficult time with a concept I am working on. I have a level where the player has two options to enter a specific area. One is on the main road, the second is a pathway behind some cliffs. Along the road is a character that is "guarding" the road access and I placed a trigger zone (including using the shift+left mouse to make the zone cover a larger area). If the player hits this zone, they are "detected", at which point my hud comes up properly, the sound plays, and when I press the key that the hud shows, it quits the game (as per my script). The hud states "You have failed. You were detected. Press Enter to Continue". Here is the script I am using for the alarm zone:



I then thought I would try to make it so once the "Press Enter to continue" came up and the player does press Enter, it would restart the level. However, from this point forward I have drawn a blank on this. I am not certain how I could best perform this idea, and would like to ask for some guidance or suggestions. Do I want to use checkpoints? And if I do make it so that they are detected, do I subtract a life?

I am not much of a scripter, as I have been learning by trial and error, as well as Mike helping me and teaching me. Now that he is away, I am attempting to learn more on my own.

I would be grateful for some direction.

Thank you

Cathy
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 1st Dec 2009 02:20 Edited at: 1st Dec 2009 02:22


There you go, (the answer if yes kill him and loop back to state=0)

I would suggest (if your using Project blue,Project Green, or Fenix Mod to use the keypressed=x y condition instead of scancodekeypressed)

Also if your game is sort of rpg style you might want to put a black hud up when it subtracts the health so you don't see him (the player) dying and then you can use a few huds that get lighter and lighter (less opacity) to create a fade in effect

BlueFox
15
Years of Service
User Offline
Joined: 2nd Nov 2009
Location:
Posted: 1st Dec 2009 03:18
I had tried the "plraddhealth" but did not add the loop back to state 0. I understand now how it is to work. I will have to have Mike help me with the huds, since he knows more on that than I. That is a part that I have not gone into yet. I will certainly tell him of your hud suggestion and use that idea. I think that would look great.

Thank you for your help and suggestions.

Cathy
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 4th Dec 2009 05:14
For the fade-in effect, using a full-screen black image would work well with the "hudfadeout" command.


The one and only,


BlueFox
15
Years of Service
User Offline
Joined: 2nd Nov 2009
Location:
Posted: 4th Dec 2009 05:39
I am using that exact suggestion Plystire Plus Mike left the manual for scripting/mods on my desktop and I've been busy making some new scripts. I'm having a blast with this.

Cathy
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 5th Dec 2009 05:24
Quote: "For the fade-in effect, using a full-screen black image would work well with the "hudfadeout" command. "


Woops completely forgot about that command.

Login to post a reply

Server time is: 2024-11-25 05:24:02
Your offset time is: 2024-11-25 05:24:02