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 / Quicksave script using up lives?

Author
Message
Sinister Spoon
16
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 24th Feb 2015 18:36
OK NcMako kindly helped me troubleshoot the quicksave/load scripts for my game.

However Ive noticed a problem, while intentionally testing the fail state for this particular section of the game (the trigger event for the quickload) I've noticed It only works as many times as there are player lives. After the 3rd fail it respawns the player at the start marker instead of reloading the quick save.

It goes like this.

Player given gun > Quick Save

Player shoots incorrect target > quick load (works fine)

Player shoots incorrect target 2nd time > quick load triggers, (fine)

Player shoots incorrect target 3rd time > quick load triggers, (fine)

Player shoots incorrect target 4th time > quick load triggers, player respawns at start marker, no weapon, no ammo

Its the strangest thing.

Anyone have any thoughts on this or how I can prevent it?



Thats the script in the 'hostages' destroy slot

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 27th Feb 2015 18:15
Sinister Spoon
By just looking at what you have posted, I think it's doing
what it's supposed to. First you "quicksaves" the game
then by doing a "quickload" when said player kills incorrect
target you do a "quickload" of the level. But doing that I think the player needs to be "killed" first(one lives lost).
Look in the syntax list near the end, you'll find the "Internal Variables" list. One of those is "$PL = Player’s lives"
You could make a script where when the player dies a set
number of player lives is given when the player respawns???
best

My games never have bugs. They just develop random features..
Lots and lots of random features...
Sinister Spoon
16
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 5th Mar 2015 23:24 Edited at: 5th Mar 2015 23:29
Hmmm Im not sure thats quite it, theres no player death or even damage involved here. In script terms in the entites script, it looks for pickobject=1, if that is true and the left mouse button is pressed it triggers the quickload.


Im not using an actual gun remember just a couple .png's, I stopped using the weapong files entirely and coded my own using pickobject so I could more easily control the players weapon by simply turning the huds on and off etc

So its literally on quickload it loads fine the first few times then respawns the player on the last, one thing I have tested since my last post is setting the lives, it would appear that assumption was incorrect as after changing it to 999 lives it still occurred on the 3rd to 4th quickload each time.

The thing is the player cant respawn, it takes away the players gun when the player respawn and the giveplrweapon and resetplrweapon commands dont function in my current version of fpsc, they do function in the version where quicksave works however, so I either build the game in that version with the working quicksave and no ability to give or take the players weapons, or build it in the version where i CAN give and take the players weapon but I wont be able to use quick save.


I've taken the quickload quicksave out completely it was way too much effort for a 30 second joke section essentially. Besides I discovered by accident a few more EVEN better gameplay mechanics to implement instead.



Also as a by product, generated a super small random quest generator. (just a little item fetch quest generator that selects a random greeting, asks for a random item, requires you to bring that item and only that specific item physically to them, provides a random thank you message and a random parting message )

I love how problems in fpsc almost always lead to a work around that provides even more fun than the thing you wanted to do in the first place

smoke em if you got em

Login to post a reply

Server time is: 2024-11-23 08:06:18
Your offset time is: 2024-11-23 08:06:18