PDA

View Full Version : enemies in water


zazo
03-24-2008, 03:39 PM
Duke enemies doesnt seems to like water and they stay out off water sectors.
i want to modify the game.con to make a enemy that will be able to come into water when he meet a sector with a lowtag of 1. In opposite, i want a enemy who remain only on water sectors...
Thank you for your help !

DeeperThought
03-24-2008, 09:43 PM
Duke enemies doesnt seems to like water and they stay out off water sectors.
i want to modify the game.con to make a enemy that will be able to come into water when he meet a sector with a lowtag of 1. In opposite, i want a enemy who remain only on water sectors...
Thank you for your help !

In the old days, the regular Duke monsters like pigcops and such would happily wade into the water and get stuck there. Then, with EDuke32 snapshots starting about six months ago, they became water shy. The water shyness should not be a problem if you are coding your own actor on a different tile number from any of the standard monsters. To make a monster stay in water sectors, you can have the monster get its location into gamevars whenever it is in or on water, then set itself to the last saved location if it finds itself not in water.

zazo
03-26-2008, 04:32 AM
how do you get the last saved location x y of a monster ?
what command do you use for this ? ifonwater x= .... y= ....
thanks a lot for more precison !...

hummertime
03-26-2008, 08:09 AM
Duke monsters better stay out of water.

Btw. Octabrains designed STRICTLY for water, much like Bloopers in Super Mario Bros. they are floating. I hate to see this enemy overwater. It makes as much sense as Sharks swimming overwater.

lycanox
03-27-2008, 03:26 AM
They do however often show up over water, regularly in the original episodes.

DeeperThought
03-27-2008, 03:40 AM
how do you get the last saved location x y of a monster ?
what command do you use for this ? ifonwater x= .... y= ....
thanks a lot for more precison !...

The problem is, even if I wrote some code for you, you wouldn't know where to put it and we could end up going on for another page like that. You need to learn about gamevars and gamevar manipulation. The EDuke32 wiki will help, as will looking at the code used in recently released mods.