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 Pickup Script

Author
Message
Deltayo
15
Years of Service
User Offline
Joined: 2nd Sep 2009
Location:
Posted: 13th Apr 2010 10:23
I need to find out what I am doing wrong here. My goal is to make a script that performs as so... When you get into distance of the weapon, a HUD pops up. When you get far away from it, it fades out. When you are close to it, you can press "F" to pick up the weapon and the HUD will go away. For some reason, I cannot achieve all of this. I can make the HUD pop in and out depending on distance, but I cannot add a pickup feature. I can make the HUD pop up, and allow the weapon to be picked up, but when I walk away from the weapon, the HUD does not fade out.

Here is my script.

Shadowtroid
14
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 13th Apr 2010 13:32
Well, first off, the first two state lines could be condensed into one line. I think your problem is that it processes the first line, which tells it to go to state 13, so the other state=0 line never gets coded.

Also the state=13 line should start state=12, because that is when you are close to it.

Actually, you could probably forgo most of the state conditions.

So it should be:




Deltayo
15
Years of Service
User Offline
Joined: 2nd Sep 2009
Location:
Posted: 14th Apr 2010 09:41
Works great, except for a weird blinking effect. Thanks though!
Shadowtroid
14
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 14th Apr 2010 13:31
Ah, wait, I should have closed it up. Okay, try this one:



Login to post a reply

Server time is: 2024-11-24 23:33:49
Your offset time is: 2024-11-24 23:33:49