MountImage is unknown command
by J · in Torque Game Engine · 04/02/2008 (3:42 pm) · 4 replies
I re-wrote the tutorial.base from the ground up to get a better understanding of the whole process. But I'm having troubles with mounting weapons...
I have a basic stick...all joints (mountpoint, damage points)...are setup correctly, but I'm getting a this:
And the same thing for mountImage
All the hooks are setup in starter.fps I'm having problems tracking down where I'm getting my mountImage and unmountImage commands messed up.
According to the error, I'm just not setup into the hierarchy correctly.
I can mount the image when executing the player.cs through the onAdd method:
but I don't want it to work that way...to tilde and type:
I can almost answer my own question...but where and how do you setup the parent for the shapebase object that ties into the mountImage/unmountImage methods?...or is that correct at all?
Any ideas?
I have a basic stick...all joints (mountpoint, damage points)...are setup correctly, but I'm getting a this:
<input> (0): Unknown command unmountImage. Object LocalClientConnection(1432) GameConnection -> NetConnection -> SimGroup -> SimSet -> SimObject
And the same thing for mountImage
All the hooks are setup in starter.fps I'm having problems tracking down where I'm getting my mountImage and unmountImage commands messed up.
According to the error, I'm just not setup into the hierarchy correctly.
I can mount the image when executing the player.cs through the onAdd method:
function Armor::onAdd(%this,%obj)
{
parent::onAdd(%this,%obj);
%obj.mountImage(StickImage,0);
%obj.setImageAmmo(0,1);
}but I don't want it to work that way...to tilde and type:
$hero.mountImage(StickImage, 0);No go...
I can almost answer my own question...but where and how do you setup the parent for the shapebase object that ties into the mountImage/unmountImage methods?...or is that correct at all?
Any ideas?
About the author
I used to be obsessed with building my own open-ended RPG and a 3D Side Scroller RPG. But the job/house/girlfriend got in the way. I know, I know. Now I concentrate on doing architectural renderings (with the help of T3D of course) and VBA programming.
#2
04/03/2008 (11:50 am)
Got it figured out,
#3
You most probably wanted to use this command on the player's avatar, which by convention (stock) is %connection.player (whatever variable you are using when calling the method should replace "%connection").
04/03/2008 (12:04 pm)
You mentioned you figured it out, but in case that was a false finding, the problem is that you are trying to call a function on a GameConnection object that doesn't exist for that object's namespace.You most probably wanted to use this command on the player's avatar, which by convention (stock) is %connection.player (whatever variable you are using when calling the method should replace "%connection").
#4
Just need to keep learning.
Thank you guys.
04/04/2008 (6:10 am)
I did get it figured out about ten minutes after I posted. Just trying to cheat a little because I was confused on the client/server connection calling the player. It took me a while to figure out what was going on.Just need to keep learning.
Thank you guys.
Torque Owner Cinder Games