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 / Great script idea, but is it possible?

Author
Message
Flash
19
Years of Service
User Offline
Joined: 31st Mar 2005
Location:
Posted: 30th Aug 2005 23:19
Hi, I need a script for my game but I dont know if it is possible. If it is possible though would someone please be kind enough to attempt to make it for me?
I need a script that allows you to talk to someone / use an object and it gives you a weapon. So if you applied it to a character entity you could walk up to them, press enter, it would play a sound and then give you a weapon. Also if possible the script should be able to stop you moving while the sound is being played.
I really need a script like this for my game but I dont have any scripting abilities at all.
Im sure that there are other people in the FPSC community that would have a use for a script like this one to.
So if anybody has some spare time i would much appreciate it if you could attempt this script.

Thanks in advance
~Flash

Hippopottomonstrosesquippedaliophobia
Anlino
19
Years of Service
User Offline
Joined: 28th Jun 2005
Location:
Posted: 30th Aug 2005 23:40
And Gordon recives his Crewbar... sounds doable to me, but i am just not that skilled in scripting.
cardine
19
Years of Service
User Offline
Joined: 20th Apr 2005
Location:
Posted: 30th Aug 2005 23:48 Edited at: 30th Aug 2005 23:48
Try this script; I haven't tested it yet (so it may be bugged), but I think it will work.


My-Free-Coupons.com
CardineHosting.com
Merranvo
19
Years of Service
User Offline
Joined: 24th May 2005
Location: That ^ is a Orange
Posted: 30th Aug 2005 23:54
yeah... that should work...

Merranvo, taking over the net, one forum at a time.
Flash
19
Years of Service
User Offline
Joined: 31st Mar 2005
Location:
Posted: 31st Aug 2005 00:37
Thanks cardine!
I will try it first thing in the morning as I have to go now.

Thanks a million!

Hippopottomonstrosesquippedaliophobia
Flash
19
Years of Service
User Offline
Joined: 31st Mar 2005
Location:
Posted: 31st Aug 2005 00:39
Just one question. Where in the script do I chose which weapon I am given? Its probably completely obvious and I just haven't noticed.

Hippopottomonstrosesquippedaliophobia
Flash
19
Years of Service
User Offline
Joined: 31st Mar 2005
Location:
Posted: 31st Aug 2005 12:11
The script doesnt work, i put it in the main script field of an entity ( I used the unnarmed AI character ) and when I walk up to them and press enter they just float in the air and spin like a weapon normally does.

