Projectile particles not appearing on client
by John Doppler Schiff · in Torque Game Engine · 03/21/2007 (3:23 pm) · 3 replies
Hi folks,
My game has a teleporter, and I'd like to create a particle effect when the player ports from one location to another. Seems like pretty straightforward stuff, but results on the client side are peculiar.
Here's what I'd like to happen:
1. Player triggers teleporter via dialog.
2. Server creates teleportation particle effect at the launch site.
3. Server creates teleportation particle effect at the destination.
4. Server moves the player to the destination.
I'm spawning the particles by creating a new projectile. The only way I've gotten this to work is to schedule these as events with a 4-second delay between each one. Any shorter than that, and the particles don't appear. The associated sound effect triggers, however.
I know the particle definitions are fine, they work beautifully in other circumstances. It's just when two are spawned by the server in rapid succession, one or both are lost.
Here's the function I'm calling with schedule:
%loc holds the coordinates of the flash, %srcObject is the client in this case.
Anyone have an idea what's going on here? Or a better way to spawn networked particle bursts?
My game has a teleporter, and I'd like to create a particle effect when the player ports from one location to another. Seems like pretty straightforward stuff, but results on the client side are peculiar.
Here's what I'd like to happen:
1. Player triggers teleporter via dialog.
2. Server creates teleportation particle effect at the launch site.
3. Server creates teleportation particle effect at the destination.
4. Server moves the player to the destination.
I'm spawning the particles by creating a new projectile. The only way I've gotten this to work is to schedule these as events with a 4-second delay between each one. Any shorter than that, and the particles don't appear. The associated sound effect triggers, however.
I know the particle definitions are fine, they work beautifully in other circumstances. It's just when two are spawned by the server in rapid succession, one or both are lost.
Here's the function I'm calling with schedule:
%srcFlash = new Projectile(sourceParticles)
{
datablock = SparkleSource1;
initialVelocity = "0 0 0.2";
initialPosition = %loc;
sourceObject = %srcObject;
sourceSlot = 0;
};%loc holds the coordinates of the flash, %srcObject is the client in this case.
Anyone have an idea what's going on here? Or a better way to spawn networked particle bursts?
#2
03/24/2007 (9:05 pm)
Is there a reason you are using a projectile for this instead of spawning a particle emitter?
#3
03/24/2007 (10:31 pm)
For the effect I'm looking for, I need to move the source of the particles upwards to create a trail, and I needed a light source and sound associated with it. Since projectiles had everything I needed already built in, I figured repurposing them made sense.
Torque Owner John Doppler Schiff
I was spawning the projectiles on the player's location, so naturally, they collided with the player and terminated immediately.
Now, I just need to convince the projectiles not to self-terminate on collision. =)