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 / Additional HUDs - are they possible?

Author
Message
BoneLord
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 17th Oct 2005 15:04
Hi,

I'm kinda new to FPSC - but I have read the manual and searched the forums, so please bear with me while I try to explain...

I want to create a game where the player can pick up entities that improve their stamina as well as their health. My idea is that if the player's stamina goes below a certain number, the walk speed of the player will slow down - if the player collects items of food (e.g. bananas, bread etc.) then their stamina score goes up by 5, say, until a maximum of 100.

I've already made some progress:

• I've edited the setuplevel.fpi in the languagebank\english\gamebank\mygame\ to include a 'Stamina' hud next to the 'Health' hud - this works fine.
• I've edited the .fpe file for my banana.x model to run a script called "pickupstamina.fpi" which says to add 5 points to the players health score (because there is no 'Stamina' option yet) - this works fine.
• I've created a hud image (with alpha channel) saying "You picked up a banana" and put it in the languagebank\english\gamecore\huds\ folder - this works fine.

My problem - and question - is: how do I tell the game engine that there is also a global setting/variable called 'Stamina' that can be added to and subtracted from depending on which items the player picks up? When you add a 'Player Start' marker and right-click it, you only have Lives, Health, Speed and HurtFall settings - is it possible to add 'Stamina' to this list?

Sorry about the long post - but I've been mucking around with this for about 2 days now without any joy. Any help would be appreciated!

Cheers,
BöneLörd
Deadwords
19
Years of Service
User Offline
Joined: 2nd Feb 2005
Location: Canada
Posted: 17th Oct 2005 17:02
you can set additional huds images and text, but for working custom variables like Stamina, i dont know if it can be scripted. I will try to see.

=-{SKaleX}-= Current Projects: -Insane Killer-=-Chaos Zone-
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 17th Oct 2005 17:03
As far as I know - nope. Although someone might beable to make some new script commands for you (or you do it yourself) with the source code.
Vlad
19
Years of Service
User Offline
Joined: 5th Oct 2005
Location:
Posted: 17th Oct 2005 19:04
There are no variables to use in the script appart from those already there. (Am I making sense at all)?

So, unless you find another way, I can't see how you can do that within the editor.

If you want to change the source code, well, that might be achieved I think.

V
BoneLord
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 17th Oct 2005 21:43
Hi,

Thanks for your help. I've had another thought on how to achieve this if all the variables are hard coded into the engine:

As my game is more of a 'puzzler' than a 'shooter', I won't be giving the player any guns or ammo. I could maybe edit the ammo hud to be the 'Stamina' hud and also the .fpe of the banana entity to say 'isammo' and add or subtract values according to pick ups.

Maybe that'll do the trick? It's worth a go...

BöneLörd
Vlad
19
Years of Service
User Offline
Joined: 5th Oct 2005
Location:
Posted: 17th Oct 2005 22:39
Actually it's a very nice idea.

Good luck!
Merranvo
19
Years of Service
User Offline
Joined: 24th May 2005
Location: That ^ is a Orange
Posted: 19th Oct 2005 23:20
activateifused??? anyone remeber that???


:activate=1:incstate=1
:timergreater=1000:timerstart,decstate=1

"ye oft de adopte early shalt move mountains, and be gods among men"

He who knows everything knows nothing at all.

Login to post a reply

Server time is: 2024-11-23 13:00:29
Your offset time is: 2024-11-23 13:00:29