Platforms Players can Ride Version 1.1
by Cinder Games · in Torque Game Engine · 01/27/2007 (4:34 pm) · 268 replies
Platforms Players can Ride Version 1.2!!!!!!
with Dynamic object Attachment
###################################
##This post has been edited and updated 2/13/07 ##
##################################

Here's the new and improved files you'd need.
Version 1.2
subvoicestudios.com/~ramensama/torque1.5.2.zip
1.7.2008
What's new? There are several new features and improvements.
1) Removed or reduced jitter caused by multiple players on a platform
2) Support for new items on platforms. Now Items, Shapes, lights, particle emitters, and possibly others!
3) Object to object Attachment. Players can now attach Items, shapes, etc to them. Even the attached objects can attach more objects to themselves!
4) Reduced the number of code changes.... a little.
This must be extracted in the base torque directory where it's installed...
c:/torque
or whatever. it's designed to simply overwrite a stock install of torque.
Afterwards you must add pathshape.cc and pathshape.h to your project in visual studio or whatever.

To attach an object, you must use this syntax:
ParentObject.attachChild(ChildObject);
So if you want to attach an item to the player, move the player towards the object, press F11 to get the object ID. Press ~ and type in $player.attachchild(ObjectID);
The item is now attached to the player.
$player.detachchild(ObjectID); is how to remove the object.
Ancient Versions of the code can be found here.
These are version 1.1, not the newest version and probably have bugs that the newer code does not.
Here's a link to the new updated code. It's for torque 1.4...
subvoicestudios.com/~ramensama/torque.zip
And for Torque 1.5
subvoicestudios.com/~ramensama/torque1.5.zip
with Dynamic object Attachment
###################################
##This post has been edited and updated 2/13/07 ##
##################################

Here's the new and improved files you'd need.
Version 1.2
subvoicestudios.com/~ramensama/torque1.5.2.zip
1.7.2008
What's new? There are several new features and improvements.
1) Removed or reduced jitter caused by multiple players on a platform
2) Support for new items on platforms. Now Items, Shapes, lights, particle emitters, and possibly others!
3) Object to object Attachment. Players can now attach Items, shapes, etc to them. Even the attached objects can attach more objects to themselves!
4) Reduced the number of code changes.... a little.
This must be extracted in the base torque directory where it's installed...
c:/torque
or whatever. it's designed to simply overwrite a stock install of torque.
Afterwards you must add pathshape.cc and pathshape.h to your project in visual studio or whatever.

