Difference between revisions of "Explosion"
adding instructions on how to use these things, since it took me a while to get it! Maybe not the best place - poss split into separate tutorial and link from here and from weapon?
imported>Talkie Toaster (→Notes) |
imported>DewiMorgan (adding instructions on how to use these things, since it took me a while to get it! Maybe not the best place - poss split into separate tutorial and link from here and from weapon?) |
||
Line 1: | Line 1: | ||
Explosions ''can'' be triggered by scripts, using the [[PlayExplosion]] command, but are normally are triggered by an impact from a [[Projectile]]. | |||
===Example=== | |||
Reverse engineering the mechanism to create an explosive weapon can be difficult, especially since many of the EditorIDs simply do not show up in text search. | |||
To add an explosion to a weapon, you need to create at least four types of base object: the [[Weapon]] itself, and one or more [[Ammo]], Projectile, and Explosion types. If there are multiple types of ammo, you will also need a [[FormList]]. | |||
As an example, here is a slight simplification of the Missile Launcher, as seen in Fallout: New Vegas, demonstrating the two ways to specify the Projectile. | |||
* '''WeapMissileLauncher''' - the Weapon item itself, specifying the valid Ammo (or FormList of Ammos), and the default Projectile. In Fallout3, the default is the only Projectile the weapon can have. | |||
** The "Ammunition" is set to '''AmmoListMissile'''. | |||
** Under the "Art and Sound" tab, "Projectile" is set to '''MissileProjectile'''. | |||
* '''AmmoListMissile''' - an optional FormList of valid ammo types for this weapon, needed in this case since there are multiple types of Missile ammo. If there were only one, the Weapon could have pointed directly to that instead of to the list. | |||
** This FormList contains a reference to '''AmmoMissile'''. | |||
** This FormList also contains a reference to '''AmmoMissileHE'''. | |||
* '''AmmoMissile''' - an Ammo type for this weapon (though there are others). Use this for Object Effects that affect the target. | |||
** "Projectile" is set to '''NONE''' on this ammo, so it defaults to the weapon's Projectile. | |||
* '''AmmoMissileHE''' - In Fallout: New Vegas, Ammo has been significantly empowered, so that it can specify Object Effects to run on the target [[Actor]], and also specify a different Projectile to the weapon's default - which this does. | |||
** This Ammo contains a reference to '''MissileProjectileHE''' | |||
* '''MissileProjectile''' - Although the ammo has various effects that can trigger when it hits, it's this Projectile that handles the explosion. This also permits Object Effects that run on the explosion, rather than the target, so you can have effects that trigger where the object impacts even if it doesn't hit an Actor. | |||
* '''MissileProjectileHE''' - Just like the above, but links to a larger explosion. | |||
* '''MissileExplosion''' - the Explosion type. | |||
* '''MissileExplosionHE''' - the Explosion type for the HE form of the ammo. | |||
So the Weapon specifies the FormList which specifies the Ammo; and also specifies the Projectile which specifies the Explosion. | |||
In F:NV, alternatively, the Weapon can specify the FormList which specifies the Ammo which specifies the Projectile which specifies the Explosion. | |||
These two methods can be mix-and-matched, as above, where one type of ammo specified a Projectile, while the other went with the Weapon's default Projectile. | |||
=='''Explosion Dialog'''== | =='''Explosion Dialog'''== | ||
*'''ID:''' Unique identifier for this form. | *'''ID:''' Unique identifier for this form. |