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();

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...