smod_custom_explosive.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
CustomExplosive
{
    "CustomName"
    {
        "Damage"            ""
        "Radius"            ""
        "model"            ""
        "Bounce"            ""
        "GlFuse"            ""
        "BoundingSound"    ""
        "Timer"            ""
        "ExplosionType"        ""
        "TrailType"            ""
        "IsPenetrateGlass"    ""
        "EntitySpawn"
        {
            "SpawnEntity"    ""
            "SpawnType"    ""
            "SpawnCount"    ""
            "ThrowPower"    ""
            "ThrowType"    ""
            "Angle"        ""
            "SpawnAngle"    ""
            "RemoveTimer"    ""
            "SpawnMass"    ""
        }
        "EnergyBullet"
        {
            "DamageType"    ""
            "Bounce"    ""
            "Size"        ""
            "LightRadius"    ""
            "LightColor"    ""
            "Speed"        ""
            "SpriteMaterial"    ""
            "Gravity"        ""
            "TrailSize"        ""
            "TrailTime"        ""
            "FlyTime"        ""
        }
        "Bullet"
        {
            "AmmoType"    ""
            "Damage"    ""
            "ShotCount"    ""
            "Angle"        ""
            "Tracer"        ""
            "Force"        ""
            "TraceLength"    ""
            "Penetrate"    ""
            "Attenuate"    ""
        }
    }
}


  • Line 3 starts the custom explosive class. This is the classname the custom entity will be referred to by custom weapon scripts and the like.

Base keyvalues

  • Line 5 is the damage keyvalue. This sets the damage value of the explosion produced by the entity upon detonation.
  • Line 6 is the radius keyvalue. This calculates the radius of the explosion.
  • Line 7 sets the model of the custom entity.
  • Line 8 sets the bounce type of the custom entity. -1 prevents the entity from detonating on impact, while 1 has the opposite effect. Only those two values should be used.
  • Line 9 defines how long the entity is "live" before it disappears from the world. This value's base is 100/second, so 900 would total 9 seconds.
  • Line 10 sets the bouncing sound of the entity, if bouncing is allowed.
  • Line 11 is the timer keyvalue. This sets the time it takes for the explosive to detonate.
  • Line 12 Sets the explosion type of the entities explosion. 0 = none. 1 = fireball. 2 = pulse.
  • Line 13 sets the trail type of the entity. 0 = none. 1 = smoke. 2 = fire. 3 = beam.
  • Line 14 is a boolean value to set whether or not the explosion can damage through glass material types.
  • Line 15 sets up a new block for the entityspawn portion of the script data. Its sub-keys are below.
Sub keyvalues
  • Line 16 sets the specific entity class to spawn.
  • Line 17 sets the type of custom explosive entity to spawn if SpawnEntity is custom_explosive.
  • Line 18 sets number of entities to spawn.
  • Line 19 defines how much velocity the entities have upon spawning.
  • Line 20 sets how the entities will spawn. 0 = ring. 1 = sphere.
  • Line 21 sets the angle of the entity upon spawning. This is based on Pitch Yaw and Roll values.
  • Line 22 sets how long it takes for the entities to be removed. Based upon seconds.
  • Line 23 sets the mass of the entity.

EnergyBullet

For info on this, refer to the WeaponSpec section of the custom weapon article.

Bullet

For info on this, refer to the WeaponSpec section of the custom weapon article.


Customization

Mapadd Command Reference (Non-LUA)Command Reference (LUA)Getting StartedPorts 'n' Doors
Alarm, Alarm!Color Correction in SMODDoor BreachingMobile APCsWorking With Dropships
Supply Drop (LUA)Countdown (LUA)
kh0rn3's Mapadd Generator
Scripts addcontentsoverride_classsmod_custom_explosivesmodaclistSMOD Soundscripts

npc_gib_modelnpc_replace_modelnpc_shieldsetnpc_weapon_randomizenpc_weaponweight

excludeweaponsweapon_categoryweapon_customConsole Command List
Other Crosshair CustomizationGenerating AI NodesUsing the NodemakerSubViewCam
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License