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 / Level to Level

Author
Message
Teabone
Valued Member
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 6th Dec 2011 08:19
Hey there all I was just wondering what options I have in terms of going from level to level. I would like it so I can have certain set objectives in a level carry on to another level. Is there a way to have data be stored between levels? As to carry on your current health, ammo, guns, keys etc. - to the second level?

gozzy1999
13
Years of Service
User Offline
Joined: 11th Jun 2011
Location: in the closet
Posted: 6th Dec 2011 08:51
I think it does that with guns but i'm not sure about the rest sorry

''Make sure your hands are clean before you point the finger''
Teabone
Valued Member
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 9th Dec 2011 01:09
I'll have to look into data saving. I've seen someone once post something about data saving and loading. But I'm unsure of how to exactly search for that. The search here... isnt the best

gozzy1999
13
Years of Service
User Offline
Joined: 11th Jun 2011
Location: in the closet
Posted: 11th Dec 2011 21:10
i know try using the google custom search it comes with more results.

''Make sure your hands are clean before you point the finger''
angusm3
15
Years of Service
User Offline
Joined: 6th Mar 2009
Location: Right behind you...
Posted: 11th Dec 2011 21:27 Edited at: 19th Jan 2012 02:47
use variables
anything that you create with the "dimvar=x" command will carry on throughout the game

if you want an objective to be done say dimvar=objective1complete
then setvar=objective1complete 0
then use some other variable commands to manipulate entities to do stuff

for example here
with the new level system (nextlevel=x) you will find yourself encountering enemies you have already killed and keys you have already picked up, but no longer!
this takes a lot of variables, 1 per entity to be affected actually:

;place in enemy script
:state=0:dimvar=ent1dest
:healthless=1:setvar=ent1dest 1
:varequal=ent1dest 1:destroy

that will work on 1 enemy in 1 level, you'll have to change the ent1dest to ent2dest and ent3dest and so on for each enemy

I appear to have burst into flames...
Teabone
Valued Member
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 18th Jan 2012 06:17
I'll give that a shot. Quite new to how FPS scripting uses variables though im familar with them in other coding software.

DoubleRThree
13
Years of Service
User Offline
Joined: 29th Sep 2011
Location: UK
Posted: 18th Jan 2012 17:09 Edited at: 18th Jan 2012 17:13
Two ways to record player data between levels:

Stock FPSC (V119 BETA5):

I'm NOT SURE if this would work, but it's worth a try.

I'll use health as an example. Setup a variable in the "SetupLevel.ini" called health, and set it to 100. You would then need to create a script that changes that variable for every bit of damage the player takes (Assuming player health starts at 100). You'd also need to script something that sets the health to the variable, I'd go for the nearest 10.

For "SetupLevel.ini"



For Trigger Zone




I'm pretty sure there's a command that allows you to set Player Health, but I couldn't remember it at this time.

RPG Mod

Get RPG Mod from the link below, it can accomplish everything you're asking.

http://forum.thegamecreators.com/?m=forum_view&t=184278&b=21
Teabone
Valued Member
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 8th Feb 2012 10:43
I'm using FPSC 1.19 will there be any conflict with using RPG Mod?

Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 8th Feb 2012 18:33
Nope. RPGmod incorporates v119, so you can choose to use the RPGmod commands or ignore them.

Teabone
Valued Member
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 8th Feb 2012 22:03
Oh so it has v119 in it already? If so I'll defiantly download it. I hear too many good things about it.

Login to post a reply

Server time is: 2024-11-24 01:46:57
Your offset time is: 2024-11-24 01:46:57