Issues with a resource, new to this
by Jon C · in Torque Game Engine · 03/12/2007 (11:15 pm) · 4 replies
Ok well I am new to this and im looking for some help.
I am working on getting all the extras and such that are needed in our engine put into place and I thought this jump as long as the key is pressed resource was great, especially the bit that makes the player fall... unfortunately, that is the bit I have not been able to get working.
This resource is what I was following
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10244
Last lines of my console.log.
Jump Command
Mapping string: JumpCharge to index: 3
Release Jump
Mapping string: JumpChargeRelease to index: 4
project.dee/server/scripts/commands.cs (90): Unknown command setForceFalling.
Object (1553) Player -> ShapeBase -> GameBase -> SceneObject -> NetObject -> SimObject
Now I just am totally lost, I don't even really understand this part " Object (1553) Player -> ShapeBase -> GameBase -> SceneObject -> NetObject -> SimObject"
If anyone could help point me in the right direction, it would be much appreciated.
Thank you in advance.
I am working on getting all the extras and such that are needed in our engine put into place and I thought this jump as long as the key is pressed resource was great, especially the bit that makes the player fall... unfortunately, that is the bit I have not been able to get working.
This resource is what I was following
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10244
Last lines of my console.log.
Jump Command
Mapping string: JumpCharge to index: 3
Release Jump
Mapping string: JumpChargeRelease to index: 4
project.dee/server/scripts/commands.cs (90): Unknown command setForceFalling.
Object (1553) Player -> ShapeBase -> GameBase -> SceneObject -> NetObject -> SimObject
Now I just am totally lost, I don't even really understand this part " Object (1553) Player -> ShapeBase -> GameBase -> SceneObject -> NetObject -> SimObject"
If anyone could help point me in the right direction, it would be much appreciated.
Thank you in advance.
#2
From just quickly glancing at that resource, it looks as though the author forgot to include the corresponding ConsoleMethods needed to actually access the get/setForceFalling() methods via script. Essentially setForceFalling can be called in the engine but the scripting system has no knowledge of it. You'll need to add the ConsoleMethods for getForceFalling/setForceFalling before the script will work.
03/12/2007 (11:29 pm)
The last two lines are indicating that the "setForceFalling" method doesn't exist for that particular object (with an ID of 1553). The "Player -> ShapeBase -> GameBase -> SceneObject -> NetObject -> SimObject" portion is simply showing you the hierarchy of the object in question. The object you tried to call setForceFalling() on is apparently a Player object (which extends ShapeBase, which extends GameBase, and so on). From just quickly glancing at that resource, it looks as though the author forgot to include the corresponding ConsoleMethods needed to actually access the get/setForceFalling() methods via script. Essentially setForceFalling can be called in the engine but the scripting system has no knowledge of it. You'll need to add the ConsoleMethods for getForceFalling/setForceFalling before the script will work.
#3
Interesting resource....
03/12/2007 (11:37 pm)
This would be a nice thing to paste into the comments on that resource, once you have it.Interesting resource....
#4
With some tweaking i was able to come up with these.
this gets it working the way it was supposed to. It definately is a fun little superjump, now to just add variables for maximum jump height as well as scaling impact damage based on maximum jump height.. Realistically I think anyone who can jump up 100 feet should easily be able to survive a drop of 100 feet hehe
03/13/2007 (2:34 am)
Thank you Chris Haigler for setting me in the right direction.With some tweaking i was able to come up with these.
ConsoleMethod( Player, setForceFalling, void, 2, 4, "(bool mForceFalling)")
{
object->setForceFalling();
}
ConsoleMethod( Player, getForceFalling, bool, 2, 2, "(bool mForceFalling)")
{
return object->getForceFalling();
}this gets it working the way it was supposed to. It definately is a fun little superjump, now to just add variables for maximum jump height as well as scaling impact damage based on maximum jump height.. Realistically I think anyone who can jump up 100 feet should easily be able to survive a drop of 100 feet hehe
Torque Owner Lee Latham
Default Studio Name
On the other hand, the error message probably telling you something important, like it cannot find a command setForceFalling. Can you think of any reason that might be?
(I hope I don't sound like a smartass--I'm not being one...I don't know the answer...I'm just going on the info you've offered)