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 / player shot and post effects

Author
Message
Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 12th Jun 2012 06:02
Hello once again,

I am trying to write a player damage script whereas each time the player receives a certain amount of damage The post effect motionsickness runs for a few seconds THen when the players health is below say 150 it's a constant motionsickness until a health pack is found. Here is what I have come up with so far. But it doesn't quite work right and it seems it should be easier than this script.


I also tried a shot damage script and that didnt work either
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 12th Jun 2012 07:50 Edited at: 12th Jun 2012 07:53
This worked for me, although I made a slight adjustment from your original. I do run a script also that allows me to lower/raise my health by increments of 25. When my health value reached the specific amount (less than 499, 399, 300, etc), the motion sickness effect did run for the 7 seconds as specified. At the end when my health was less than 150, it ran until my health went back to 499.




Twitter: @NFoxMedia
Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 12th Jun 2012 07:54
Thanks black, as always, Ill give it a try. I thought I was close. Would the "shot Damage" work as well?
Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 12th Jun 2012 18:21
black,

I tried the edited script in your post what seems to be happening is once the health gets below a hundred. Something really weird happens. My FPS go from about 30 to 5 all everything goes dark and the testgame crashes. I tried editing so that after every 50 health loss the post effect kicks in, I brought the Heathless condition to 1 health then return the script to state=1. Is there an easier way of doing this?
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 12th Jun 2012 18:48
The script I used worked fine for me. No drastic fps loss at all. Mind you I am still in v1.17 so that could be a reason why I never had issues. But it worked just as it should. When I dropped below 150, motion sickness remained on and I used the other script to increase my health in increments of 25 back to 499 (500) which then caused motion sickness to turn off.

As far as an easier way, I am not too sure. You could take a look at some of the health hud packs that a few made a while back (ex: LOTGD I believe made a few). In the setuplevel.fpi script, they have the various lines that check the player health value and show the hud according while hiding other huds. I am not sure if you could do a similar thing and have it there and if it would make a difference.


Twitter: @NFoxMedia
Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 12th Jun 2012 20:34
Black Fox,

I am running 1.19 I wonder if it has anything to do with the Ai from mp 53 which is what I am using. It would be a whole lot easier if you just had an Fpi for the player as well as the other things you can adjust. There has to be a script somewhere or something that tells the engine that a bullet has hit the player and display the image hud. Then of course having a condition like plrhit= or plrshot= would make that possible I suppose.

Thanks for the help. Ill continue to mess around and see what comes out of it.

Login to post a reply

Server time is: 2024-11-24 00:44:37
Your offset time is: 2024-11-24 00:44:37