colliding with other actors & numbers
Hello,
I am making a game where lots of boxes fall down - about 20 boxes..
just wondering if there was a different way so that the boxes bounce on each other, instead of adding 20 collide rules to all of the 20 boxes?
Also, I have a rule that is random (0,3) seconds (it is a timer), how could I make it that the seconds could be not just 1 or 2 or 3 but 1.2343 or 2.32424 seconds..
Hope you understand - thanks
I am making a game where lots of boxes fall down - about 20 boxes..
just wondering if there was a different way so that the boxes bounce on each other, instead of adding 20 collide rules to all of the 20 boxes?
Also, I have a rule that is random (0,3) seconds (it is a timer), how could I make it that the seconds could be not just 1 or 2 or 3 but 1.2343 or 2.32424 seconds..
Hope you understand - thanks
Sydney Swans 2014!!
Best Answers
-
simo103 Posts: 1,331
@brenanzh926 .. just a thought (ie: haven't tested it) .. but what if you did a real attribute named say 'RndTime' and set its value to random(0,4000). Then in your timer use 'RndTime/1000'. you could make it more decimals by doing random(0,40000) but then using 'RndTime/10000' .... hope that works! -
lo_k Posts: 23
@brenanzh926 .. just a thought (ie: haven't tested it) .. but what if you did a real attribute named say 'RndTime' and set its value to random(0,4000). Then in your timer use 'RndTime/1000'. you could make it more decimals by doing random(0,40000) but then using 'RndTime/10000' .... hope that works!
That's pretty smart and that might work but you would probably have to take rand(1,4000), because 0/10000 is undefinable and would not work...
Answers
Hope this helps
Can you please see if you understand my timer question too (I edited the post)
Sydney Swans 2014!!
Ok… just found a solution but it is probably not the easiest way to do it:
1. Set up a table with all possible time periods e.g. from 1 to 2 in 0.2 steps. that makes 6 rows and 1 column(real) name the table Times or something like that:
Uploaded with ImageShack.us
2. In your timer now add this expression: random(tableCellValue(Times,1,1),tableCellValue(Times,6,1))
What this means is that the timer will choose a random time from your table.
It works.
Of course you can change the values in the table and add more but you have to keep in mind to change the expression. If you don't get it, go and watch the youtube table tutorials…
getting a black screen every time i try to preview
would there be another way, or is there a way to fix my error (black screen)
Sydney Swans 2014!!
Can't help you then... You probably have to go back and check everything or try something else
Sydney Swans 2014!!
Sydney Swans 2014!!