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 / Shot Detection

Author
Message
Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 1st Feb 2009 03:25
How can I make an entiety (not a character) recognize if it is being shot? I've looked through the conditions but am having trouble coming up with a way to do this. I'm using V1.09 and Ply's Mod.

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 1st Feb 2009 04:01
the best way would be to use the condition that returns true when the entity was fired upon by a certain weapon.

I know not with what weapons WWIII will be fought but WWIV will be fought with sticks and stones-Albert Einstein
Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 1st Feb 2009 04:09
The problem being that I'm not sure how that condition works exactly. Could you explain to me how it does?

Thanks,
Crusader2

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
Robert F
User Banned
Posted: 1st Feb 2009 04:11
I know you can do something, if is health is less than x then something. I dont know how though.


Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 1st Feb 2009 04:26
That only applies to characters. I've tried to convert this model into a character, but it has had... Problems... Like it doesn't show up.

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 1st Feb 2009 04:31
in the fpe just put ischaracter=1

]

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 1st Feb 2009 04:32
I believe it's SHOTDAMAGE=X.

SHOTDAMAGE=X is true when damage taken exceeds the value X. All dynamic entities take damage from being shot.

Best.

Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 1st Feb 2009 04:38
the documentation on the condition i told you about is in the manual for Ply's Mod Crusader2. I believe it's something like entityShotBy=scifi/tavor 1. where scifi/tavor is the gun the entity is shot by and 1 means it is true only if the entity is shot the specified gun.

I know not with what weapons WWIII will be fought but WWIV will be fought with sticks and stones-Albert Einstein
Robert F
User Banned
Posted: 1st Feb 2009 06:34
Quote: "That only applies to characters. I've tried to convert this model into a character, but it has had... Problems... Like it doesn't show up."


Oh sorry, I thought you were talking about a character.


Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 1st Feb 2009 15:17
Quote: "I believe it's SHOTDAMAGE=X.

SHOTDAMAGE=X is true when damage taken exceeds the value X. All dynamic entities take damage from being shot.

Best."


Thanks, xplosys, I'll try it out.

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 1st Feb 2009 15:35
Ok, I tried that out on a modified target.fpi script by Heltor, but it doesn't do what I want it to. Let me explain.

The idea is for a target to show up, and, when you shoot it, a door, named door1, opens. The door uses the doorreomte.fpi script, and the target uses the folloring script.


The only things I've changed are the last 2 lines; the first 4 lines of code are used to make the target appear and hold a position. I've tried converting the target into a character, but it refuses to show up.

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 1st Feb 2009 15:53
I Think turning collision off makes it impervious to shot damage. Try it without coloff.

Best

Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 1st Feb 2009 16:31 Edited at: 1st Feb 2009 18:53
Oh, that makes sense. I just used Heltor's script and added to it, so I thought messing with coloff would mess it up.

EDIT: Hmm... That still dodn't fix the problem...

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 1st Feb 2009 22:59
shotdamage=x only works on characters. If you use Ply's mod, try this. Obviosuly it'll need to be modified into the script, but you get the idea




*slap!*
Quiet yourself, think before posting, and maybe you won't be as ignorant as you seem.
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 1st Feb 2009 23:10
Quote: "shotdamage=x only works on characters"


I'm sorry, but that's not true. It works just fine on any dynamic entity.

Best.

meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 2nd Feb 2009 03:43
Really? I never knew that, as far as I have been told it works on characters, my bad Crusader Thank you for correcting me xplosys


*slap!*
Quiet yourself, think before posting, and maybe you won't be as ignorant as you seem.
Robert F
User Banned
Posted: 2nd Feb 2009 05:02
Quote: "The idea is for a target to show up, and, when you shoot it, a door, named door1, opens. The door uses the doorreomte.fpi script, and the target uses the folloring script."


If you want to shoot a target for a door to open just change the targets destroy script to destroyandactivate, and the name of the door in the if used box.


Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 2nd Feb 2009 21:57
Quote: "If you want to shoot a target for a door to open just change the targets destroy script to destroyandactivate, and the name of the door in the if used box."


Whoah! That's useful! Have one one me!

... time!

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 3rd Feb 2009 03:53
Nice, and wow, just got your little MC Hammer sig thing. Lol


*slap!*
Quiet yourself, think before posting, and maybe you won't be as ignorant as you seem.
Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 3rd Feb 2009 21:53
Yeah, I consider it a stroke of briliance.

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!

Login to post a reply

Server time is: 2024-11-24 18:47:19
Your offset time is: 2024-11-24 18:47:19