Jump to content
The Dark Mod Forums

Drowning rats


grayman

Recommended Posts

This is a question for a coder or a modeller.

 

A rat's mouth is about 4 units above the ground when they're running around. Their origin is on the ground.

 

But a rat can drown in 3 units of water.

 

I looked at the code and it uses the spawnarg "mouth_offset" when it determines whether an AI is drowning. That's supposed to be a vector offset from the head's origin, but it's not set anywhere, as far as I can tell. It's not in the def file for the rat, which is where I would expect to see it. I think it's supposed to be defined there by the modeller.

 

I bumped 6 rats' health to 1,000 hoping that would help, but after about 10 minutes, 2 of them were dead in the water. They seemed to spend half their time in the water and half their time up on the floor surrounding the water. But the amount of air time they were getting didn't seem to help.

 

As a workaround, I'll give them atrociously high health, but maybe someone can say why this is happening.

 

Thanks

 

 

 

Link to comment
Share on other sites

Not sure, but there should be a spawnarg to stop AI from drowning...zombies don't drown, do they?

Link to comment
Share on other sites

Not sure, but there should be a spawnarg to stop AI from drowning...zombies don't drown, do they?

 

Checked a zombie and he has "can_drown" "0". Didn't know this existed.

 

I put it on the rats and now they don't drown.

 

This is a good workaround as long as they don't wander into water deeper than 4, where it'll look like they're supposed to drown.

 

Thanks.

Link to comment
Share on other sites

can_drown 0/1 :P

 

Keeping them out of the water will probably take some clever AI thread or a special AAS Obstacle specifically targeted at aas_rat.

 

 

I think the water situation is okay now, but they still get stuck on ramps or stairs, and sometimes up against a wall or monster_clip. Can't block them off, because there's no rat_clip. But I'm willing to put up with that, since they're in a sewer. Sewer = rats and water. If they get stuck too often, I might try some script trick to nudge them into moving again.

 

 

Link to comment
Share on other sites

Well, you can set them to patrol also.

 

animal_patrol 0 (?)

(it's in the def, I think that's it but I'm trying to install mint 9 right now.) That (1) makes them follow the scripting to make them randomly circle around. Greebo made that for the rats as default.

 

 

Then put them on paths, just like T2 and other AI. Then they WON'T go in water unless you make them.

 

Alternately there's monster clip too. But I guess you said they get stuck on that too.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Recent Status Updates

    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...