Jump to content
Mynock

Getting particle script to follow camera in intro?

Recommended Posts

I'm using a script that generates particles around the player's position during a mission to create an effect (not my script, it's one of goon's scripts). I want to use this script in the mission intro as well, but I can't figure out how to get the script to identify the camera as the "player" so that it'll spawn the particles around the camera. Currently as the camera moves (I am using @aliascartoons intro camera script) the particle effects are not spawned until the camera gets close enough to the player. This kills the effect I want and make it look stupid during the intro sequence. Any suggestions? I'm lost. Obviously I know I need to change the vehicle to whatever the camera is so the script will "follow" it, I'm not so stupid I don't know that, but how to get the script to follow the camera as an object is where I can't figure out what to do.

 

The particle spawning scripts uses the following check at the beginning of its loop

 while {true} do {		
	       _obj = (vehicle player);
	       _pos = getposASL _obj;

I've tried changing the word "player" in that the things like "camera" and whatnot, but I can't get it working. After the camera is created in Alias' script, how can I go about naming it without messing up the camera script?

_camera = "camera" camCreate (getpos _campos1);

^That is what is used in Alias' script to create the camera.

 

Do I need to make an object that follows the camera somehow maybe? I tried that but I probably did it wrong because it didn't work.

 

This is probably a really stupid question, so I apologize for my ignorance, but I can't seem to get the intro the way I'm hoping and, without the effect spawning the particles at all times moving with the camera, it's pretty useless in the video if they aren't created until the camera happens to get close enough to the player unit I placed down.

Share this post


Link to post
Share on other sites

Hi Mynock, I know very little about scripting so bear with me.....Looking at the goon's script (i'm assuming it's the snowstorm script), if it's just for the purpose of your Intro, couldn't you just increase the radius of the particles spawned around the player? 

Share this post


Link to post
Share on other sites

I tried that but without luck. The setParticleCircle portion of the particle generation seems unresponsive to any value I change it to. In fact changing it to anything other than [0, [0,0,0]] breaks the script somehow and no particles are generated at all, but no script error messages are displayed, and as usual the Biki documentation is not helpful in explaining what happens exactly when you change the values.

 

I can do a really ghetto workaround placing logics along the camera's path and running the script on each one's location, but holy framedrops Batman, I don't think anyone is going to want to watch an intro playing at 7 frames per second...

Share this post


Link to post
Share on other sites

I think we need to see the particle script for a better chance of helping.

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

×