Duke4.net Forums: custom enemies stuck in water - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

custom enemies stuck in water

User is offline   Mark 

#1

For a few months I have had a problem with my custom enemies not always submerging halfway into water sectors. The bigger problem is that once they do finally sink down they do not come back out. After much trial and error installing many versions of Eduke I narrowed it down. Version 4376 was the last working version. Starting with 4380 the problems occured. I looked at the change log in the svn and I see that uncommitted 4378 introduced a "fix" to the water submerging problem for stock enemies. Ever since that fix my custom enemies glitched. Am I screwed or is there hope? I had a con coding guru take a look at my con code and he didn't find anything on my end to cause the glitch. I'm desperate because without a cure my Graveyard project will need a major re-mapping to get rid of all the water sectors or try to code all the enemies to walk on water. Not too thrilled about that.

This post has been edited by Mark.: 02 June 2014 - 05:34 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#2

So just to be clear, the problem is: enemies either walk on top of the water, or once they half-submerge, they cannot get back out of the water.

Do you need them to enter the water sectors at all? It wouldn't be very difficult to code them so they stay away from the water.
0

User is offline   Kyanos 

#3

I'm kinda curious what normal behaviour is supposed to be for vanilla duke. I've seen troopers fly out of water all the time IIRC, yet octabrains don't.

This post has been edited by Drek: 03 June 2014 - 10:18 AM

0

User is offline   Danukem 

  • Duke Plus Developer

#4

It has always been fucked up. If you want it to work well, you have to do customized water coding.
0

User is offline   Jimmy 

  • Let's go Brandon!

#5

This should be of help to you if you want to make enemies avoid water.

This post has been edited by Jimmy: 03 June 2014 - 10:50 AM

0

User is offline   Mark 

#6

Trooper Dan. Yes to your question. Although since my post a way has been found to make them submerge every time ( using cstator 128 ) but they still refuse to exit the water.

Unfortunately the water sections in the maps are too entwined with the rest of the areas to be removed. In 2 instances water cuts across the middle of the maps and enemies need to pass through. Also, if water was off limits to enemies then the player would have an unfair "safe place" to sit and pick off the enemies. FYI, one of my non-custom enemies replaces the Newbeast. That one gets stuck in the water sections just like my custom ones.

And thanks for the link. I saved it to my favorites. You never know when bits of code might come in handy.

This post has been edited by Mark.: 03 June 2014 - 03:02 PM

0

User is offline   Mark 

#7

View PostTrooper Dan, on 03 June 2014 - 10:40 AM, said:

It has always been fucked up. If you want it to work well, you have to do customized water coding.

Or I just recommend an older version of Eduke to run the mod. I know, not recommended.
0

User is offline   Scott_AW 

#8

You need to code a way for them to jump out when they get to the edge. Enemies usually only move horizontally, adding a jump for short ledges, checking if the adjacent sector is higher, but not too high, for them to perform a jump out of the water. Otherwise you can try making the edges of the water area sloped so jumping is unneeded. Not sure if that will work, but its something I'll probably have to deal with myself, I'll share the code if I make it.
0

User is offline   Kyanos 

#9

Stumbled on this reading the infosuite. Seemed relevant.

Quote

Incompatible Enemies:

The following enemies are the only enemies which do not seem to be compatible with any type of Teleporter other than Transport Elevators.

SHARK (#1550)
OCTABRAIN (#1820)
COMMANDER (#1920)
GREENSLIME (#2370)

1

User is offline   Chip 

#10

I took a long break from Eduke32, but before coming back, the last version I played had amazing water sector handling - enemies were able to jump back out of water sectors with a lotag of 1 using the jumptoplayer command.

Now, it appears completely different and even broken to some extent. Occasionally when ANY non-flying enemy units makes contact with the surface of water (sector with a lotag of 1) they will rapidly and repeatedly flicker between the two sectors. As I've been playing through the normal game with no mods, then this particular instance is no specific to custom actors. Also, the actors are, once again, unable to jump out sectors with a lotag of 1. :P I actually thought it was intentionally removed due to game logic changing reasons.


However, I have once again posted an issue without trying the latest build of Eduke32 >_<
I'll be re-trying this out later on with the newer version.

This post has been edited by Chip: 15 July 2014 - 09:57 AM

0

User is offline   TerminX 

  • el fundador

  #11

I think what happened was that I "fixed" it years ago so that it worked as you remember (enemies had no problems with water) but that somewhere down the line someone complained that it changed the game logic or broke their mod and it was reverted. I think it had something to do with lizmen getting into water when they weren't supposed to, or liztroops being unable to fly out of water sectors or something. Maybe whoever reverted it can remember. Looks like it might be r4378 that changed it.
0

User is offline   Helixhorned 

  • EDuke32 Developer

#12

Yeah, I might have messed things up with that revision. The situation is this: TX's "fix for flying/jumping monsters getting stuck in water" originally worked by checking actors on water for having "jumptoplayer" set and in that case refrained from the "dipped in water" z coordinate addition in VM_Fall(), the implementation of the CON fall command. In r4378, I discovered that the "jumptoplayer" movflag actually consists of two bits, one of which is "faceplayer". I changed the check to what I though prevented enemies walking on water, which I believed to be caused by checking whether any of the two bits were set.

In hindsight, my change didn't make much sense either. What I have committed in r4575 is that we check only for the "jumptoplayer_only" (as it's called in Lunatic), which I think is the intended behavior. Can somebody affected try out the change and report whether it helps? I am also attaching a test map. Enable god mode and lure the lizman into/out of the water. You'll see that sometimes, he still may walk on it.

Attached File(s)


0

User is offline   Mark 

#13

I'll try it out and post back in a few minutes.....

I might not be the best tester because of my modified cons. In my case the custom enemies are submerging all the way down instead of the usual half way down. And they are still not coming back out. One enemy which is a newbeast replacement using original code sometimes submerges and sometimes not. It will exit the water. BTW, this was in my map and not the test map. I guess I should try it out too.....

In the test map. Any of my enemies that use original code are working fine. My custom ones are hit and miss. Most of the time they submerge all the way down and don't come up and just a few times one of them worked as it should then it joined the others at the bottom. :(

This post has been edited by Mark.: 20 August 2014 - 11:52 AM

0

User is offline   Helixhorned 

  • EDuke32 Developer

#14

View PostMark., on 20 August 2014 - 11:26 AM, said:

In my case the custom enemies are submerging all the way down instead of the usual half way down. And they are still not coming back out. One enemy which is a newbeast replacement using original code sometimes submerges and sometimes not.

So for you the pre-r4378 behavior is the best, right? In that case maybe we should revert to TX's version (checking for any of the two bits in 'jumptoplayer').
0

User is offline   Mark 

#15

4376 is what works for me. But I guess we should use whatever works best for the whole community. I haven't heard much from others who have played olderTCs with custom enemies to see if its really a big problem or not.

This post has been edited by Mark.: 20 August 2014 - 11:59 AM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options