Problem on RPG dialog addon from
by Lynn Song · in Torque Game Engine · 12/14/2004 (9:16 pm) · 3 replies
Is there anyone using RPG dialog by Nelson A. K. Gonsalves?
I met a problem while using it:
function spawntestnpc(); could be called and npc appears, but the TalkTo() function never get called when I press q key.
it is inside xxx\client\scripts\default.bind.cs:
------------------------------------------------------------------
function TalkTo(%val)
{
echo("Calling TalkTo()");
if(%val)
echo("Calling commandToServer()");
commandToServer('RPGDialogRay');
}
moveMap.bind( keyboard, "q", TalkTo );
------------------------------------------------------------------
I am using the demo mod but not the starter.fps within the SDK, I will try putting them together inside starter.fps. But, anyone could help me figure out what's happening? Thx
I met a problem while using it:
function spawntestnpc(); could be called and npc appears, but the TalkTo() function never get called when I press q key.
it is inside xxx\client\scripts\default.bind.cs:
------------------------------------------------------------------
function TalkTo(%val)
{
echo("Calling TalkTo()");
if(%val)
echo("Calling commandToServer()");
commandToServer('RPGDialogRay');
}
moveMap.bind( keyboard, "q", TalkTo );
------------------------------------------------------------------
I am using the demo mod but not the starter.fps within the SDK, I will try putting them together inside starter.fps. But, anyone could help me figure out what's happening? Thx
#2
otherwise that commandtoserver will be called once when you press the key, and once when you release it. I doubt this is the problem unless that function toggles the dialog, but it's something you should be aware of.
12/14/2004 (9:43 pm)
I've never tried using this resource, but I think you've made a syntax error. If you intend for the command to server line to be contained within the if statement, it should look like this:function TalkTo(%val)
{
echo("Calling TalkTo()");
if(%val)
{
echo("Calling commandToServer()");
commandToServer('RPGDialogRay');
}
}otherwise that commandtoserver will be called once when you press the key, and once when you release it. I doubt this is the problem unless that function toggles the dialog, but it's something you should be aware of.
#3
12/14/2004 (9:53 pm)
Thanks a lot for noticing the error! I really should be more careful on basics even using scripting:)
Torque Owner Lynn Song