Game Development Community

GPGT Chapter 11 - Issues and Questions

by Edward F. Maurina III · in Torque Game Engine · 05/16/2006 (10:42 pm) · 6 replies

Hello All. This thread is dedicated to any questions or issues that you may find in this chapter.

If you have issues and questions for other chapters, please post them in the appropriate thread:
Chapters 1 & 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14

GPGT Support Page
Appendix E. Maze Runner Lessons (Steps Only) - Covers Mac and Windows
OSX Executable - Use for GPGT Lesson Kit and MazeRunner

#1
08/31/2006 (8:35 pm)
Hi,

I think I'm having trouble with the script archetecture.

I'm trying to use FireyExplosion to create a standalone Explosion datablock object and cause an
explosion onCollision(), but when I execute the following code
from my AIPlayer (Bot_1.cs) it sayes FireyExplosion is not a member of GameBasedData
I've used all the ExplossionLesson.cs files and the provided Particle emitters
they are loading ok without errors


//My datablock works ok (except the explosion)
datablock PlayerData( bot_1 )
{
renderFirstPerson = false;


// this does nothing ! regardless
explosion = FieryExplosion;
...
};

//----------------------------------------------------------------------

function Bot_1::onCollision(%this,%obj,%col)
{


if(%obj.explosion $= "")
{
%explode = %obj.getdatablock();
}else{
%explode = %obj;
}

%p = new Explosion()
{
dataBlock = %explode.explosion;
position = %obj.getPosition();
};
MissionCleanup.add(%p);
}


No matter what I try it sayes FireyExplosion is not a member of GameBasedData
I don't want to use an ItemData class with a explosion datablock because I need to create
the explosion on the fly, does it haft to be attached to the explosion member of an objects datablock?

I'm confused and don't know what to do :(

Please help.


Thanks,
Areal Person
#2
09/28/2006 (9:19 pm)
Hello,

In 11.1.5 talking about Using Debris

to Standalone instance of debris is as easy by the following.

datablock DebrisData(standaloneDebris){
//fill in parametes to suit blabla
};

%myDebris = new Debris(){
datablock = standaloneDebris;
position = "10 10 10"; //for example
};

but it didn't execute as is.. but in console log i found that an error as occured when executing this new Debris()
error message : "Register object failed for object (null) of class Debris"
can u guys help me with this ?

i found a thread about this in forum but still no answer until now http://www.garagegames.com/mg/forums/result.thread.php?qt=34365

thank you in advance.
#3
10/27/2006 (7:20 pm)
@Areal Person - I've e-mailed you.

@ Suryadiputra - I would suggest that you try using the 'created by explosion' method that I used in the samples found here:

"GPGT LessonKit\gpgt\3DLessons\Volume1\009_SpecialEffects\Debris"

in these files:

DebrisLessonDBs.cs
DebrisLessonMethods.cs

At this time, i think that the "standalone method" I've given in the book will in fact NOT work. I do apologize for the confusion. However (fortunately), you can successfully create debris w/ an explosion as I've shown in the Debris sample.

I hope that this meets your needs.

www.hallofworlds.com/how.ico Hall Of Worlds - For Gamers
EdM|GPGT
#4
01/04/2007 (12:06 am)
Page 437, first sentence in the Projectiles section reads:

Quote:Although the concept of a particle has a very strong tie to weapons...

After further reading, I realized that it should read as such:

Quote:Although the concept of a projectile has a very strong tie to weapons...


Not that this will end up causing problems for anybody; just thought I'd mention it.
#5
03/01/2009 (4:28 pm)
BaseRain isn't showing up when I'm supposed to add precipitation. Any help?
#6
03/02/2009 (6:22 pm)
Shane,

Are you using the disk from the book or the downloaded disk?

If you haven't already, I suggest you get the latest version of the disk for my book here.


If you are using the latest version of the disk and this problem still happens, please let me know in a reply. At that point, I'll probably start an e-mail thread with you and we can figure out what is going wrong.

-Ed M.