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 / Shake the camera when hurt. Its posible?

Author
Message
Sopo the tocho
19
Years of Service
User Offline
Joined: 12th Jun 2007
Location:
Posted: 27th Sep 2010 01:01
You know, like in half life when you are hit by an enemy the screen shakes. Can this be done in FPSC? if it is how?


Thanks in advance.

erased
Black Profductions
17
Years of Service
User Offline
Joined: 15th Sep 2008
Location: Argentina
Posted: 27th Sep 2010 03:30
i dont know if it possible, maybe with project blue or 1.17 there is some way to use the recoil to make a script so when an enemy hits you the recoils takes its effect
Just an idea, i dont know if its possible

zeza
18
Years of Service
User Offline
Joined: 27th Jun 2008
Location:
Posted: 27th Sep 2010 04:02
Project Blue has a command called camshake(?)=x, where x is the amount you want the screen to shake

I'd change the world, but I don't have the source code
R.I.P. heltor, we will miss you
Marc Steene
FPSC Master
20
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 27th Sep 2010 06:19
Yes, it's possible with Project Blue. Detect first when the player has lost health, then use camshake.


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 27th Sep 2010 06:52 Edited at: 27th Sep 2010 08:08
Quote: "Yes, it's possible with Project Blue"


You should give the requester the whole information. The command camshake is also available without Project Blue- it is a command in v1.17.

@ Sopo

Here is an example script I took from our development (a snippet of the script). I use it when the player plants explosives. You will notice the command camshake which shakes the camera. I can use this with vanilla FPSC.



Again, this is just a part of a script we have. The concept of the script is when the explosives detonate after 14 seconds (line 190- timergreater=14000), then the next state of the running script goes to line 191 and the command camshake is initialized.

Hope that helps.

- BlackFox

RPG Mod- Create a world full of adventure
Plystire
23
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 27th Sep 2010 08:56
Yes, camshake was initially part of AirMod which has been fully(?) integrated into the official versions of FPSC, so those commands are now available in vanilla FPSC.


The one and only,


Marc Steene
FPSC Master
20
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 27th Sep 2010 17:31
Quote: "You should give the requester the whole information. The command camshake is also available without Project Blue- it is a command in v1.17."


I did give him the whole information. What he wants to do isn't yet possible in stock FPSC as far as I can see (until 1.18 comes out at least which contains the internal variables of Player Health) and if it is possible it will most likely be through a long winded and inefficient work around.

I don't see what information I missed. If he wants the camera to shake when the player has been hit, then what use is it to just have the commands to make the camera shake without the ability to detect if he has been hit?


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 27th Sep 2010 17:52
Quote: "

I did give him the whole information. What he wants to do isn't yet possible in stock FPSC as far as I can see (until 1.18 comes out at least which contains the internal variables of Player Health) and if it is possible it will most likely be through a long winded and inefficient work around."


My point was to show that the reference to Project Blue was not totally accurate. If one uses the camshake command, it is not a Project Blue only command. It is available in the vanilla FPSC v1.17. The work around is not as inefficient as you think. It can be done, and has been done (without either PB or RPG Mod)

- BlackFox

RPG Mod- Create a world full of adventure
Plystire
23
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th Sep 2010 01:03
BlackFox, maybe you can share the script code for detecting when the player lost health? I think that will clear things up.


The one and only,


Sopo the tocho
19
Years of Service
User Offline
Joined: 12th Jun 2007
Location:
Posted: 28th Sep 2010 06:13
Thanks so much everyone.
I cant install any mod (I tried almost every single mod out there) for some reason the FPSC crash if I ever install one of those mods. So I have 1,17 installed. When its 1,18 coming out? can I joint the beta?

erased
Marc Steene
FPSC Master
20
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 28th Sep 2010 06:19
I haven't checked the stock commands recently, but I'd imagine you'd have to construct it like this:

:state=0,plrhealthless=100:camshake=10,etimerstart,state=100
:state=1,plrhealthless=99:camshake=10,etimerstart,state=101
:state=2,plrhealthless=98:camshake=10,etimerstart,state=102

:state=100,etimergreater=500:camshake=0,state=1
:state=101,etimergreater=500:camshake=0,state=2
:state=102,etimergreater=500:camshake=0,state=3

Unless there's another way?


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21

Login to post a reply

Server time is: 2026-07-26 05:22:25
Your offset time is: 2026-07-26 05:22:25