Custom Entities and Spawning

Discussion in 'Plugin Development' started by x_Jake_s, Aug 6, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    x_Jake_s

    I am currently creating a Pokémon plugin and I cant for the life of me figure out the creation and spawning of these "Pokémon Entities" here is a basic outline I have setup,

    I have a Class named Pokémon inside the class I have a couple variables such as name and ctype(EntityType)
    Then I have created separate classes that extend the pokemon class and they have constructors such as:
    Code:
    public <PokémonName> {
    
    this.name = "PokémonName";
    
    this.ctype = EntityType.<Entity>;
    
    this.rarity = 70;
    }
    Now I have tried to make a separate class called Rarity, and set a method that uses the Random function to check values and if the value is so and so it spawns pokemon with rarities of 70 or with other rarities like 20 and so on. Then I got the location of the spawn and set the rarities to spawn at a max distance between the spawn and the max point. However everything I have tried so far isn't working...

    So I'm not asking for spoon feeding what I'm asking is if someone can give me direction and the means to discover how this is done, please.
     
  2. Offline

    Zombie_Striker

    @x_Jake_s
    I don't think Rarity needs a separate class. All it needs to be is an int in the pokemon class.
    What is currently happening? What do you mean by "isn't working"? Can you show what you tried?
     
Thread Status:
Not open for further replies.

Share This Page