random object

0 favourites
  • 3 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • hopefully someone can help me with this, i have an object that when the timer reaches 0 it will create the object then set a path via pathfinding to a random object with the variable "Village" but unfortunately all it does is create an object but i cant find any way of setting it to a random object

    please help this noob

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If I understood you correctly, put the objects you want in a family and make "Village" a variable for that family. After that use System->Pick Random Instance


    Just noticed you don't have a license for the full version so I think you can't use families. In this case, try something like this:

    Local number = x

    Set Local number to round(random(x))

    Local number= 0

    System-> Pick Random Instance (object 1)

    Local number= 1

    System-> Pick Random Instance (object 2)

    Local number=2

    System-> Pick Random Instance (object 3)

  • hey thanks for the reply, i do have a personal licence but its on steam lucky the object is part of a family and so is variable

    so if i did

    system -> pick random instance

    family = "Village"

    then object pathfind to family.x.y it would work?

    update. ive done exactly what you said and it works a treat thanks a bunch for your help

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)