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 / Enemy sees weapon

Author
Message
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 21st Nov 2006 00:33
Is it possible to have an enemy attack only if it sees you have a weapon? If so, how?

Thanks

FPSC Hint's and Tips Guide (pdf)
Best Regards,
Nickydude
Silent Thunder
18
Years of Service
User Offline
Joined: 6th Feb 2006
Location: The Ship
Posted: 21st Nov 2006 01:32
there's a way for them not to attack unless you shoot them, but I don't know about just holding a weapon, I will experiment and see if I can come up with anything.



Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 21st Nov 2006 01:59
Thanks ST I'm creating a government type game in which you have security clearance in somewhere you're not supposed to be, not the best place to be waving a weapon about!

FPSC Hint's and Tips Guide (pdf)
Best Regards,
Nickydude
Silent Thunder
18
Years of Service
User Offline
Joined: 6th Feb 2006
Location: The Ship
Posted: 21st Nov 2006 02:31
i don't think it's possible, there isn't any kind of "weaponhold" variable that i can see, hopefully someone else can come along and make it.



vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 22nd Nov 2006 22:46
what about those HUD condition statements like: HUDEDITDONE=X, say you have a weapon image on your HUD means that you have a weapon right?, the enemy will only attack you because you have that HUD image. Just an idea, it might help.

so what's the job?
FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 22nd Nov 2006 23:17
Moving to the scripts forum.

Silent Thunder
18
Years of Service
User Offline
Joined: 6th Feb 2006
Location: The Ship
Posted: 22nd Nov 2006 23:47
Quote: "Moving to the scripts forum."


How many times a day do you have to move threads around?

I've begun to think that forum titles are not needed anymore.



FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 23rd Nov 2006 02:00
Sorry for the confusion.
Iim beginning to think I am going to need a "I posted before I moved this thread" t-shirt.

Nue B
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: Indy
Posted: 23rd Nov 2006 03:36
You could (in theory) write a script which would activate an enemy when the number (1-9) of your weapon is pressed. However, This isn't fool-proof because the Plr may use the mouse wheel as I do, to upholster a weapon.

Nue B. or not Nue B. That is the question.
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 23rd Nov 2006 16:33
ok, if you use emptys mod, you can write into the global script something like,

read the players weapon variable and if it's more than 0 (no weapon)
set the enemy entities var1 to 2

If the enemy's var1=2 he targets the player and shoots him.

if the players weapon variable = 0 then it sets the entities var1 back to 0.

So it would be like, selecting a weapon would "switch on" the enemies.

Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 23rd Nov 2006 16:54
Thanks Butter fingers. Would empty's mod interfere with any of the official updates?

FPSC Hint's and Tips Guide (pdf)
Best Regards,
Nickydude
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 23rd Nov 2006 16:58
yes. it's completely incompatible.


Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 23rd Nov 2006 17:20
Oh poo

FPSC Hint's and Tips Guide (pdf)
Best Regards,
Nickydude

Login to post a reply

Server time is: 2024-11-23 05:20:48
Your offset time is: 2024-11-23 05:20:48