To attach an object, you must use this syntax:
ParentObject.attachChild(ChildObject);
So if you want to attach an item to the player, move the player towards the object, press F11 to get the object ID. Press ~ and type in $player.attachchild(ObjectID);
The item is now attached to the player.
$player.detachchild(ObjectID); is how to remove the object.
Ancient Versions of the code can be found here.
These are version 1.1, not the newest version and probably have bugs that the newer code does not.
Here's a link to the new updated code. It's for torque 1.4...
subvoicestudios.com/~ramensama/torque.zip
And for Torque 1.5
subvoicestudios.com/~ramensama/torque1.5.zip
#182
Why is the player falling thru? is there a proper collision mesh on the "elevator object"? how are you creating the object?
02/21/2008 (2:31 pm)
@ Picasso. Don't Use the 1.4 port unless there's some reason you must. The 1.4 version is a year old. The 1.5 and 1.5.2 are newer revisions with bug fixes and added. The reason it's crashing is because of what i mentioned billy vee had found an error with regarding notification of parent objects that child objects are deleted. I suppose i should have stated that the 1.4 version isn't exactly the same "version" as the newer 1.5.2 code. Jerkiness and crashes should not happen in the newer code.Why is the player falling thru? is there a proper collision mesh on the "elevator object"? how are you creating the object?
#183
I create the platform that way:
datablock PathShapeData(LoopingShape)
{
emap = true;
// put path to your shape here!!
shapefile = "~/data/shapes/platform/platform.dts";
mode = "";
};
%a = new PathShape() {
dataBlock = LoopingShape;
position = "85.46 -216.34 0.02";
};
MissionCleanup.add( %a );
02/21/2008 (11:20 pm)
The player fell thru anly once with 1.4 revision code, today i'll try the new code.I create the platform that way:
datablock PathShapeData(LoopingShape)
{
emap = true;
// put path to your shape here!!
shapefile = "~/data/shapes/platform/platform.dts";
mode = "";
};
%a = new PathShape() {
dataBlock = LoopingShape;
position = "85.46 -216.34 0.02";
};
MissionCleanup.add( %a );
#184
In the game or the platforms? I'm using the 1.5.2 code, and the platform is jerking like there's no tomorrow.
02/23/2008 (3:58 am)
Quote:Jerkiness and crashes should not happen in the newer code
In the game or the platforms? I'm using the 1.5.2 code, and the platform is jerking like there's no tomorrow.
#185
So i gotta ask how you implemented it? winmerge? or just copied the files over?
02/23/2008 (11:42 am)
@Nathan Either. Code's been tested extensively on my machine. it doesn't jerk on my machine.So i gotta ask how you implemented it? winmerge? or just copied the files over?
#186
Edit->I'm using AFX if that makes a difference.
02/23/2008 (7:15 pm)
I used BeyondCompare, and I'm getting the same platform jerks that are described by Jason Davis above.Edit->I'm using AFX if that makes a difference.
#187
Does it still jerk that way? How bout items attached to the player, do they jerk?
02/23/2008 (7:28 pm)
Try doing so with a clean install, copy over the files. Add the pathshape, and then compile. use the default character. Does it still jerk that way? How bout items attached to the player, do they jerk?
#188
By the way i did a research in the code for differences in 1.4/1.5.2, there is a very little ones.
Bill Vee wrote that there are no errors and the code is 100% stable, already i doubt that he did the port.
There is another one member here that maintain the code is unstable, so i am sure that in fact there is an error.
I can upload the files, so all user can test the mod, i am 100% convinced that they will get the same exception on the second start of TGEA.
Found another bug - when i create dynamical the platform - everything is working fine.
When i try to create the object in mission creator, an eventual dump() points that followpath is missing and the script isn't working (an eventual runtime exec only give a proof that;)
02/24/2008 (9:29 am)
I did the 1.5.2 port to TGEA, same exception occured.By the way i did a research in the code for differences in 1.4/1.5.2, there is a very little ones.
Bill Vee wrote that there are no errors and the code is 100% stable, already i doubt that he did the port.
There is another one member here that maintain the code is unstable, so i am sure that in fact there is an error.
I can upload the files, so all user can test the mod, i am 100% convinced that they will get the same exception on the second start of TGEA.
Found another bug - when i create dynamical the platform - everything is working fine.
When i try to create the object in mission creator, an eventual dump() points that followpath is missing and the script isn't working (an eventual runtime exec only give a proof that;)
#189
When Ramen posted his original code way back over a year ago I first tried it as is. Then I applied some code from the player to the vehicle class. Again worked fine . I then ported it to to TGEA no less then 4 different times with clean installs. Why 4 times, TGEA's point releases as well as 2 complete fresh starts on my game. I understand I am showing it work on a vehicle and not a pathshape but it works just as well on pathshapes.
As for the unhandled exception your getting sounds like it is a invalid mGraph.parent pointer.
Compile a debug version and run it till the error and I bet you will see the mGraph.parent pointer is null or unknown.
02/24/2008 (11:11 am)
@Picasso I understand your frustration for not being able to get this to work but if you can't believe your own eyes I don't know what to tell you.When Ramen posted his original code way back over a year ago I first tried it as is. Then I applied some code from the player to the vehicle class. Again worked fine . I then ported it to to TGEA no less then 4 different times with clean installs. Why 4 times, TGEA's point releases as well as 2 complete fresh starts on my game. I understand I am showing it work on a vehicle and not a pathshape but it works just as well on pathshapes.
As for the unhandled exception your getting sounds like it is a invalid mGraph.parent pointer.
Compile a debug version and run it till the error and I bet you will see the mGraph.parent pointer is null or unknown.
#190
I have the platform working like you. I am talking about a strange exception with a second start of TGEA (that occures when deleting the object in TS).
I don't now how stable is with vehicles, but when using the player class there is still the error.
The other problem is the platform can work only with dynamic spawn.
02/24/2008 (11:29 am)
Billy my friend, your video tells exactly nothing.I have the platform working like you. I am talking about a strange exception with a second start of TGEA (that occures when deleting the object in TS).
I don't now how stable is with vehicles, but when using the player class there is still the error.
The other problem is the platform can work only with dynamic spawn.
#191
So give something back to the resource - find the problem and fix it. Or provide more information so someone can help. You certainly sound knowledgeable enough, go for it!
02/24/2008 (11:45 am)
@Picasso So give something back to the resource - find the problem and fix it. Or provide more information so someone can help. You certainly sound knowledgeable enough, go for it!
#192
If so, Is it crashing loading or exiting on the second try?
What is a TS?
I don't quite understand what you mean by "dynamic spawn". The player ,the pathshape or what?
Are you saying you spawn the player over the platform on mission start?
If so I can see where some extra code might be needed.
02/24/2008 (12:10 pm)
@Picasso I think I am missing something here.Quote:I assume if you start a mission then exit the mission and start it again it crashes?
I am talking about a strange exception with a second start of TGEA (that occures when deleting the object in TS).
If so, Is it crashing loading or exiting on the second try?
What is a TS?
Quote:
The other problem is the platform can work only with dynamic spawn.
I don't quite understand what you mean by "dynamic spawn". The player ,the pathshape or what?
Are you saying you spawn the player over the platform on mission start?
If so I can see where some extra code might be needed.
#193
02/24/2008 (12:25 pm)
FYI, i purchased TGEA on friday. I'm going to get a TGEA version of the code after i figure out how to get missions running and all that good stuff
#194
The actual Debug info is "Out of bounds value" in bool SceneObject:isChildOf(..), i'll try to study that a while.
TS .. i mean TorqueScript.
dynamic spawn .. i mean dynamic creation of the object in TS, not in World Creator.
Ramen, welcome in the club :)
02/24/2008 (12:51 pm)
Yes Billy, the second try it crashes, the first otry is a good and stable one, everything is working well, i have a simple path(3 markers) and the platform is moving around them, collision is good.The actual Debug info is "Out of bounds value" in bool SceneObject:isChildOf(..), i'll try to study that a while.
TS .. i mean TorqueScript.
dynamic spawn .. i mean dynamic creation of the object in TS, not in World Creator.
Ramen, welcome in the club :)
#195
home.comcast.net/~toons2005/platformtest.avi
In TGE 1.5 tho, so dont know about the others
TomFeni
02/24/2008 (1:11 pm)
Work ok for me.. :)home.comcast.net/~toons2005/platformtest.avi
In TGE 1.5 tho, so dont know about the others
TomFeni
#196
02/24/2008 (2:14 pm)
I tried copying over the files, and you can't do it with AFX. So, I merged the files with a clean build, and I get the same results.
#197
Is AFX distributed like the torque SDK?
If thats the case, why don't you trying applying it to the torque SDK?
02/24/2008 (7:42 pm)
I'm a little confused, mostly because i don't have AFX.Is AFX distributed like the torque SDK?
If thats the case, why don't you trying applying it to the torque SDK?
#198
02/25/2008 (2:41 am)
AFX is distributed exactly the same way as TSDK. When I get home this afternoon, I'll add this to my copy of afx and see if I get the same errors.
#199
So does that mean the code you were talking about is in, Ramen?
02/25/2008 (1:43 pm)
Quote:Platforms Players can Ride Version 1.2!!!!!!
with Dynamic object Attachment
So does that mean the code you were talking about is in, Ramen?
#200
the code at the top supports player attaching objects, but not on the node level. the objects are attached to the player, and don't move during player animations.
The attachment to nodes code is in my personal build, which i may get around to releasing. Also player attachment to animated meshes is in the works.
02/25/2008 (3:07 pm)
@Maddermadcatthe code at the top supports player attaching objects, but not on the node level. the objects are attached to the player, and don't move during player animations.
The attachment to nodes code is in my personal build, which i may get around to releasing. Also player attachment to animated meshes is in the works.
Torque Owner Giorgio Zanetti ( JoZ )
Corona Team
I don't like to scream against people but I like even less to see people criticise with bad attitude the works of other people...
I'm happy to see that probably it was only uncompriension and you hadn't such a bad attitude in your post ;)
So my excuses are needed ;)
JoZ