Jumping Monster?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Jumping Monster?

Post by Hidden Hands »

I'm trying to make a monster that does two things - one, it walks towards player, fires projectiles and also attacks with a melee. But I want it to randomly switch to an alternate state in which is crawls on all floors and leaps at the player with a melee swipe. Can someone help me do this? It's supposed to be like the IMP from DOOM3.

Here is my code... what do I need to do or add?

Code: Select all

ACTOR Doom3Imp 1000
{
//$Category Monsters
//$Title "Imp (Doom 3)"
  XScale 1.8
  Health 60
  Radius 20
  Height 56
  Mass 100
  Speed 8
  PainChance 200
  Scale 1.1
  Monster
  +FLOORCLIP
  SeeSound "impB/sight"
  PainSound "impB/pain"
  DeathSound "impB/death"
  ActiveSound "impB/active"
  HitObituary "$OB_IMPHIT"
  Obituary "$OB_IMP"
  States
  {
  Spawn:
    IMPB AB 10 A_Look
    Loop
  See:
    IMPB AABBCCDD 4 A_Chase
    Loop
  Melee:
  Missile:
    IMPB EF 8 A_FaceTarget
    IMPB G 6 A_TroopAttack
    Goto See
  Pain:
    IMPB H 2
    IMPB H 2 A_Pain
    Goto See
  Death:
    IMPB I 8
    IMPB J 8 A_Scream
    IMPB K 6
    IMPB L 6 A_NoBlocking
    IMPB M -1
    Stop
  XDeath:
    IMPB N 5
    IMPB O 5 A_XScream
    IMPB P 5
    IMPB Q 5 A_NoBlocking
    IMPB RST 5
    IMPB U -1
    Stop
  Raise:
    IMPB ML 8
    IMPB KJI 6
    Goto See
  }
}
Thanks in advance.
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Jumping Monster?

Post by Apeirogon »

Look into brutal doom imp definition.
Or into project brutality imp definition(s). There imp for sure can crawls.
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: Jumping Monster?

Post by Hidden Hands »

Apeirogon wrote:Look into brutal doom imp definition.
Or into project brutality imp definition(s). There imp for sure can crawls.
Thanks, I'll check it out.
Post Reply

Return to “Scripting”