Jump to content
  • 0

Monster Behaviour?


Ghost_Ellis

Question

8 answers to this question

Recommended Posts

  • 0

When it comes to asking "how to do a thing which Doom wasn't designed to do," being more specific is a good idea. What do you want to do? It sounds like you want the monster to follow a set of waypoints, which may be possible, but I don't know how.

 

Can't you just use monster-only teleport lines? I think UDMF even offers lines which can block players but not monsters.

Share this post


Link to post
  • 0

Its hard to describe. I need the monster to behave a specific way that's not intended. I need it to always be moving toward the player, but not be aggro'd on the player, unless it comes within line of sight of the player. Once it does see the player, I need it to chase the player, until it either catches and kills the player, or it loses line of sight for a specefied duration.

Share this post


Link to post
  • 0
Posted (edited)

How is your experience writing AI code? Because that's likely what you're going to need to do. ESPECIALLY if you want the monster to be intelligent and actually be able to follow the player instead of the normal behavior of getting stuck wandering back and forth like other monsters.

 

I also don't understand what you mean by "not be aggro'd." What behavior difference do you see in the monster between "aggro'd" and "moving towards the player but not aggro'd," because in Doom "aggro'd" and "moving towards the player" is the same thing. What behavior do you expect to change once the monster loses line of sight on the player for long enough?

Edited by Stabbey

Share this post


Link to post
  • 0
17 hours ago, Ghost_Ellis said:

Its hard to describe. I need the monster to behave a specific way that's not intended. I need it to always be moving toward the player, but not be aggro'd on the player, unless it comes within line of sight of the player. Once it does see the player, I need it to chase the player, until it either catches and kills the player, or it loses line of sight for a specefied duration.

Sounds do able with a patrol path and some scripting if another method doesn't arrise.

 

I'd check out Chubz' Moving Camera Tutorial. This can be used with monsters to set a patrol path. That and some combination of scripting and block sound lines (if the player would be shooting in the (I'm assuming) maze or fighting other monsters while trying to avoid it so that it doesn't get activated.

This ZDOOMWiki Article may also be helpful, especially the entries for APROP_SetGoal and APROP_TargetTID

You could have a script that waits for the targetTID to change to the player, waits a specified number of tics, then sets the goal / target to a patrol node as described in the Chubz tutorial mentioned above.

Sounds like an interesting project and I wish you the best of luck !

 

Share this post


Link to post
  • 0

This can be pretty complicated because it involves managing multiple State jumps that can be or even may need to be randomized. I'll try to write a base line example hopefully close to your Criteria. Basically the GOTO Wander after it attacks Makes sure he loses aggro when Player is out of sight. The A_Look at top of WANDER state forces him into Aggro to See State when he sees the player.

 

Actor HuntingImp : DoomIMp
{ 
   States
	{
   Spawn:// Example from A_Wander ZDOOM Wiki
   WANDER: 
	TROO A 0 A_Look
    TROO AA 3 A_Wander
    TROO A 0 A_Look
    TROO BB 3 A_Wander
    TROO B 0 A_Look
    TROO CC 3 A_Wander
    TROO C 0 A_Look
    TROO DD 3 A_Wander
    TROO D 0 A_Look
    loop
      See:
          TROO AABBCCDD 3 A_Chase
           Loop
      Melee:
	  Missile:
         TROO EF 4 A_FaceTarget
	     TROO G 4 A_TroopAttack
         Goto Wander
}
}
	  

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...