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 / Normal civilians...Challenge/Need help

Author
Message
Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 31st Aug 2008 14:48
Believe this to be a challenge for yourself or helping me and others: can anyone make a part of an AI code which can be added to other scripts (such as pace, cover, cautious etc) which will make characters only react (shoot or run) when your weapon is drawn.
This is so that the player can act like a normal civilian until he wants things to get nasty.
Thanks

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 31st Aug 2008 15:00
No requests, read the stickies....

Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 31st Aug 2008 15:09
can i not request help?

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 31st Aug 2008 16:18
No. Not until you start the script and have something to show for your work. We're here to discuss aspects of the FPI script system, but not write scripts on demand.....

Those are the rules.....

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 31st Aug 2008 16:41
To my knowledge, there is no way to record/determine if the player has a weapon "drawn" or "holstered". It's been discussed but I don't think resolved.

Oh, and decaf is the way to go.

Best.

meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 31st Aug 2008 16:54
lol @ xplosys, while we cannot give full answers, I could suggest that there is a way to read if a character has been shot, all i'm saying



I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 31st Aug 2008 17:02
Decaf......Huh?

Anyway, you could try checking to see if the 0 button is pressed, as that button put away your current gun, and checking on other number buttons to see if the player pulls out another gun....

Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 31st Aug 2008 18:59
oh yh great, thanks guys, i guess a mods gotta lock this now...

Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 31st Aug 2008 20:30
actually dont lock it, i hav some code
im a noob to this sort of stuff but anyways, here it is:


i changed the "escapekeypressed" to "0keypressed" although i bet it wont work
its pretty simple at the moment (if it will work) its just supposed to use its shoot script if the plyr can be seen and the 0 key hasn't been pressed

please help my noobishness...

TGPEG
17
Years of Service
User Offline
Joined: 28th Dec 2006
Location: Bristol, United Kingdom
Posted: 31st Aug 2008 23:14 Edited at: 31st Aug 2008 23:18
no that won't work

try [scancodekeypressed=] (without the []) followed by the number you can get from http://www.barcodeman.com/altek/mule/kbemulator/
The slight problem with that code is that as soon as the weapon is holstered again the character would stop shooting at you which would be... wierd.

[center]
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 1st Sep 2008 04:17
oh, and that should be plrcanbeseen=1, I believe? I don't recall

I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 1st Sep 2008 08:02
Here's a portion of code you can start from:




The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 1st Sep 2008 10:14
@thanks tgpeg for the code and link
@thanks meteorite for the help
@thanks plystire for...umm...the colon??

Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 1st Sep 2008 11:58 Edited at: 1st Sep 2008 14:01
got new code update:




CODE UPDATE: The code ^up there^ only worked if you drew you gun in his view, where as this one works if your gun is in the characters view



so far it works for me (using the keys at the top of the keyboard)
can ppl please test it and tell me what works and what dosen't?
thanks

Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 1st Sep 2008 12:06
problem: if you have no weapon in a "weapon slot" and you press the key for that slot, then the character will still attack...any 'remedies'?

meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 1st Sep 2008 17:39
Fill up weapon slots, or edit the script for how many weapons the player should have at the time

I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 1st Sep 2008 17:55
oh yh, okay then thanks
btw, is there anyway i can edit this script to make it better?
thanks

Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 1st Sep 2008 18:22
...nifty.

This won't work properly with the mousewheel, though. The player'd be able to cycle through his/her weapons without triggering an enemy response...


Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 1st Sep 2008 18:30
oh yh i didnt think about that... damn
is there anyway i can disable the mousewheel or add it to my script?
thanks

Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 1st Sep 2008 21:07
No, the mouse wheel is hard coded into the engine.

Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 1st Sep 2008 22:36
ohhh.... alright then thanks,
does that mean there is know way to solve this issue?

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 2nd Sep 2008 00:50
You could make yourself a Mod.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 2nd Sep 2008 04:06
true

I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 2nd Sep 2008 10:10
umm... whats a mod?
thanks

Gamer X
16
Years of Service
User Offline
Joined: 1st Feb 2008
Location: Planet X
Posted: 2nd Sep 2008 13:24
A mod is a modification to the FPS Creator source code that can be used to put in your own commands and other things.

ex: efx mod, ply's mod, airmod, etc...

Do a search on mod and see what it gives you.


Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 2nd Sep 2008 14:48
ok then cool, thanks
but that leads to my next question, how do i make one?

Nomad Soul
Moderator
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 2nd Sep 2008 15:41
I think Meteorite had the right idea.

Setup a script that will cause an enemy to attack you only when they are attacked / damaged inflicted upon them.

It might not be as realistic as having them react to a weapon being pointed in their direction but will still be effective and would save you having to compile your own mod. By the way you will need Dark Basic Pro and Dark Lights software from TGC in order to do that.

Perhaps you could edit the 'coward' script so an enemy will initially leg it when you attack them and then attack you when their energy gets low out of desperation and variations of this to give the impression of unique behaviours for each NPC. I'm sure you could do that now there is a script variable to play around with for entity health.
Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 2nd Sep 2008 17:06
thanks nomad soul, for the advice and telling me how to make a mod, but i want the script to add to my security guards and civilians in my bank so that when my weapon is drawn, the guards attack you and the civilians run or take cover or something like that.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 2nd Sep 2008 19:41
If you made a Mod, here's a quick jist of a simple scripting conditions you can add to the source:

weaponheld=X
TRUE if character is unarmed and X=0
TRUE if character is armed and X=1


Basically check the player's currently held weapon variable for either a 0 or a ..... not 0.

If you decide to Mod the source, you can find a tutorial I made on how to add scripting commands in this board. Shouldn't be too old.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 2nd Sep 2008 19:53
thanks plystire
but first i need to get the software to make the mod
if i do make a mod then will it just be a simple extension for fpsc?

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 3rd Sep 2008 05:26
It isn't an extension. You're just replacing the FPSC engine with what you compiled.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 3rd Sep 2008 18:30
oh... that sounds dangerous lol

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 3rd Sep 2008 19:35
If you're smart and make a backup before replacing it, then it isn't dangerous at all. Not like you're messing with important MS Windows registry settings or replacing your PCs CMOS.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Big Pat
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: On the web...derr
Posted: 3rd Sep 2008 19:37 Edited at: 3rd Sep 2008 21:36
alrite thanks,
ill hav a look into it cos its sounds great but being [please don't post your age] yrs old means i dont have much money...

Login to post a reply

Server time is: 2024-11-24 14:10:08
Your offset time is: 2024-11-24 14:10:08