Page 1 of 1

Explosion by script

Posted: 28 Oct 2006, 16:56
by PauloMorfeo
Is it possible to create an explosion through scripts?

Like an explosion whenever a unit gets created.

Posted: 28 Oct 2006, 23:53
by rattle
Yes, you should read the dev or feature thread more often... :)
http://taspring.clan-sy.com/phpbb/viewtopic.php?t=7041
emit-sfx 4096+WeaponOnUnit-1 from piece;
4096 = weapon1, 4097 = weapon2, ...etcetera...

Posted: 29 Oct 2006, 05:58
by esteroth12
and I believe 1024 is where the explosions start*, and 2048 is where weapons start

*you must assign explosions a number in the unit's fbi before using them!

Posted: 29 Oct 2006, 06:29
by KDR_11k
1024 spawns the explosion generator effect, 2048 spawns the weapon's projectile and 4096 spawns the explosion of the weapon (difference to 1024 is that this does damage).

Posted: 29 Oct 2006, 18:15
by PauloMorfeo
I am a newbie at modding, you now...

Up until recently, i didn't even bothered monitoring most of the mod-specific stuff in the forums (well, most of the whole forums, actually) so most of the information covered before that time that is not easily available, i won't know about it. Addind up all the time spent lurking around the forums, it is quite surprising how much gets wasted in one single weak.

Anyway, thanks and sorry for beeing posting around newbish questions.

Posted: 29 Oct 2006, 19:05
by rattle
KDR_11k wrote:1024 spawns the explosion generator effect, 2048 spawns the weapon's projectile and 4096 spawns the explosion of the weapon (difference to 1024 is that this does damage).
The difference is that 1024 does not use weapons. It uses the entries from [SFXTypes] in [UNITINFO]... 1024+0 = explosiongenerator0, etc.

Code: Select all

[UNITINFO]
{
<random gibberish>
	[SFXTypes]
	{
		explosiongenerator0=custom:SMALL_MUZZLE_FLASH_FX;
		explosiongenerator1=custom:LARGE_MUZZLE_FLASH_FX;
	}
}