Jump to content
Sign in to follow this  
meatball

Particle Effect Attached to Player Through Respawns?

Recommended Posts

There a simple way to take a particle effect and 'reattach' it to a player after they've respawned?

Share this post


Link to post
Share on other sites

I tried that, but it's actually crashing to desktop with that. Here's a little bit more background. I've got the script that creates particles around the players using functions. One function call will actually start the particles.

fnc_part_start = {
       private["_unit","_emitter","_partEH"];
       _unit = _this select 0;
       _emitter = [_unit] call fnc_part_getEmitter; // Function to check if the emitter exists, and if not, run another function to initialize the emitter and attach it to the player.
_emitter setDropInterval 0.0009;
_partEH = _unit addEventHandler ["killed", {[player] call fnc_part_start;}];		
};

You'll notice I switched to respawn instead of MPRespawn (have also tried killed/MPKilled), because the MP versions were actually crashing Arma to desktop.

Additionally, I'm using BTC revive, which I know uses some killed eventhandlers. Not sure if that could be crashing it.

Share this post


Link to post
Share on other sites

Have you tried removing the above function completely in the respawn eventhandler and going straight to the script start? If you know the emitter doesnt exist on respawn, then there is no reason to check for it.

But the reason you are probably crashing is because you are calling the function you are running. I've never seen a function call itself.

Add that addeventhandler somewhere outside of the function, like in the main script, or somewhere else. Or change it to call the getEmitter function.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×