writeFlag( Jump"> PlayerJumpEmitter | Torque Game Engine | Forums | Community | GarageGames.com

Game Development Community

PlayerJumpEmitter

by Donavan Jones · in Torque Game Engine · 08/06/2006 (8:43 pm) · 3 replies

Ok in player.cc in void PlayerData::initPersistFields() I added

addField("JumpEmitter",   TypeParticleEmitterDataPtr,   Offset(JumpEmitter,    PlayerData));


in void PlayerData::packData(BitStream* stream) I added
if( stream->writeFlag( JumpEmitter ) )
   {
      stream->writeRangedU32( JumpEmitter->getId(), DataBlockObjectIdFirst,  DataBlockObjectIdLast );
   }
in PlayerData::PlayerData() I added

JumpEmitter = NULL;
   JumpEmitterID = 0;
in bool PlayerData::preload(bool server, char errorBuffer[256]) I added


if (!JumpEmitter && JumpEmitterID != 0)
      if (!Sim::findObject(JumpEmitterID, JumpEmitter))
         Con::errorf(ConsoleLogEntry::General, "PlayerData::preload - Invalid packet, bad datablockId(footPuffEmitter): 0x%x", JumpEmitterID);


now in player.h I added


ParticleEmitterData * JumpEmitter;
   S32 JumpEmitterID;


Right Above the FootPuffEmitter

Ok I am a noobie at all of this so be genetal. I complie and everthing went well. In My player.cs file I added the JumpEmitter in player data and gave it a particle to emit. I know I didnot add anything about using the JumpEmitter with jumping so I need to know how to do that and if I got the new Emitter setup for a player

thanks

-Don

#1
08/07/2006 (4:12 pm)
Damn it i guess I am not getting help
#2
08/07/2006 (4:18 pm)
Not even 24 hours and already complaining. :)
#3
08/07/2006 (5:25 pm)
Well I got excited that it complied without an error and want some help to finish it off.