I cant for the life of my find out how to get the current examined object via custom UI.
UIObject_Misc_ExtractData doesnt seem to do much... does anyone know the proper usage?
The script command relating to this (GetPlayerCreatureExamineTarget) doesnt actually work, so...
Thanks
Get the current examined object?
Débuté par
Ashw3
, avril 22 2012 05:28
#1
Posté 22 avril 2012 - 05:28
#2
Posté 22 avril 2012 - 05:50
I haven't looked directly at the Examine GUI, but my limited experience with GUIs makes me suspect that where you should start would be with the previous GUI: the context menu where the player clicks "Examine" in the first place. If you call an OnLeftClick script from that event you could probably get the examined target.
#3
Posté 22 avril 2012 - 08:40
i can't remember if i tried to get the examined object per se,
but
works in a gui_ script. Here's some of the GUI functions i found useful :
( "OnLeftClick" )
UIObject_Misc_ExecuteServerScript() - runs a custom script
UIObject_Input_ActionTargetScript() - runs a custom script against a target, Nb. target is passed to script as an INT !
( "OnUpdate" )
UIText_OnUpdate_DisplayTargetObjectName() - displays target name back to the gui
Trying to get a hold on the examined object rather than a targetted object, *might* not be doable.
ps. This is the context-menu node MC refers to:
an' it looks like one of those dastardly limited gui things,
but
GetPlayerCurrentTarget()
works in a gui_ script. Here's some of the GUI functions i found useful :
( "OnLeftClick" )
UIObject_Misc_ExecuteServerScript() - runs a custom script
UIObject_Input_ActionTargetScript() - runs a custom script against a target, Nb. target is passed to script as an INT !
( "OnUpdate" )
UIText_OnUpdate_DisplayTargetObjectName() - displays target name back to the gui
Trying to get a hold on the examined object rather than a targetted object, *might* not be doable.
ps. This is the context-menu node MC refers to:
<UIRadialNode name="node-examine" style="BASE_RADIAL_NODE" strref="549"
OnLeftClickExpanded='UIRadialNode_Mouse_ActionExamineObject("SCREEN_EXAMINE","SCREEN_EXAMINE")'
OnLeftClickCollapsed='UIRadialNode_Mouse_ActionExamineObject("SCREEN_EXAMINE","SCREEN_EXAMINE")' >
<UIFrame state="base" fill="ia_examine.tga" />
</UIRadialNode>an' it looks like one of those dastardly limited gui things,
2nd'dAshw3 wrote...
The script command relating to this (GetPlayerCreatureExamineTarget) doesnt actually work
Modifié par kevL, 22 avril 2012 - 08:41 .
#4
Posté 22 avril 2012 - 08:49
hmm, good point MC
could you put an OnLeftClick action in there, that uses either
UIObject_Input_ActionTargetScript(), or even
UIObject_Misc_ExecuteServerScript()
that stores the current target (ie, examined object) as an object-variable for further uses? It should renew every time a new Examine is performed ..
could you put an OnLeftClick action in there, that uses either
UIObject_Input_ActionTargetScript(), or even
UIObject_Misc_ExecuteServerScript()
that stores the current target (ie, examined object) as an object-variable for further uses? It should renew every time a new Examine is performed ..
#5
Posté 23 avril 2012 - 02:39
I am doing this script so it works in the world-map camera view, which means that the previous gui doesnt show, it just goes straight to examine (or so I believe).
The reason I am using the world map gui is because I can control and lock the camera zoom distance. If I could do this with the normal camera modes, then I could hook into the target object ui, which would be easier...
The reason I am using the world map gui is because I can control and lock the camera zoom distance. If I could do this with the normal camera modes, then I could hook into the target object ui, which would be easier...
#6
Posté 23 avril 2012 - 09:09
oh ... might be SoL
Can you find what script/file causes the OL Examine to auto-pop? I looked, briefly, & Right now i figure that's just the nature of the beast ..
sry,
Can you find what script/file causes the OL Examine to auto-pop? I looked, briefly, & Right now i figure that's just the nature of the beast ..
sry,
#7
Posté 23 avril 2012 - 12:14
Yeah, the overland map function is extremely shoddily done. Did you know that certain hotkeys dont fire in the OL simply because they werent coded in? The GUI buttons for them work fine, but the hotkeys dont work.
Anyway, I got the camera to act like the overland map in normal mode, which was the only reason I was using it.
My new problem though is DE-SELECTING a selected target. If I can work out how to do that, I can have right/left mouse click fired instant abilities AKA diablo 2/3.
Thats all I am looking for atm.
Anyway, I got the camera to act like the overland map in normal mode, which was the only reason I was using it.
My new problem though is DE-SELECTING a selected target. If I can work out how to do that, I can have right/left mouse click fired instant abilities AKA diablo 2/3.
Thats all I am looking for atm.
#8
Posté 23 avril 2012 - 12:24
Ashw3 wrote...
Anyway, I got the camera to act like the overland map in normal mode, which was the only reason I was using it.
could i ask what you did to restrict the camera in normal game mode?
#9
Posté 23 avril 2012 - 01:27
This is what I did:
1: Set the Keymap.2da file to not have a camera move button and automatically apply the reset key defaults via gui OnAdd
2: Set the nwn2player.ini file to have 0.0 as the movement rates for a specific camera (looking into also doing this automatically by the GUI OnAdd)
3: Did an assigncommand(setcamerafacing)
4: Set the spawn in points to all face the actual direction, as setcamerafacing doesnt work right.
Doing this allowed me to replicate the overland map viewpoint.
1: Set the Keymap.2da file to not have a camera move button and automatically apply the reset key defaults via gui OnAdd
2: Set the nwn2player.ini file to have 0.0 as the movement rates for a specific camera (looking into also doing this automatically by the GUI OnAdd)
3: Did an assigncommand(setcamerafacing)
4: Set the spawn in points to all face the actual direction, as setcamerafacing doesnt work right.
Doing this allowed me to replicate the overland map viewpoint.
#10
Posté 23 avril 2012 - 10:51
Ashw3 wrote...
Yeah, the overland map function is extremely shoddily done. Did you know that certain hotkeys dont fire in the OL simply because they werent coded in? The GUI buttons for them work fine, but the hotkeys dont work.
That was deliberate. The OC OLM scripts removed the standard GUIs, which would have been pointless if the hotkeys still worked.
#11
Posté 24 avril 2012 - 02:42
The GUI buttons for them work fine, but the hotkeys dont work.
They didnt disable the GUI's at all. They still come up if you open them with the player menu. They are still fully functional and work fine. Doing my remapping I discovered this, very frustratingly.





Retour en haut






