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 / Weapon Swapping

Author
Message
A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 22nd Mar 2009 13:14
Hey, again, guys,

I know i ask alot but you need to ask to learn... How come this script doesnt work? Two problems with it 1st the hud never dissapears and second you dont pick up the weapons. Heres the script. Any help would greatly be appreciated

Gamer X
16
Years of Service
User Offline
Joined: 1st Feb 2008
Location: Planet X
Posted: 22nd Mar 2009 22:42
This should work:



Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 23rd Mar 2009 09:38 Edited at: 23rd Mar 2009 09:39
Gamer X, that script would still allow the player to pick up the weapon if they walked away from it by pressing "F".

On the first "state=2" line, it must revert back to state 1.


@Arenas:

That's because your state 4 and state 5 lines don't begin with a colon. Also, your state 4 line doesn't have an "action colon" either.


The one and only,


A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 23rd Mar 2009 09:54
Oh ye I realised that and forgot to make an edit but they still dont work...
A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 23rd Mar 2009 15:10
No. That should be state two shouldn't it? It directs it to that state. If you moved in the area, it goes to state two, and because you changed it back to state one it would never be dirtected back to state one right? Should it not go like this:



Also i reliesed the colon error before the state 4 and 5 and fixed it. I never got what colons did till now. If a colon is at the start of the state does that mean it will do everything on that line? Im a newbee to scripting
A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 25th Mar 2009 18:32
No. That should be state two shouldn't it? It directs it to that state. If you moved in the area, it goes to state two, and because you changed it back to state one it would never be dirtected back to state one right? Should it not go like this:


;Artificial Intelligence Script

;Header

desc = Weapon Slot 2

;Triggers

:state=0:hudreset,hudx=50,hudy=90,hudsize=30,hudtext='F' Switch Weapon,hudname=slottwo,hudhide=1,hudmake=display,state=1

:state=1,plrdistwithin=40:hudshow=slottwo,state=2

:state=2,plrdistfurther=40:hudunshow=slottwo,state=1

:state=2,scancodekeypressed=33:state=4

:state=4:removeweap=2,hudunshow=slottwo,playertake,coloff,rundecal=-1,plrsound=audiobankitemspickupweapon.wav,state=5

:state=5:runfpi=weapon.fpi,state=6

;End of Script


Also i reliesed the colon error before the state 4 and 5 and fixed it. I never got what colons did till now. If a colon is at the start of the state does that mean it will do everything on that line? Im a newbee to scripting

Login to post a reply

Server time is: 2024-11-24 22:28:12
Your offset time is: 2024-11-24 22:28:12