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 / [SOLVED] Headshot Script Help

Author
Message
DataPockii
User Offline
Joined: 6th Jan 2021
Location: U.S.S. Enterprise, NX-01
Posted: 7th Jan 2021 21:12
This post has been marked by the post author as the answer.
(Yes I posted this before, I posted it in the wrong topic, my fault. Forums aren't my forte)
I'm using the latest version of the open source installation of FPS Creator Classic with the latest version of the Black Ice Mod.

So before you laugh and say, "Why are you still using FPS Creator Classic in 2021?" First answer, I don't know. Second answer, because it's an opportunity to get a better grasp of scripting.
I've been working two or so days now on a script that checks if the player shot the enemy in the head, and if they did, then how much damage did they do, if they did over 20 damage to the head then combust the head and set enemy health to 0.
However, it's not really working out, like at all. First I could get the head to blow up, make the sound, and kill the enemy, but it wouldn't matter where you hit, if you did over 20 damage then the head would blow up anyways. Trying to fix that, now it just won't do anything at all. I'm still a beginner at speaking FPSC's language, so maybe it's something REALLY simple that I didn't notice. I'm not asking for anyone to do the work for me, but at the very least give me pointers in the right direction, I'm dumbfounded what to do and honestly about 3 more tries away from smashing my OWN head into my desk.

Here's the code snippet :
:state=1:shotdamagetype=1,shotdamage=20:state=105
:state=105:hidelimb=46,bloodspurt=1,state=106,sound=audiobank\voices\Infected\head.wav
:state=106:sethealth=0,aistop,coloff

"Oh YES! I hate this, it is revolting!"
"More?"
"Please!"

The author of this post has marked a post as an answer.

Go to answer

ncmako
8
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 7th Jan 2021 23:22
Hello Datapockii Ok, so your using BIM. I see one of your commands is "aistop" are you using DarkAI scripts by chance?
Also, is your character setup for the "limb" damage in the .fpe ? This is important for this to work correctly.
If you can post the whole script so we can see whats happening and test.
By first glance you have damagetype & shotdamage on the same state line. See the weapon is giving the npc damage anyway, no matter where shot.
Maybe your weapon is set to more than 20 damage with every hit? Try moving it to another state after the damage type. Or maybe adjust the weapons damage?
But first, check your characters fpe for the limb identification. It would look something like this...

** WHERE'S MY eXplosys ? **
DataPockii
User Offline
Joined: 6th Jan 2021
Location: U.S.S. Enterprise, NX-01
Posted: 7th Jan 2021 23:58
Gosh you're a lifesaver! Thanks so much!
"Oh YES! I hate this, it is revolting!"
"More?"
"Please!"
ncmako
8
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 8th Jan 2021 10:50
DataPockii That's great, thanks But what was the answer to your problem? ( so others can see )
** WHERE'S MY eXplosys ? **

Login to post a reply

Server time is: 2021-01-21 10:41:24
Your offset time is: 2021-01-21 10:41:24