Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
HaydenBarca

Registered:
Posts: 196
Reply with quote  #1 
I'm trying to get a pod of whales to stay within a certain nebula.  Does anyone know of a way to get them to not leave the area, short of putting in an attract beacon?  If I put in an attract beacon, they just cluster around it, rather than roaming with in the confines.
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,402
Reply with quote  #2 
You could build a fence of repel beacons.

Your script could also constantly move them. If they moved outside a certain square nudge them back into the square. You could do it with a circle, too, but the code is easier for a square.

The easiest solution might be to create a pod of whales and write code that keeps one member of the pod from straying too far. Since whale AI keeps pods somewhat together that means they will remain a natural looking group but none of them will ever go far . . . unless that one whale gets destroyed.

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
HaydenBarca

Registered:
Posts: 196
Reply with quote  #3 
Thanks, Mike.  I went with the "nudge box" idea:
<event name="Steer Whales">

<if_outside_box name="Alpha Whale" leastX="80000.0" leastZ="0.0" mostX="100000.0" mostZ="16000.0" />
<add_ai type="POINT_THROTTLE" value1="90500.0" value2="0.0" value3="7900.0" value4="0.5" name="Alpha Whale" />
</event>

Basically, if it leaves the box, go back to the center of it.

And to cover if the Alpha Whale gets destroyed:

<event name="Regenerate Whale Pod">
<if_not_exists name="Alpha Whale" />
 <create type="monster" monsterType="1" age="3" podnumber="1" x="90347.0" y="0.0" z="7803.0" angle="180" name="Alpha Whale" />
</event>

Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,402
Reply with quote  #4 
That should work perfectly. I hope I get to try your mission.
__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.