Game Development Community

New explosion() function

by Nick Matthews · in Torque Game Engine · 01/03/2006 (6:32 pm) · 3 replies

It seems to me that this function is only clientside, but thats only what i've heard. Im using this script here:

%p = new explosion() {
dataBlock = FWRocket1Explosion;
position = %pos;
};

missionCleanup.add(%p);

It should work. its fine for me when i do it ingame, but everyone else on the server says they cant see it.

#1
01/04/2006 (2:51 am)
Yes that's correct, it is only setup as a client object. You can create a projectile with the explosion you want and blow that up where you want, because projectiles send the explosion to all the clients when they die. Or just go the explosion class and add what is necessary to make it a server object as well. Just what that is, I'm not exactly sure, but I would look at the ParticleEmitterNode class and what it does with ParticleEmitters, and maybe the Projectile::Explosion function.
#2
01/05/2006 (5:58 pm)
Sorry, how do i choose where a projectile blows up? Thats what i was trying to "hack" using the new Explosion() function.
#3
01/08/2006 (1:51 am)
You have to make it happen on the clients. Right now explosions tend not to get networked. So you can either send a client event to make it spawn on all the clients, or do other more abstruse things...