Scripts / Prompt Local

Author
Message
benjiboy
3
Years of Service
User Offline
Joined: 24th Mar 2017
Location: In the depths of rural Norfolk
Posted: 13th Feb 2020 10:51
A while ago I posted a thread about drawing a panel at the location of PromptLocal.
It occurs to me that the code supporting the PromptLocal command/function/whatever has access to the x,y screen position of the entity the script is attached to, and that x,y screen position is continually updated as the player view changes.

It should therefore be possible to build - in the engine - a PromptLocalWithPanel command/function/whatever, or to modify the existing PromptLocal code to accept an additional, optional boolean parameter that specifies that the prompt should be displayed within a panel.

Additional parameters would allow specification of border and background colours for the panel.

If there's somewhere on GIT that enhancement requests like this should be made, please give me a link and I'll do so.
You can't teach an old dog.
GubbyBlips
1
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 14th Feb 2020 05:52
Nice idea- for sure benjiboy
Github requires a login, and the site would never
accept any passwords I suggested when I tried to CREATE the NEW user
profile name and password. But aside from that, your idea is cool.

Do you know what else this technology you are referring to means?
PM
3com
6
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 14th Feb 2020 09:40
https://github.com/TheGameCreators/GameGuruRepo/issues/624
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
benjiboy
3
Years of Service
User Offline
Joined: 24th Mar 2017
Location: In the depths of rural Norfolk
Posted: 15th Feb 2020 18:32
Thanks 3com. Request posted.
You can't teach an old dog.
GubbyBlips
1
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 16th Feb 2020 04:19
If GG could add the extended ASCII characters to the text displayed on screen---
this wouldn't be too hard to accommodate in lua scripting.
In fact, without the extended characters, you can put old school boxes.
That is, the standard text box-- not referring to the prompt local 3DText.
That is a trick as we all know, but the key is well known to TGC.
PM
GubbyBlips
1
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 16th Feb 2020 04:32
"PromptLocal has access to the x,y screen position of the entity the script is attached to, and that x,y screen position is continually updated as the player view changes."

Exactly. The engine for sure knows those coordinates. Don't know why
we can't get a command that calls those coordinates?
Something like...

GetScreenPointX(e)
GetScreenPointY(e)

Some great useful functionality would be freed up with that!
How about posting it to GitHub also?
PM
benjiboy
3
Years of Service
User Offline
Joined: 24th Mar 2017
Location: In the depths of rural Norfolk
Posted: 17th Feb 2020 18:21
Would this cover it?

https://github.com/TheGameCreators/GameGuruRepo/issues/624
You can't teach an old dog.
GubbyBlips
1
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 17th Feb 2020 20:48
Well, that's really not that much connected- just slightly-
but only for a TEXT box! Is that all we want?
That by itself won't return the coordinates that would be so useful.
I'm talking about getting the screen coordinates of ANY ANY, (should I say it again)!
Any entity, and BB this would help people who want to point at things on their
map with the mouse for RPG, topdown, even horizontal selection for all objects.

@AmenMoses made a very decent script for it, but I'm not sure how it is for all
resolutions or angles?

Up above, I posted this anomalous little sentence;
"Do you know what else this technology you are referring to means?"
Let me add some exclamations!!!!!!!

TGC certainly has this technology under their belt, in their bag of tricks so to
speak- without any doubt. In the map editor, your mouse flawlessly highlights
any entity the mouse pointer hovers over-- perfectly! It points to
and clicks on any entity, at any angle, at any distance (as long as it's visible)
so the coding trick to find that is well know-- but not provided to the GG map
creator clients (us users!) by lua scripting.

So a new GitHub request (if anyone is interested) would be fine.
PM
AmenMoses
GameGuru Master
4
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 17th Feb 2020 23:24
The engine doesn't know the screen coordinates until the end of the rendering pipeline, your Lua scripts get called at the beginning of the next rendering cycle so the best you could get would be the screen x,y coordiates that a particular entity was at last frame.
To do that the engine would need to remember the screen coordinates of ALL visible entities (as it wouldn't know in advance which one you were interested in) so you have both a performance and memory hit.

PromptLocal doesn't work the way you think it does, it doesn't 'know' the screen coordinates of an entity, instead it basically tells the renderer "when you position entity x on screen also add the following text at the same screen position". It doesn't remember what those coordinates are.

So basically what I'm saying is that it would be quite a big change to the engine.
Been there, done that, got all the T-Shirts!
PM
GubbyBlips
1
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 18th Feb 2020 04:20
Yeah, I was mentioning how the GUI map editor worked to signify that
it was a common methodology.

Up above a couple entries I mentioned;
GetScreenPointX(e)
GetScreenPointY(e)

So that we are just asking for those coordinates for the (1) current
scripted entity... Whether they are late-cycled/ well still might be
worth looking into if the developers want to try some point and click
adventures, (best after locking the camera I suppose) or shooting,
building stuff or whatever.

On the other hand, your lua script for that is no slouch!
PM
benjiboy
3
Years of Service
User Offline
Joined: 24th Mar 2017
Location: In the depths of rural Norfolk
Posted: 18th Feb 2020 09:20
Here y'go

https://github.com/TheGameCreators/GameGuruRepo/issues/697

You really should just get yourself set up on Github tho'
You can't teach an old dog.
GubbyBlips
1
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 21st Feb 2020 00:56
Thanks so much for posting that benjiboy. It'll be great to see the progress
on GG bugs and GG MAX, so I think you are right, I might try to see if GitHub
will let me create a profile this time.
PM
benjiboy
3
Years of Service
User Offline
Joined: 24th Mar 2017
Location: In the depths of rural Norfolk
Posted: 21st Feb 2020 06:19
Ah. That's a whole different situation then. Anything that slows things down are to be avoided.
You can't teach an old dog.
GubbyBlips
1
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 25th Feb 2020 19:16 Edited at: 26th Feb 2020 15:53
I looked at the GitHub for the Text Box-- but has this been annotated to signify
that we NEED Prompt Local with Color and Size?! Please friends, please add
this to the GitHub if it's not. It looks like there's been a broad request entered,
but to add color and size(font) to Prompt Local would be extremely easy and
quite very helpful-- as well as a 'Y' adjustment. Just working with it now, and
this would be a most valuable feature.
PM

Login to post a reply

Server time is: 2020-08-13 15:56:10
Your offset time is: 2020-08-13 15:56:10