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 / Triggering the death of an enemy

Author
Message
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 1st Jun 2007 20:30
OK, I'm still fairly new to FPSC scripting, and I'm not that sure how to do this. Sorry if it's really simple, we were all new to FPSC once, weren't we?

OK, here's what I need, what has to happen is that when you touch the trigger zone, an entity dies.

Let's say you walk in to a room with 5 people in it. You take a few steps towards the door at the other end, and suddenly the five people just drop to the floor and die. Beforehand they were "passive".

Well, thanks for your help.

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 1st Jun 2007 22:08
Or is this sort of thing just not physically possible?

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
pigs can fly
18
Years of Service
User Offline
Joined: 20th Aug 2006
Location: Luxembourg
Posted: 1st Jun 2007 22:19
FPSC doesn't have any command that can decrease the health of an entity.


For all my free FPSC entities!
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 1st Jun 2007 22:24
Yes, OK, but can it instead set them to their "death" animation? I know in Model Pack something (2 perhaps?) there's a zombie doctor, he's dead, until when you walk up to him he gets up off the floor and starts attacking you. Therefore, they must have set it to his death animation????

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
pigs can fly
18
Years of Service
User Offline
Joined: 20th Aug 2006
Location: Luxembourg
Posted: 1st Jun 2007 22:28
search the manual for the right animation. All the necessary commands are listed there. Take an AI script as example. Or ask if someone would make that script for you.


For all my free FPSC entities!
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 1st Jun 2007 22:32
I think you can do it using activateifused=1 in the zone and the character name in the ifused section. They will all have to be named the same.

Then use :activated=1:state=whatever in the character scripts.

Then in :state=whatever add the animation number to make them fall back or whatever, :animate=whatever and frameatend to determine when the animation is where you want it, and suspend to leave the characters down on the floor.

Too much work if you don't need it yourself.

Best.

I'm sorry, my answers are limited. You must ask the right question.

piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 1st Jun 2007 22:32 Edited at: 1st Jun 2007 22:33
Thanks, I'll check that out.

Although if anyone has got a script that could do that, I'd be really pleased and will certainly give credit

EDIT: Xplosys, I'd typed my thing out before I'd read yours, so if this sounds strange then it isn't.

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 1st Jun 2007 22:34
OK, I'll give that a try, but if anyone can easily stick that somehow into Codey format, I'd be chuffed.

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 2nd Jun 2007 12:06
Quote: "I think you can do it using activateifused=1 in the zone and the character name in the ifused section. They will all have to be named the same.

Then use :activated=1:state=whatever in the character scripts.

Then in :state=whatever add the animation number to make them fall back or whatever, :animate=whatever and frameatend to determine when the animation is where you want it, and suspend to leave the characters down on the floor.
"


Would it be something like this in the enemy script? State 11 is Impact Front.



Hmmm, that seems... too simple...

Perhaps I'm right, perhaps I'm wrong.

Don't forget, I am new to this scripting.

Any advice?

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 2nd Jun 2007 14:10
OK, here's what I've done in the trigger "main" script:



And here's what I put in the "ai_die" main script. They're passive, until you touch the trigger zone.



Nothing seems to happen. Any ideas?

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 2nd Jun 2007 14:44
Lol, forget the "::ifused:ai_die" bit, that needs to be in the editor .

Everything else should work .

E.D.

piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 2nd Jun 2007 14:55
Thanks, I'll give that a try.

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 2nd Jun 2007 17:00
HELP!

It's works perfectly, when I don't have the :frameatend:suspend bit at the end.

Without that, they fall backwards, and fall backwards, and fall back again, as you'd expect.

But if you put that it, then when you enter the room then they're sunken half way through the floor, and they don't react to the trigger zone. only the top half of their bodies are showing, the rest has sunken under the floor.

Any ideas? I'll have another fiddle and edit this if I fix it.

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 2nd Jun 2007 17:46 Edited at: 2nd Jun 2007 17:47
Quote: ":frameatend:suspend bit at the end."


