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 / Mouse w/ Crosshair

Author
Message
Kemerd
11
Years of Service
User Offline
Joined: 8th Apr 2013
Location:
Posted: 21st Apr 2013 04:54
Just wondering, is this possible:

Have the default character have a crosshair of a dot.

Make an item be able to be picked up if the crosshair is on that object.


If so, can someone post what to do?

Thanks.

Meh
Kemerd
11
Years of Service
User Offline
Joined: 8th Apr 2013
Location:
Posted: 21st Apr 2013 05:42
PICKOBJECT=X
Description: Is true if the entity is dead-centre screen and X is 1 or the entity is
not dead-centre screen and X is 0.
Range: X = 0 – True if the entity is not in the centre of view.
X = 1 – True if the entity is in the centre of view.
Example: :pickobject=1:playertake

I found that... anyone know how to make the crosshair be in the center, render a dot properly in the setuplevel.fpi? I tried rendering a .png file but it doesn't show.

hudx= 50
hudy= 50

I know you need to do that but....


How?

Meh
angusm3
15
Years of Service
User Offline
Joined: 6th Mar 2009
Location: Right behind you...
Posted: 21st Apr 2013 20:11
my stimpak script


:state=0:dimvar=stimpaks
:state=0:state=1

:state=1,plrusingaction=1,pickobject=1,plrdistwithin=200:addvar=stimpaks 1,destroy

this is just the pickup script for stimpaks

I made it a bit universal, and the only thing you need is a

you'll need to write your own script to tell the stimpaks what to do

http://www.youtube.com/watch?v=AfFa6uPv_8o
I appear to have burst into flames...
Kemerd
11
Years of Service
User Offline
Joined: 8th Apr 2013
Location:
Posted: 22nd Apr 2013 12:39
Thanks.= for that script. Anyone know how I can render the dot though? I can't seem to get it working.

Meh
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 22nd Apr 2013 23:56
Quote: "Anyone know how I can render the dot though?"


You can do it in two ways. One- you can define the dot image in your "setuplevel.fpi" before the line that defines the pointer. This will have the dot visible all the time in the game. Second- you can script the item using "pickobject" to display the dot image when the player is within distance and "pickobject=1" (meaning the center spot on the player's screen hits the exact spot for "pickobject" to activate) only. In other words, no dot shows throughout the game until the player reaches an item that uses the dot image and "pickobject". We actually use something like this method in one of our developments to give the player an indication to use the "action" key.

Guns have their own crosshair image so if you have a weapon and the dot showing, they will "overlap" one another (either the dot will be over-top the crosshair or vice versa).


There's no problem that can't be solved without applying a little scripting.

Login to post a reply

Server time is: 2024-11-23 13:53:49
Your offset time is: 2024-11-23 13:53:49