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 / project blue timelapse

Author
Message
Shakleford
FPSC Reloaded TGC Backer
14
Years of Service
User Offline
Joined: 15th Jun 2010
Location: on the flip side
Posted: 27th Jul 2010 02:42
I was wondering what does the timelapse script do or how to get it to work. I hit Ctrl like with the timflow script but nothing seemed to change. I changed varioable in it and nothing seem to change.

My name is Shakleford, Rusty Shakleford, I refuse to speak without my attorny present. I am Mr. Shaklefords attorny Rusty Shakleford, my client pleads insanity.
PW Productions
15
Years of Service
User Offline
Joined: 13th Mar 2009
Location: sitting in a chair.
Posted: 27th Jul 2010 05:27
Did you assign the script to a dynamic light with a range of zero?

And it should make a difference, bullets and shooting will not be effected, however the player, the environment and enemies will be.

Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 27th Jul 2010 11:57
@PW Productions, he's talking about timelapse, not timeflow.

The manual states that:

TimeLapse = X
This condition will return TRUE X times per second

And honestly, I've got no idea what it could be used for.


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
PW Productions
15
Years of Service
User Offline
Joined: 13th Mar 2009
Location: sitting in a chair.
Posted: 28th Jul 2010 01:35
Oh. Sorry, don't even know what time-lapse is.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th Jul 2010 04:19
The timelapse condition would be useful for keeping your scripts in line with the timerbased system.

Since the timerbased system of PB keeps everything running at a speed that would be most consistent with 30fps, then using "timelapse=30" would make sure that line of code would only execute 30 times per second. It's an even easier alternative to muddling with timers to have certain lines only run... once or twice per second, for things like slow healing.

Remember, scripts run as FAST as they can. If your game is currently running at 134fps, then your script is being executed 134 times per second. But maybe you don't want parts of your scripts to be running that fast. You could use timelapse to ensure they only happen a certain number of times per second. It's kind of like capping a single line of code to a framerate, without altering the game's framerate.


It can be used in a multitude of ways, but the best way to use it is your own way.


AFTER-THOUGHT:

It just occured to me to go and check the code, because I honestly could not remember how I went about coding that command, lol.
This brings up a very important note for everyone.

You should make sure that your script only uses ONE timelapse command at a time. It uses an entity variable to track how much time has ellapsed since it executed last. Having more than one of them running at the same time (in the same script) would cause problems and only one of them would work (Either the one with the highest number, or the one that is higher up in the script (closer to the first line))

Example:


State 1 is fine, as it will not interfere with the other timelapse conditions (Since it is in it's own state). However, it is LIKELY that the second line of state 2 will execute first, since it is running at a higher rate (60 times per second as opposed to 30 times per second) and the script will likely end up in state 4 and never see state 3.


Hope that all made sense.


The one and only,


Login to post a reply

Server time is: 2024-11-24 21:46:37
Your offset time is: 2024-11-24 21:46:37