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 / Displaying text when crosshair over entity

Author
Message
PixelF
6
Years of Service
User Offline
Joined: 30th Oct 2012
Location: United States
Posted: 30th Nov 2014 02:48
I have this script from TheStoryteller01 and it allows objects to be searched and when searched spawns a key or other entity.
;Artificial Intelligence Script


;End of Script


I am trying to add this
to TheStoryteller's script and it does show text when the crosshair is over the entity. However, it does not do anything else. It only shows the text and doesn't work after that.

Can anyone help me out?
ncmako
7
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 30th Nov 2014 03:20
PixelF
After taking a quick look, I think I see the problem.
Look at "state=1" lines. Top goes to state=3,lower one goes to state=2. Both are activated when "plrdistwithin=60" But...top one
goes right to "state=3" while the lower line needs "plrusingaction=1". Sooo..the top line runs thru state=3,
the extra script lines you added ends with "state=0"(loops back to begining)or "state=4" (dead ends).
From what I see, is that it?

My games never have bugs. They just develop random features..
BlackFox
FPSC Master
11
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 30th Nov 2014 05:54
I'm going to suggest changing the "timerstart/timergreater" to "etimerstart/etimergreater".

There's no problem that can't be solved without applying a little scripting.
The Storyteller 01
10
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 30th Nov 2014 13:17 Edited at: 30th Nov 2014 14:08
I actually started developing questionmark scripts back in 2012 for one of my many unfinished projects.

These scripts display a questionmark when the player is near enough and targeting the object. Unlike my AGSP scripts, this one does NOT freeze the player while the script is running, the player is free to turn away, move and shoot. Since the script is using ETIMER it's not going to collide with other scripts or combat. However, it could be tricky to p.e. place 5 objects on a table each using a variation of this script. Version 2 would be better suited in this case.

Version 1 remembers the last line the player has seen and continues from then when the player targets the object again.


Version 2 has the script return to state=1 if the player "untargets" the object at any time and displays the questionmark it the player targets it again.


I didn't pursue this idea further because I found out the RAWTEXT questionmark would only work with very few crosshairs (a dot and a ring to be precise) and so it wasn't worth publishing imo.

But maybe it can provide a start for you @PixelF

In case you find my grammar and spelling weird ---> native German speaker ^^

Login to post a reply

Server time is: 2019-09-20 07:39:44
Your offset time is: 2019-09-20 07:39:44