How do I create a grenade
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- DenTheUA
- Posts: 41
- Joined: Fri Jun 09, 2017 4:06 am
- Location: Land of salo, gorilka and borsch (a.k.a. Ukraine)
How do I create a grenade
I was looking for tutorials for creating grenades, but couldn't find any. Can anyone help me with it?
Re: How do I create a grenade
Interestingly, a grenade is already defined in GZDoom. Now all you need is a weapon to fire it eg
Code: Select all
// totally off-the-top-of-my head DECORATE
ACTOR GL : Pistol
{
Weapon.SlotNumber 5
Weapon.AmmoType "RocketAmmo"
Weapon.AmmoGive 20
States
{
Fire:
PISG A 1
PISF A 3 Bright
PISF B 3 Bright A_FireCustomMissile("Grenade")
PISF A 3 Bright
PISG A 1 A_CheckReload
PISG A 1 A_Refire
Goto Ready
}
}
- DenTheUA
- Posts: 41
- Joined: Fri Jun 09, 2017 4:06 am
- Location: Land of salo, gorilka and borsch (a.k.a. Ukraine)
Re: How do I create a grenade
Thanks, gonna try something like thatVoros wrote:Interestingly, a grenade is already defined in GZDoom. Now all you need is a weapon to fire it egCode: Select all
// totally off-the-top-of-my head DECORATE ACTOR GL : Pistol { Weapon.SlotNumber 5 Weapon.AmmoType "RocketAmmo" Weapon.AmmoGive 20 States { Fire: PISG A 1 PISF A 3 Bright PISF B 3 Bright A_FireCustomMissile("Grenade") PISF A 3 Bright PISG A 1 A_CheckReload PISG A 1 A_Refire Goto Ready } }