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 / Story on death.

Author
Message
Titch gamer
17
Years of Service
User Offline
Joined: 10th Oct 2007
Location: Cyberspace
Posted: 10th Oct 2007 20:41
Hi all! Sorry ime a noob to all this.
Does anyone know is it possible to activate a story upon the death of a character?
I want to display a intro story upon killing the first enemy in my game.
Any assistance would be greatly appreciated

Same S**t, Different day, Just every day it gets a little deeper.
Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 10th Oct 2007 21:47
I don't know how to do it... But I think that would have to be done with coding...

Plus lag in your game, you couldn't make a firefight and then during it a movie would show... The engine wouldn't handle it... That's what I heard from the FAQ's at the FPSC site.


Titch gamer
17
Years of Service
User Offline
Joined: 10th Oct 2007
Location: Cyberspace
Posted: 10th Oct 2007 22:12
No i didn't want it to pop up in the middle of the firefight. Just upon the death of 1 (the only) guy in the room. Ive managed to get the below idea to work for everything except for the story mode!! (thanks by the way TZap)
Thanks for your v fast response though orrion carn!




In some fps games I have played, you cannot open certain doors until an area in the current level has been cleared of all enemy characters. This is a solution in fpsc.

You will need to select a character and change their fpe file so I suggest making a copy of it and (if it exists) the bin file. Use the copied fpe file in the following process. When you view the entities in the map editor, you should see the copied character available for selection.

Using Wordpad to edit, add the line ifused = box to a characters fpe file in the ;ai section. Box is an entity we will use for a 'counter'.

In this example, I am going to use 3 copies of the same character.

Add the 3 characters to a game and change the destroy script to destroyandactivate.

Add a box entity to the game and change the name to box. Make sure you cannot use or destroy the box. It needs to be dynamic and zero strength (indestructable). Probably does not matter too much about it being movable but also ensure the name of the box is unique.

Add the following script to the box as its Main AI:

desc = Counter

;Triggers

:activated=1:incstate=1,activate=0
:state=3:activateifused=1

;End of Script

Change the IfUsed parameter to Door.

Add a Door to the level and ensure its main ai is doorremote and its name is Door.

When you shoot the 3 characters, the door will open.

You can do this for more characters. For 5, ensure the box script has state=5 in place of state=3.

This does open more ideas (and not just doors!) maybe have a key or weapon upgrade appear.

Also it could speed games up. Only allow progession (and more characters to spawn) once an area has been cleared.

Same S**t, Different day, Just every day it gets a little deeper.
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 10th Oct 2007 23:22
Just add the hud display code in the characters destroy script.

Best.

I'm sorry, my answers are limited. You must ask the right question.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 11th Oct 2007 05:15
try this out:



Save that as a script in the "scriptbank/destroy" folder, then use it as the "Destroy AI" for the guy in the room that you want to kill.

I haven't tested it yet, but basically it's supposed to play a video as soon as the entity dies, then it will destroy the entity. If the entity gets destroyed normally, then you may need to put a timer in there to wait until the video is over with before destroying it.


The one and only,
~PlystirE~

Dammit, Jim! I'm a programmer not a graphic designer!!!
Titch gamer
17
Years of Service
User Offline
Joined: 10th Oct 2007
Location: Cyberspace
Posted: 11th Oct 2007 19:44
PLystire. Worked a treat thanks alot for you're suport

Same S**t, Different day, Just every day it gets a little deeper.

Login to post a reply

Server time is: 2024-11-23 23:22:46
Your offset time is: 2024-11-23 23:22:46