Norbingel's Recent Forum Activity

  • The manual says:

    "If a Family is created, a random object type in the family is picked."

    Is there any way or work-around to create a particular member of a family instead of randomly? If I have a family named Enemy with 4 objects: rat, cat, man, woman and I want to control which one of these spawns, how do I do it? I can do this through events but with a lot of planned enemies, the event list could grow quite long.

    Alternatively, is there any way to control which sprite to create? Say I want to create a sprite with a particular instance variable out of the many sprite objects I may have?

    Thanks!

  • I will try that but it really seems to me that will still give me a very long list of events. The examples I gave are very basic and simple but the aim is many more Monster and Loot types.

    Paradox

    Can you give pseudo code examples for that? I do have instance variables in the families. The way I have it now is something like:

    Monster family with instance var LootMin and LootMax

    Loot Family with Instance var LootType (e.g. Gold is type 1, dagger is 2, etc)

    I'm aiming for (but not getting <img src="smileys/smiley9.gif" border="0" align="middle" />):

    If Monster with instance vars: LootMin 1 and LootMax 4 dies

    set "bootyVar" to random between LootMin and LootMax

    create Loot with LootType "bootyVar"

  • If I have 20 different Monsters who can spawn different Loot combos, won't I eventually have a very long event list? Would seem to be quite redundant too.

    Thanks for taking the time to reply! :)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi ghost, thanks for the reply!

    Wouldn't that function have the same problem of not having a loot table though? I mean, the loot should be different for each Monster type e.g. an Orc will not have the same loot as a goblin. It's my fault for not clarifying that. I hope this clarifies things a bit:

    Example:

    Possible Loot:

    1) Gold

    2) Dagger

    3) Boots

    4) Pelt

    5) Potion

    Thus Monster types like the orc and goblin can choose from any of the list but a Wolf Monster can't have daggers or potions. The chances for getting a particular item will also differ whereas my understanding is doing it through a function like you suggested will have similar results and I will end up with all Monsters being able to give all kinds of loot (such as a wolf giving a dagger) with the same chances regardless of monster type.

  • Hi all! First post from a newbie here and really hoping you can help.

    I've tried doing this myself but don't seem to be making headway. I try to do as much as I can before bothering anyone else but this really has me stuck.

    I have 2 Families:

    1) Monsters

    2) Loot

    Goal:

    When a Monster dies, it creates Loot from a "loot table". Different Monsters will create different loot and some loot will be rarer than others.

    Of course, I could do it like this (in pseudo code):

    ON DEATH: Goblin

    IF Random = 1-10 ----> loot: gold (1-5)

              = 11-15 ----> loot: gold (5-10)

              = 16-17 -----> loot: dagger

              = 18 ----> loot: potion

    ON DEATH: Orc

    IF Random = 1-5 ----> loot: gold (5-10)

              = 6-10 ----> loot: sword

              = 11-15 -----> loot: armor

              = 16-20 ----> loot: shield

    But as you can see, with a lot of Monster and Loot types, the event list will get really long!

Norbingel's avatar

Norbingel

Member since 31 Oct, 2012

None one is following Norbingel yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies