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 / Smart AI : If Player Has Weapon

Author
Message
JRH
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Stirling, UK
Posted: 1st Apr 2008 13:10 Edited at: 1st Apr 2008 13:19
Hi ,
I'm looking for some help. I've tried searching and I've read Xplosys FPI scripting tutorial more than enough times to have found it but I still can't find the condition I need.

What I'm looking for is a condition that I can use to check whether the player HAS a weapon.

This is what I've managed to get so far:


Oh, in Xplosys tutorial it also says
Quote: "IFWEAPON=X is true when the weapon being used by entity is ready and X is one"


I don't completely understand this.

Any help would be much appreciated,

Thanks
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 1st Apr 2008 20:07
There are two possibilities for IFWEAPON. IFWEAPON=0 and IFWEAPON=1.

IFWEAPON=1 is true when the weapon being used by the entity is ready, or loaded.
IFWEAPON=0 is true when the weapon being used by the entity is not ready, or empty.

Normally, IFWEAPON=0 would be used to start the reload sequence, which is missing from your code.

See Ply's tut on AI scripting for more info.

I don't know of any way to determine if the player is holding a weapon, or what weapon it might be.

Best.

JRH
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Stirling, UK
Posted: 1st Apr 2008 23:35 Edited at: 2nd Apr 2008 14:44
Right, I've read Ply's tutorial already and found it to be pretty useless.

Also, if this dosn't exist (if noone has heard of it) I'm going to contact Lee and ask him about getting it added in for FPSC 1.9
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 2nd Apr 2008 00:34
Quote: "Right, I've read Ply's tutorial already and found it to be pretty useless."


I don't know what to say!

Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 2nd Apr 2008 03:37
Me neither!



My first animated Gif. Made in GIMP 2.
Peter gee
16
Years of Service
User Offline
Joined: 11th Jan 2008
Location: behind you!!!!
Posted: 2nd Apr 2008 14:34
xploysys' script just about saved my life i didn't know anything and now i know too much thank you xploysys

don't touch that cookie, it's mine!

JRH
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Stirling, UK
Posted: 2nd Apr 2008 14:44
I didn't mean it like that, I meant it hasn't helped me progress with this script, thats all. Its still a fantastic tut.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 4th Apr 2008 10:00
There is no FPI condition for if the PLAYER has a weapon or not.

It would be very easy to make such a condition, though, in a Mod.


Good luck asking Lee to put it into V1.09.
He'll tell you that it'd be put in after the migration (V2), if at all.


Also, it would be good to specify what you mean by "had a weapon". Do you mean the player has a weapon in his inventory? Or do you mean that the player is currently HOLDING a weapon?

You gotta be specific with this sorta stuff.
It's just like programming. If you don't say EXACTLY what you mean, then you won't GET exactly what you meant.


The one and only,
~PlystirE~

JRH
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Stirling, UK
Posted: 5th Apr 2008 16:30
Ply, I mean if the player is Holding a Weapon or has a weapon visible.

Also, you almost quoted Lees reply to my e-mail in your post.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 5th Apr 2008 23:37
Quote: "Ply, I mean if the player is Holding a Weapon or has a weapon visible."


Ah, okay, well in that case:

Quote: "There is no FPI condition for if the PLAYER has a weapon or not."



I really meant for you to elaborate with Lee, to make sure he puts in the right command for you.

And, yeah, I already knew what Lee was going to reply with. I've seen it lots of times now. Lol


The one and only,
~PlystirE~

Login to post a reply

Server time is: 2024-11-24 07:44:40
Your offset time is: 2024-11-24 07:44:40