The frameatend is to determine when the animation is complete, otherwise they will continue to animate... and the suspend is to keep the character visible on the floor.

Try :state=11,frameatend=0:suspend

for the last line.

Best.

I'm sorry, my answers are limited. You must ask the right question.

piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 2nd Jun 2007 17:50 Edited at: 2nd Jun 2007 17:51
OK, i've phrased that badly, sorry.

Basically they go into their death animation and fall backwards. But they don't stop, it just loops.

Here's what i've put in the code:



XPLOSYS: SORRY! I'D TYPED THAT WHILE YOUR THING WAS BEING TYPED AS WELL, SORRY IF IT SOUNDS LIKE IT IGNORED IT, I HAVEN'T.

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 2nd Jun 2007 17:56
XPLOSYS, now nothing at all happens! They just stay standing there?????

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 3rd Jun 2007 14:11
Anybody got any idea?

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 3rd Jun 2007 21:51
Please? Perhaps someone could try replicating the supposedly correct solution, see if it's not just me?

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 4th Jun 2007 09:47
Ooh, hang on, part of the error may be that I'm using v103 (for very very long, boring, and complex reasons, look somewhere in the bug reports for "Compiler Problems With Lighting"). Perhaps there's no FRAMEATEND command in 103 or it works differently?

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 5th Jun 2007 20:01 Edited at: 5th Jun 2007 20:02
GRRR! If only you could hear the noises of frustration that i'm making!

This is more of a plead for help now. I've tried, I've tried, and I've tried again. As always, to no luck!

Please, please, please, could someone try this on their own FPSC and see the effect that I get? See if it's not just me?

I've been trying this for days now, to no luck. I've tried animationover=1:freeze, frameatend=1:freeze as well as both of those where "freeze" is replaced by "suspend", among about 8 others.

The effect I'm getting is either that they fall over and keep repeating the animation, or that they do nothing at all except be passive.

here is the code (or, one type of it that I've been trying anyway!):



Name your objects "ai_die", make a trigger zone, and in the main scipt area, insert this:



In the "If used" section of the trigger zone in the editor, put in "ai_die". I'm sure you know what to do a lot better than me.

So, good luck. And...

PLEASE HELP! THE FUTURE OF MY GAME DEPENDS ON THIS! SO DOES MY LIFE!

(well, not exactly, but if I still don't get any help then I'll have to say that!!)

Thanks VERY VERY much!

Oh yeah, and obviously I think the animation 11 (impact front) will only work with stock media.

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 6th Jun 2007 19:34
Anyone?

www.ciphersoftware.co.uk

MindLife - v1.0: At the forums: http://forum.thegamecreators.com/?m=forum_view&t=107284&b=25
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 6th Jun 2007 19:47 Edited at: 6th Jun 2007 19:59
Nothing remotely connected to the enemy script works, trying new ideas now .

E.D.

mister shakes
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Amishville
Posted: 6th Jun 2007 20:01
I tried it. Does the same. My conclusions:

1) The frame... commands aren't valid
2) If they are, according to the manual frameatend should equal 11, the same as the animation, which didn't work
3) Tried framebeyond, but I am not sure if the anim11 = 0,19 is the correct sequence for the 11 animation; if it is, framebeyond=11 19 doesn't work

The only thing that sort of worked was this, but it appears to play only 1 or 2 frames



I changed the "death" fpi to leavecorpse.fpi

Try playing around with incframe maybe.

Good luck.
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 6th Jun 2007 20:06 Edited at: 6th Jun 2007 20:17
I made barrels that lasted for 30 seconds at the start of the game.

Which got me thinking..... Make a barrel that spawns from a trigger zone, with a spawn life of 1. Copy it and put it behind or infront of all the people to die. Then when it spawns it will instantly blow up, killing them all .

WOOOOO I just tried it, it works brilliantly.

Now if you could create a completely alpha texture, and a completely alpha explosion sprite, and turn off debris, and turn off the explosion sound......

E.D.

Login to post a reply

Server time is: 2024-11-23 17:54:26
Your offset time is: 2024-11-23 17:54:26