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 / When something takes "x" damage?

Author
Message
Wheatleyy
13
Years of Service
User Offline
Joined: 1st Jan 2011
Location: Look to your right...
Posted: 3rd Nov 2011 20:21
Hey! Is it possible (and can anybody provide?) to make a script that is applied to an entity, such as a crate, and then when it is given damage, it will move to and play animation key frame 5, which will be the start of an explosion? Is this possible, if so has anybody got the script?
Thanks!
Wheatleyy

JRH
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Stirling, UK
Posted: 4th Nov 2011 00:51
There is the condition 'shotdamage=x', but I think it only works with characters. You could try making your crate a character?
gendestroier
14
Years of Service
User Offline
Joined: 5th Jun 2010
Location: Brazil
Posted: 4th Nov 2011 01:09
wha ? wha ? you... want the crate to explode, but you wanna play an animation with it ? i don't understand, emmm... so the crate receive damage, play animation and explode ? well i'm sure it can be done, but... you don't want any kind of different explosion effect right? coz that ain't goona happen (fpsc issue), humm i think i'm starting to get you, you shot the thing, the thing reacts... and them boom !!!!! okay o got it, you need to go change the fpe file in the box's entity bank folder, open the fpe file and set explodable from 0 to 1, that might make sure it blows up after destroyed, ok, now the script, what you need is to make the script check if the entity have received a certain ammount of damage, and if i did, execute the animation you want, i'm sure you can do it if you try, any question, call the drunk guy behind the keyboard, just don't... scream....

mods for creating a inteligent game,at least
angusm3
15
Years of Service
User Offline
Joined: 6th Mar 2009
Location: Right behind you...
Posted: 4th Nov 2011 01:31
set the crate's health to 1000 in the editor

then give it this script:

:state=0:state=1
:state=1,healthless=999:animate=5

I appear to have burst into flames...
gendestroier
14
Years of Service
User Offline
Joined: 5th Jun 2010
Location: Brazil
Posted: 4th Nov 2011 01:36
isn't the crate supose to explode ?

mods for creating a inteligent game,at least
Wheatleyy
13
Years of Service
User Offline
Joined: 1st Jan 2011
Location: Look to your right...
Posted: 4th Nov 2011 16:50
Thanks guys! And what i meant is the crate is destroyable, so if you shoot it, say twice, it falls to pieces

gendestroier
14
Years of Service
User Offline
Joined: 5th Jun 2010
Location: Brazil
Posted: 4th Nov 2011 19:48
owww ! okay ! now i get it

mods for creating a inteligent game,at least
angusm3
15
Years of Service
User Offline
Joined: 6th Mar 2009
Location: Right behind you...
Posted: 6th Nov 2011 18:22
hemm, maybe you tell it to explode as well as animate 5, I don't have my syntax list up right now and I'm hungry so I'll help you later if you're still stuck

I appear to have burst into flames...
bobochobo
16
Years of Service
User Offline
Joined: 9th Jul 2008
Location: My house, in the middle of my street
Posted: 6th Nov 2011 18:42
:state=1,healthless=999:animate=5,destroy

Or:

:state=1,healthless=999:destroy
In destroy script add animate=5 before the final action.

All browsers should come with compulsory spell checks.

Login to post a reply

Server time is: 2024-11-24 04:52:13
Your offset time is: 2024-11-24 04:52:13