Author Topic: How to keep water animals... underwater?  (Read 405 times)

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
How to keep water animals... underwater?
« on: November 17, 2013, 08:13:52 pm »


               Hi there,
I'm including underwater areas in my module with various underwater creatures (including animals, that is fish).

For obvious reasons, I don't want these underwater creatures to get on the land and walk (float?) there happily.
While it's easy enough to do with non-animals, it gets problematic when Animal Empathy is added into equation.

So, basically - is there any easy way of preventing druid and ranger characters from leading fish from sea onto the land? At the same time I'd want to keep their race (Animal) and allow them to be tamed underwater... just not tamed so much that they suddenly gain the ability to float onto the land!

Thanks. '<img'>
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
How to keep water animals... underwater?
« Reply #1 on: November 17, 2013, 08:25:37 pm »


               

Grani wrote...

Hi there,
I'm including underwater areas in my module with various underwater creatures (including animals, that is fish).

For obvious reasons, I don't want these underwater creatures to get on the land and walk (float?) there happily.
While it's easy enough to do with non-animals, it gets problematic when Animal Empathy is added into equation.

So, basically - is there any easy way of preventing druid and ranger characters from leading fish from sea onto the land? At the same time I'd want to keep their race (Animal) and allow them to be tamed underwater... just not tamed so much that they suddenly gain the ability to float onto the land!

Thanks. '<img'>

yes, each creature fires the area OnEnter and OnExit event, so you need to place a same script into OnEnter for each of your area (there is letoscript for this no need to make manually - check up funky's guide in this forum). Then check if the entering creature is water type and check if the are is underwater. If yes then destroy the creature or release from domination and port back to previous area (which is hard to script and require some extra coding, destroying is easier solution)
               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
How to keep water animals... underwater?
« Reply #2 on: November 17, 2013, 08:37:30 pm »


               

ShaDoOoW wrote...

Grani wrote...

Hi there,
I'm including underwater areas in my module with various underwater creatures (including animals, that is fish).

For obvious reasons, I don't want these underwater creatures to get on the land and walk (float?) there happily.
While it's easy enough to do with non-animals, it gets problematic when Animal Empathy is added into equation.

So, basically - is there any easy way of preventing druid and ranger characters from leading fish from sea onto the land? At the same time I'd want to keep their race (Animal) and allow them to be tamed underwater... just not tamed so much that they suddenly gain the ability to float onto the land!

Thanks. '<img'>

yes, each creature fires the area OnEnter and OnExit event, so you need to place a same script into OnEnter for each of your area (there is letoscript for this no need to make manually - check up funky's guide in this forum). Then check if the entering creature is water type and check if the are is underwater. If yes then destroy the creature or release from domination and port back to previous area (which is hard to script and require some extra coding, destroying is easier solution)



I thought about it but hoped there is some better solution.
Apart from direct connections from a water area to the coastal area, I also have teleportation items in my module to ten other areas or so. But well, i guess it won't be much of a problem if it is just one script repeated.

Thanks. '<img'>
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
How to keep water animals... underwater?
« Reply #3 on: November 17, 2013, 09:27:44 pm »


               

Grani wrote...

I thought about it but hoped there is some better solution.
Apart from direct connections from a water area to the coastal area, I also have teleportation items in my module to ten other areas or so. But well, i guess it won't be much of a problem if it is just one script repeated.

Thanks. '<img'>

well having same script in each area OnEnter has many advantages, but if you want to avoid this it can be done opposite way.

Make a special transition script and assign this script into transitions from underwater areas to normal areas. Then you have to also edit scripts for every teleport item or feature - check current area, target area and if current is underwater and target not then remove domination effect from any animal you control.
               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
How to keep water animals... underwater?
« Reply #4 on: November 17, 2013, 10:07:47 pm »


               

ShaDoOoW wrote...

Grani wrote...

I thought about it but hoped there is some better solution.
Apart from direct connections from a water area to the coastal area, I also have teleportation items in my module to ten other areas or so. But well, i guess it won't be much of a problem if it is just one script repeated.

Thanks. '<img'>

well having same script in each area OnEnter has many advantages, but if you want to avoid this it can be done opposite way.

Make a special transition script and assign this script into transitions from underwater areas to normal areas. Then you have to also edit scripts for every teleport item or feature - check current area, target area and if current is underwater and target not then remove domination effect from any animal you control.

Right, but I think the first method is still better.
Thanks for help. '<img'>
               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
How to keep water animals... underwater?
« Reply #5 on: November 18, 2013, 07:05:18 pm »


               For a single area containing both walkable water environments and land environments, create giant trigger regions which onExit causes the "animal" unit to de-charm, unfollow, or otherwise cause to walk back toward an out of sight watery area tagged with a waypoint. I've done this fairly successfully with custom monsters that spawn at the edge of water or in deeper water which have ranged attacks. Not so much sharks with laser beams on their heads, but more like fireball breathing hydra thingies like in diablo 2/dungeon seige 1. Having my monsters without a full body come out of the water region would cause some serious disbelief issues.

This should work with area-to-same-area-teleports too, although, I have found that such teleporting sometimes does not properly fire trigger onExit scripts. Like most of the script system, it's a bit faulty.