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
in void PlayerData::packData(BitStream* stream) I added
now in player.h I added
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
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 addedJumpEmitter = 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
About the author
Torque Owner Donavan Jones