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 / some serious scripting help *ahem* Merranvo please help *ahem*

Author
Message
BULLSHOCK
19
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 2nd Jun 2005 11:50
ok, anyone that is expirienced in fpi scripting...i need your help!


i need help with something else...

i need help to make a HALO-style weapon system.

i.e. player can only hold 2 weapons and if they already have 2 weapons, then they need to "swap" one of theire weapons by showing an message that says "press enter to swap for tavor" or whatever, and maybe using the "usekey" command, we can acheive this.

i can do some scripting, so if sombody could maybe start this script for me (i have no idea how to approach it) i could help finish it or something and release it to the community.

-I will beat anyone in HALO2!
BULLSHOCK
19
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 3rd Jun 2005 13:27
qwhen i attach that scrpit to tyhe weapons...they dont do anything at all, there just there like a modtable...it just sits there...

anyway, i tried to improve upon it, and i cant find the problem with my script. when you get near it, it starts showing the "pickupweapon" and playing the pickup sound very, very rapidly.

heres the script:
;Artificial Intelligence Script

;Header

desc = Weapon Glowing Pickup

;Triggers

:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pickedupaweapon.tga,hudname=weaponprompt,hudhide=1,hudmake=display
:state=0:hudreset,hudx=20,hudy=10,hudimagefine=gamecore\text\user\pickupprompt.tga,hudname=pickupprompt,hudmake=display,state=10
:state=10:rundecal=5,state=3
:state=11:plrdistwithin=40:hudshow=pickupprompt,hudfadeout=pickupprompt,state=12
:state=12:plrusingaction:plrtake,coloff,rundecal=-1,plrsound=audiobank\scifi\items\pickupweapon.wav,hudshow=weaponprompt,hudfadeout=weaponprompt
;state=2:state=3,playerdrop,colon,plrsound=audiobank\scifi\items\drop.wav
:state=3,plrdistfurther=65:state=10

;End of Script



p.s. i know you said you havnt started on gun scripting yet, but can you just tell me any possible problems?

thanks,
-BULLSHOCK

-I will beat anyone in HALO2!
Mad Scientist
19
Years of Service
User Offline
Joined: 30th May 2005
Location: Fort Lauderdale, FL
Posted: 4th Jun 2005 00:39
I admit I'm new to this.

It looks like you've got an infinte loop between state 10 and state 3. Maybe I'm just not understanding but I can't see how you ever get to state 11.

- Jody

Relax or I'll hit you with the whip again.
BULLSHOCK
19
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 4th Jun 2005 09:47 Edited at: 4th Jun 2005 10:16
ok...i think i understand, but im trying to make it to where you dont just come close to a weapon and it adds itself to your inventory.

when you get close, i want it to show an image that says "press enter to pick up the tavor" or the name of the weapon.

then, if you want the weapon, you press enter to pick it up. this is where the "onkeypres=x" command would be very useful (hint, hint, lee ) ya, like i said, i can script, but i suck at it.

anyway, thanks for all the help!



(edit)


hhhmmmm....i looked it over, and it should work, but it doesnt, it has the same effect as the last one, it just sits there

-I will beat anyone in HALO2!
BULLSHOCK
19
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 4th Jun 2005 10:23
ok...hmmm, that was really fast!

anyway, can i ask why the player drops the weapon after 3 seconds? i mean i dont quite understand that part of the code...

also, i have photoshop, image ready, all that stuff. i got a lot of modelling programs too, it just seems like scripting is where i fail.

i will try to get this to work. once its finished, i know it will help out a lot of people.


p.s. congrats on getting that avatar!

-I will beat anyone in HALO2!
BULLSHOCK
19
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 4th Jun 2005 10:37
ok, no the player doesnt drop the weapon after 3 seconds, he never picks it up.

as a matter of fact, it doesnt show the prompt either.

as for the avatar, you went all that time with the one that didnt show up...and then you started that forum about it...and now you have one!

-I will beat anyone in HALO2!
BULLSHOCK
19
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 4th Jun 2005 10:55
ya, i had pickupprompt made a long time ago. i did try to press enter over it, but it just sat there. im gonna try it again just to make sure...

-I will beat anyone in HALO2!
BULLSHOCK
19
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 4th Jun 2005 11:17
no, that one doesnt work either...


i tried adding the header and desc, but that didnt work either. there is no visible errors that i can see, but then again, look at my last script...

-I will beat anyone in HALO2!
BULLSHOCK
19
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 4th Jun 2005 11:31 Edited at: 4th Jun 2005 11:40
wow, wow, wow,.....that creates a runtime error as soon as you enter within the 60 distance...


(EDIT)


i changed it to this:

;Artificial Intelligence Script

;Header

desc = prompting the pickup of a weapon

;Triggers

:state=0:hudreset,hudx=20,hudy=10,hudimagefine=gamecore\text\user\septillian_cannon.tga,hudname=pickupprompt,hudhide=1,hudmake=display
:state=0:state=1
:state=1,plrdistwithin=60:hudshow=pickupprompt,hudfadeout=pickupprompt
:state=1,plrdistwithin=60,plrusingaction=1:playertake,state=2

;End of Script


and it worked!!!

i dont know why....

ok, now lets concentrate on the second half.

we now have a script that when your close to the weapon, it says "press BLANK to pickup BLANK" ok, now we need to figure out the swaping part...hhhmmmmm

we have to use plr drop right BEFORE plrtake, so they never get more than the set amount of weapons...

i was thinking that maybe you could use the trigger zone thing or whatever to "swap" the weapons I.E. drop the first, then pick up the second...

-I will beat anyone in HALO2!
BULLSHOCK
19
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 4th Jun 2005 11:42
ok, it looks like i was editing my above message while you were posting...read above

its 6:42 pm here (L.A. CA)


-we really need instant messageing...

-I will beat anyone in HALO2!
BULLSHOCK
19
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 4th Jun 2005 12:00
ok, its just like the script ignores the last part...


hmmm...

-I will beat anyone in HALO2!
BULLSHOCK
19
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 4th Jun 2005 12:17
ok...here we go again...


another runtime error...

fpsc crashed again...

-I will beat anyone in HALO2!
BULLSHOCK
19
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 4th Jun 2005 12:26 Edited at: 6th Jun 2005 10:42
{cleared}

-I will beat anyone in HALO2!
BULLSHOCK
19
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 4th Jun 2005 12:35
and again, it ignores the last part.

i tried to swap before 3 seconds, and after 3 seconds...

-I will beat anyone in HALO2!
BULLSHOCK
19
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 4th Jun 2005 12:36
whats you msn name?

-I will beat anyone in HALO2!

Login to post a reply

Server time is: 2024-11-23 08:06:20
Your offset time is: 2024-11-23 08:06:20