Appearance Chance? Bb3

Discussion in 'How Can I...?' started by JSeeger6, Jun 29, 2019.

  1. JSeeger6

    JSeeger6 Avid Boxer

    Joined:
    Aug 29, 2018
    Messages:
    100
    Likes Received:
    12
    How can I assign an object/asset an appearance chance? Meaning, I would give an object a number as the probability (1 to 100) of it showing in a scene? This is a feature in BB2 but I'm not seeing a way to do it in BB3.
     
  2. JSeeger6

    JSeeger6 Avid Boxer

    Joined:
    Aug 29, 2018
    Messages:
    100
    Likes Received:
    12
    Bumping! Would love to know how I can assign an appearance chance to an object such as a coin/powerup/etc.
    I assume Math.random would have to be used?
     
  3. Hanomax

    Hanomax Avid Boxer

    Joined:
    Aug 24, 2018
    Messages:
    157
    Likes Received:
    85
    You can use random node for that.
    For example, in character's node map, you set up tometihng like that:
    Start node -> Timer node -> Random node -> Spawn node (inside code, you modify spawn location).
     
    JSeeger6 likes this.
  4. JSeeger6

    JSeeger6 Avid Boxer

    Joined:
    Aug 29, 2018
    Messages:
    100
    Likes Received:
    12
    Thank you so much!! Trying it out now
     
  5. JSeeger6

    JSeeger6 Avid Boxer

    Joined:
    Aug 29, 2018
    Messages:
    100
    Likes Received:
    12
    Would you mind explaining what the threshold attribute means/does in the random node? Trying to understand it fully so I can use it properly. Thank you!!
     
  6. Hanomax

    Hanomax Avid Boxer

    Joined:
    Aug 24, 2018
    Messages:
    157
    Likes Received:
    85
    Threshold is chance. 0.5 means 50/50 chance. And there are two outputs - "Over" and "Under". So, if it generates random number 0.125 for example, "Over" input is false, and "Under" output is true.
    If you want 10% chance, then threshold is 0.1, and must use "Under" output.
     

Share This Page