Thank you
display Localized Description
#1
Posté 17 septembre 2010 - 01:10
Thank you
#2
Posté 17 septembre 2010 - 03:07
#3
Posté 17 septembre 2010 - 06:12
rjshae wrote...
Would DisplayMessageBox serve?
There's hundreds of lines when I drop-down On Used Script. I don't remember ever scripting with NWN2 before and I didn't think I'd have to go through such a number of possibilities.
Any tip would help.
#4
Posté 17 septembre 2010 - 08:34
Will that work for you?
Modifié par rjshae, 17 septembre 2010 - 08:35 .
#5
Posté 18 septembre 2010 - 05:01
If you want them to take the scroll then you could use a tag based acquire script to display a message box using the DisplayMessageBox command that displays the description text retrieved with the GetDescription function.
Regards
#6
Posté 18 septembre 2010 - 06:15
Kaldor Silverwand wrote...
You don't need a script for this. I use the same technique in King's Festival. Just use a scroll placeable, set it to usable and its default action preference to Examine. Then when you click on it its description is displayed.
Ah yeah great! It even has the eye icon which is even better than if I managed the script. I tried it in a new module.
Kaldor Silverwand wrote...
If
you want them to take the scroll then you could use a tag based acquire
script to display a message box using the DisplayMessageBox command
that displays the description text retrieved with the GetDescription
function.
I was trying to use the ActionExamine, I thought it was even better than DisplayMessageBox. I made the following script naming it i_scrollinnnote_us that I placed in On Used Script of the scroll tagged ScrollInnNote. and I followed what's in Required and Suggested.
// Placeable OnUsed Template
/*
Required: Static=FALSE, Usable=TRUE, CurrentHP>0, attach script to the OnUsed event
Suggested: Plot=TRUE, DefaultActionPreference="Use"
*/
//
#include "ginc_debug"
void main()
{
object oUser = GetLastUsedBy();
string sSelfName = GetName( OBJECT_SELF );
PrettyDebug( sSelfName + "'s was used by " + GetName( oUser ) );
// Do something
// I realised the script would only be activated by ScrollInnNote so no need for verification.
//if ( sSelfName == "ScrollInnNote" ) {
ActionExamine( OBJECT_SELF );
//}
}
Now that clicking a scroll does examine it, I'm wondering if there's a way to have it highlighted until it's examined. I could have it in the journal to check the pillow note but that seem inane, the player could very well figure out on his/her own that those items (see OP) belong to the Inn. Addressed in Highlight object until examined.
Modifié par DynV, 19 septembre 2010 - 08:18 .
#7
Posté 22 septembre 2010 - 06:47
Modifié par rjshae, 22 septembre 2010 - 06:51 .
#8
Posté 22 septembre 2010 - 07:06
rjshae wrote...
You might also be able to adopt the "Secret Object" placeable to have a party member say they found something when they get nearby.
That sound like a good idea!
Modifié par DynV, 22 septembre 2010 - 07:08 .
#9
Posté 23 septembre 2010 - 06:27
DynV wrote...
rjshae wrote...
You might also be able to adopt the "Secret Object" placeable to have a party member say they found something when they get nearby.
That sound like a good idea!I'll finish up with the highlighting for tutorial purposes then get to it. Although... In cases where "Secret Object" was used (I don't recall it in the campaign), doesn't it have a visual effect showing which object was just discovered?
The only effect I recall is that of replacing one object with another.
#10
Posté 26 septembre 2010 - 12:23
Thanks ../../../images/forum/emoticons/smile.png
Modifié par DynV, 26 septembre 2010 - 12:24 .
#11
Guest_ElfinMad_*
Posté 26 septembre 2010 - 09:19
Guest_ElfinMad_*
You can put your script in the On Left Click event for the object and have the examine window come up (if thats the default action) and run your script to remove the effect.
Looking at your script in your other thread the ActionExamine() won't work as intended because you have not assigned it to the player. You would need to do something like this:
object oPC = GetLastUsedBy(); //if using the onused event
AssignCommand(oPC, ActionExamine(OBJECT_SELF));
But I think this is all unecessary if you use Kaldor's approach.
Modifié par ElfinMad, 26 septembre 2010 - 09:19 .





Retour en haut






