If Then Enemy Movement

Discussion in 'How Can I...?' started by Thefuzz, Nov 22, 2018.

  1. Thefuzz

    Thefuzz Boxer

    Joined:
    Nov 21, 2018
    Messages:
    3
    Likes Received:
    0
    From what I've read, buildbox is quite limited in it's 'if then' capabilities for enemies. For example, using grid coordinates for simplicity, I would like to be able to program:
    If enemy location is B2, move to either A2 or C2 at equal random probably of moving to either path. Is it possible to program multiple movement options of equal random probability?
     
  2. Frederik

    Frederik Boxer

    Joined:
    Oct 2, 2018
    Messages:
    48
    Likes Received:
    14
    It is possible to spawn transform object by probability with this trick:
    https://www.buildbox.com/forum/index.php?threads/tricks.14568/
    (create action outside level with 50% probability and link to some transform [1])

    If that transform [1] will be in way of enemy before other transform [2], you can change movement by probability. If the transform [1] will be spawned, enemy will be affected. If not, will just move along or can be affected by transform [2] in the way further.

    But the probability will be seeded only at start of the game once.
     

Share This Page