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 Product Chat / Enemy won't die

Author
Message
Andy123
3
Years of Service
User Offline
Joined: 17th Aug 2021
Location:
Posted: 29th May 2022 01:30
I'm using FPSC classic and mucking around with the basic Scifi theme. Nothing fancy.

I have a situation where certain enemies won't die. I've shot them enough for them to be dead, and they drop their gun as though they are. The trouble is, they keep coming at me with their hands cupped as though they're still holding a gun, and are still able to somehow shoot.

I've changed them to explodable, and sure enough they explode when they've taken sufficient damage. However, when the smoke clears they're still standing there, hands cupped holding an invisible gun, still shooting at me.

I figured the problem might be that there's too much stuff in my level, and the game isn't able to parse the destroy script properly. I've cleared out excess entities and simplified my level, but it hasn't fixed it. I've created a destroy script which is essentially just ":state=0:destroy" but nothing has changed.

This makes me think the game isn't looking at the destroy script all. That being the case, I can't have been the first person to experience this problem.

If it helps, this is only happening with enemies who don't spawn at the start. I use a trigger zone to spawn them.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 29th May 2022 16:47
Hello Andy123 First, this is clearly a "scripting" question. You might get quicker/better results if you post this next time in the "scripting" forum section.
But your issue is certainly a new one for me? You say the "destroy" script may or may not be activating? And the NPC's are definitely being damaged by the weapon?
Just so we know, what version of fpsc are you using ? A vanilla fpsc version or a modded one?
** WHERE'S MY eXplosys ? **
Andy123
3
Years of Service
User Offline
Joined: 17th Aug 2021
Location:
Posted: 30th May 2022 08:16
Thanks for responding. I wasn't sure about this being a scripting issue. It seemed like the game wasn't utilising the script in the first place, and wondered if it was a known bug with potential work arounds.

NPCs are definitely being damaged. After taking a certain amount of hits they drop their weapon as they would back when everything was working and they'd die (take weapon = yes). Just to make sure, I set "Explodable" to yes. Now when they take enough hits there's an explosion as well as a weapon drop. Whether its fadecorpse.fpi, leavecorpse.fpi or my own which is essentially the destroy command, the script is not being looked at. NPCs continue running around kicking my butt with invisible weapons.

Side note: if you're after a hectic, exciting game-play experience, just have your enemies not die.

And yes, totally vanilla FPSC. No mods.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 30th May 2022 14:18
Andy123
Quote: "And yes, totally vanilla FPSC. No mods."

So just to be sure, your using maybe V1.20? That was the last release that I know of.
Check to make sure, the npc's are not "spawning" again right after dying, correct? ( I've had that happen )
Try this, have you made a very simple flat level and tested a character all by themselves? No other scripts running that might interfere.
I see also you joined fpsc Discord, great. There's a lot of other members that can help you with this.
** WHERE'S MY eXplosys ? **
Andy123
3
Years of Service
User Offline
Joined: 17th Aug 2021
Location:
Posted: 31st May 2022 12:34
I believe it is 1.2

I've created a simple level with one room, one enemy and one trigger zone to spawn the enemy.
With the enemy set to "Spawn at start=yes" problem does not exist. Enemy dies as he should.
With enemy set to "Spawn at start=no" problem does exist. Drops weapon once he's been shot enough, but still keeps running after me and shooting without a gun in his hands.

The trigger zone's main fpi is "plrinzoneactivateused.fpi" with the enemy's name in the if used section. It works: you step into the zone and the enemy spawns. Not sure why this trigger-spawned version of the enemy has no regard for his own destroy fpi though.
Maxiqueen#23
2
Years of Service
User Offline
Joined: 26th Nov 2021
Location: everywhere
Posted: 12th Jun 2022 16:37
Hallo Andy123 i wanna ask iff you get it fixed i have some similar issues with Respawning enemy´s
????????????
Andy123
3
Years of Service
User Offline
Joined: 17th Aug 2021
Location:
Posted: 20th Jun 2022 11:43
@Maxiqueen#23 while I never figured out why this was happening, I did get onto a workaround. You need to put the contents of your destroy script inside your shoot script. For example, towards the top of the shoot script I put :healthless=1:destroy

It just makes the enemy instantly disappear though. Whatever you want to happen when the enemy runs out of life should go after :healthless=1:

Unarmed/melee enemies didn't have an issue, so the problem probably lies in the shoot script.
Maxiqueen#23
2
Years of Service
User Offline
Joined: 26th Nov 2021
Location: everywhere
Posted: 3rd Aug 2022 03:17
ok thanks Andy123 i think ill need to take a try after i wake up... its late now so thanks
????????????

Login to post a reply

Server time is: 2024-11-17 22:40:40
Your offset time is: 2024-11-17 22:40:40