Page 1 of 1

Old scripts that use show/hide to call CEGs

Posted: 21 Sep 2016, 02:04
by Forboding Angel
I've been poking around in BA out of morbid curiosity lately, and I've run across something that just boggles my mind... CEG effects seem to be called using show/hide pieces, but when I look for the CEG I can't find it. WTF?

Also, it seems that you can't emit CEGs properly from 3do units because the CEG doesn't seem to get the vector information (Like emitting a CEG from a gun barrel)?

Help me out here?

Re: Old scripts that use show/hide to call CEGs

Posted: 21 Sep 2016, 06:40
by raaar
You can emit CEG from 3do models' pieces. I use pieces with 2 vertexes as emit points.

Re: Old scripts that use show/hide to call CEGs

Posted: 21 Sep 2016, 10:34
by yuritch
Forb, that's the old flare code. Basically if you do show/hide inside a FireWeapon callin, then the engine shows a weapon flare effect instead. This was made to improve standard OTA models (which had flares modelled as pieces) if I remember right.

Look for ShowFlare() in UnitScript.cpp to find out more.

Re: Old scripts that use show/hide to call CEGs

Posted: 21 Sep 2016, 11:31
by Forboding Angel
Oi, vectors are not passed to flare pieces. That's no bueno. Basically torpedoes any reasonable attempt to add nice muzzle effects.

Re: Old scripts that use show/hide to call CEGs

Posted: 21 Sep 2016, 16:23
by smoth
gundam had bos/3dos that used cgs moving from 3do to proper model I never had any issues.
Image

Code: Select all

#define dirt 					1024+0 
#define kampfertail 			1024+1 
#define	bluemuzzle 				1024+2

...

FirePrimary()
	{

		move right	to z-axis [-0.4] now;
		turn r_arm	to x-axis <-5> 	now;
		
		emit-sfx bluemuzzle  from flare; //first shot is actual weapon
		sleep 25;
			
		turn r_arm	to x-axis <0> 	speed [0.5];
		move right	to z-axis [0] 	speed [5];		
		
		sleep 75;
		
	}