Hippopottomonstrosesquippedaliophobia
cardine
19
Years of Service
User Offline
Joined: 20th Apr 2005
Location:
Posted: 31st Aug 2005 19:34
Hmmm, I think you have to make a weapon entity (for the weapon you want to pick up), and then make the weapon entity look like the unarmed AI Character (so somebody playing the game can't tell that it is a weapon entity).

My-Free-Coupons.com
CardineHosting.com
Flash
19
Years of Service
User Offline
Joined: 31st Mar 2005
Location:
Posted: 31st Aug 2005 21:44
So you mean that I alter a guns fpe so it loads a different .x and texture file. Then give the gun the script in the main script section?

Hippopottomonstrosesquippedaliophobia
Merranvo
19
Years of Service
User Offline
Joined: 24th May 2005
Location: That ^ is a Orange
Posted: 2nd Sep 2005 02:53
I see it

:state=0:state=2
:state=2:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pickedupaweapon.tga,hudname=weaponprompt,hudhide=1,hudmake=display,state=10
:state=10:rundecal=5,spinrate=4,floatrate=10
:state=10,plrdistwithin=40,plrusingaction=1:state=1,playertake,coloff,rundecal=-1,plrsound=audiobank\items\pickupweapon.wav,hudshow=weaponprompt,hudfadeout=weaponprompt

that should work.... mabey...

Merranvo, taking over the net, one forum at a time.
cardine
19
Years of Service
User Offline
Joined: 20th Apr 2005
Location:
Posted: 2nd Sep 2005 03:57
But it still has the same problem (I think). I think you do have to alter a guns fpe so it loads a different .x and texture file like you said above.

My-Free-Coupons.com
CardineHosting.com
Flash
19
Years of Service
User Offline
Joined: 31st Mar 2005
Location:
Posted: 2nd Sep 2005 15:12
Thanks Cardine and Merranvo! I will try it in a minute!

Hippopottomonstrosesquippedaliophobia
Flash
19
Years of Service
User Offline
Joined: 31st Mar 2005
Location:
Posted: 2nd Sep 2005 16:28
Its still not working, themn again, I may not be doing it right.
First i put Merranvo's script into a notepad file then saved it as an fpi. Next i made a copy of the tavor fpe and replaced the texture and .x model to make it look like an unarmed Aiko. I then placed the the fpi with Merranvo's script in the tavor's (the one that looks like an Aiko) main script field.
I must be doing something wrong because when I test the game all there is is an Aiko stood there completely static not moving, nothing happens if you walk into/through her or if you press enter near her.

Hippopottomonstrosesquippedaliophobia
cardine
19
Years of Service
User Offline
Joined: 20th Apr 2005
Location:
Posted: 2nd Sep 2005 23:51
Did you try putting my script in?

My-Free-Coupons.com
CardineHosting.com
Flash
19
Years of Service
User Offline
Joined: 31st Mar 2005
Location:
Posted: 3rd Sep 2005 01:07
Not yet, sorry. Becaus it didn't work before i din't stop t think it might work with all the models and textures changed. I have to go now so i will try it tomorrow.

Hippopottomonstrosesquippedaliophobia
ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 3rd Sep 2005 14:30 Edited at: 3rd Sep 2005 18:54
Maybe this works for you:

You will need a TriggerZone where the character stands (does not work for characters that are walking around)

Attach this script to the TriggerZone:



There is a timer in the script.
You should use a delay time that is a little bit longer than your soundfile.
In this example the soundfile should have a lenght of 2 seconds (2000 milliseconds). After 2.5 seconds (2500 ms) you get the weapon.
You can change this in the script: TIMERGREATER=X

You have to type the name of the weapon in the IF USED field of the TriggerZone.

The weapon needs this Init script:



The script lets the gun appear invisible. You can't pick it up.
(you should place the gun somewhere close to the Zone)

And attach this as a Main script to the weapon:



Hope that helps.
Matinuker
20
Years of Service
User Offline
Joined: 25th Mar 2004
Location:
Posted: 4th Sep 2005 12:33
That looks like it would work
ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 5th Sep 2005 00:53
It works.
I am testing my scripts.
The question is if it is that what Flash is looking for.
Flash
19
Years of Service
User Offline
Joined: 31st Mar 2005
Location:
Posted: 5th Sep 2005 18:28
I tried it but it didn't work. But i was in a rush so i probably got it wrong. you could walk up to the character and it displayed the 'press enter to use' message. But when i pressed enter nothing happened. I will try it again in a second.

Hippopottomonstrosesquippedaliophobia
Merranvo
19
Years of Service
User Offline
Joined: 24th May 2005
Location: That ^ is a Orange
Posted: 9th Sep 2005 23:57
JEEZ

ctm, you made a big issue over a little problem.

Cardine, your error was that you would never pick up the weapon, possibly you didn't read the script before adding your say in.

:state=10,plrdistwithin=40,plrusingaction=1:state=1,playertake,coloff

is what you need in the weapon pick up... simply put ",plrusingaction=1" in the propper place on the line with plrtake / playertake. but before the second colon.

Merranvo, taking over the net, one forum at a time.

"ye oft de adopte early shalt move mountains, and be gods among men"

Login to post a reply

Server time is: 2024-11-21 17:30:27
Your offset time is: 2024-11-21 17:30:27