Explosion by script

Explosion by script

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Explosion by script

Post by PauloMorfeo »

Is it possible to create an explosion through scripts?

Like an explosion whenever a unit gets created.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post 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...
esteroth12
Posts: 501
Joined: 18 May 2006, 21:19

Post 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!
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post 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).
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post 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.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post 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;
	}
}
Post Reply

Return to “Game Development”