A_Explode

From ZDoom Wiki

Jump to: navigation, search

A_Explode [(int explosiondamage, int explosionradius [, bool hurtshooter])]


Performs an explosive (radius) attack. The amount of damage and the attack's radius are specified with explosiondamage and explosionradius. If the actor is a missile, you can set hurtshooter to 0 so that its originator will not be harmed by the attack. If the last parameter is omitted, the shot will assume normal behavior and damage the shooter -- one of the rare cases the engine will default to a value of 1.

Do not use the old actor property method of passing the parameters. Only use the parameters of A_Explode directly.

Example

Actor Grenade
{
	Projectile
	+HexenBounce
	-NoGravity
	Radius 8
	Height 8
	VSpeed 10
	Gravity 0.50
	Speed 17
	SeeSound "Weapon/GrenadeBounce"
	BounceFactor 0.4
	BounceCount 6
	States
	{
	Spawn:
		GREN A -1
		loop
	Death:
		QEX1 A 0 A_PlaySoundEx("Weapon/GenericExplode","Weapon")
		QEX1 A 0 A_Explode(100,128)
		QEX1 A 5
		QEX1 B 5
		QEX1 CDE 5
		Stop
	}
}
Personal tools