Results 1 to 3 of 3

Thread: Random Function Chest

  1. #1

    Random Function Chest

    Kind time of the day, help anyone than I can, I donít know how to write a script for the chest so that when a button is pressed, fog forms and then a random thing from this chest appears. (Or at least just a random thing) Thank you all in advance.

  2. #2
    sorry, I assume english is not your 1st language... but I do not really understand what you are asking... are you asking for a chest that has a button that randomly draws a item form within it?

  3. #3
    1. Create a list of the objects that you want the chest to be able to spawn
    2. Create a button on the chest which executes a function
    3. Within the function, pick a random number whose upper limit is determined by the number of objects in the list
    4. Spawn a new object based on the object in the list at the randomly generated index number

Similar Threads

  1. Replies: 4
    Last Post: 11-09-2018, 05:40 PM
  2. Object Function Using Global Function
    By LordAshes in forum Scripting
    Replies: 6
    Last Post: 07-11-2016, 05:18 AM
  3. Replies: 4
    Last Post: 03-09-2016, 07:25 PM
  4. Random Map generater
    By cgg1 in forum Suggestions
    Replies: 0
    Last Post: 03-23-2015, 05:49 AM
  5. Miago's random Art and Projects
    By miago in forum Anything Goes
    Replies: 2
    Last Post: 04-24-2014, 06:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •