Jump to content
  • 0

Making Random Respawn on Epic boss


Question

Posted

Hello, I am putting together a random respawn button for the epic boss zones, that is, someone dies and presses "random respawn" and sends it to a random coordinate within the grand boss zone .. but I am not managing to get a reference for separate the different grand bosses with their zones ...

I have this code:
private static List <Location> _core1 = new ArrayList <> ();

there I create a list of locations and I can play with the Rnd.get but how to separate each epic with its zone? I know I could create a multizone for each one, but would it be convenient? Thanks in advance

 

im using Acis .

2 answers to this question

Recommended Posts

  • 0
Posted
19 hours ago, Kotegaeshi92 said:

Hello, I am putting together a random respawn button for the epic boss zones, that is, someone dies and presses "random respawn" and sends it to a random coordinate within the grand boss zone .. but I am not managing to get a reference for separate the different grand bosses with their zones ...

I have this code:
private static List <Location> _core1 = new ArrayList <> ();

there I create a list of locations and I can play with the Rnd.get but how to separate each epic with its zone? I know I could create a multizone for each one, but would it be convenient? Thanks in advance

 

im using Acis .

Remove static modifier from list, parse a bunch of locations in ZoneManager for each zone, do some data entry on each boss xml.

Quick examples:

forEach(zoneNode, "location", locationNode ->
            {
                temp.addLocation(parseLocation(locationNode)); //you will have to implement this method on abstract ZoneType class or directly in this type of zone depending on ur needs.
            });

 

<zone shape="Cylinder" minZ="1" maxZ="1" rad="1">
        <node x="1" y="2"/>
        <location x="1" y="1" z="1" />
    </zone>

 

numbers on 2nd one are placeholders. You will need accesor methods like getRandomLocation() for each zone too.

  • 0
Posted

There are plenty  of questions that someone could ask you to understand what exactly you need. The explanation is not so detailed. Can you post your code to see how you get the data in your list?

 

If you have a custom manager to handle this action, you probably need a Map and not an arraylist.

If you need to use the ZoneManager which is the 'correct way' to handle this, you have to follow the Zake's example with some additions like:

 

ZoneManager.getInstance().getZone(boss,BossZone.class).getRandomLocation();

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock