How to Have a Random Time?
Eri3hen
Member Posts: 1
I'm making a sort of "Whack-a-Mole"-like game and I'm trying to have the moles disappear for a random time period (between 2 and 4 seconds). How do I do that? I know how to make the mole disappear but how do I make a random spawning time period?
Comments
Every random(2,4) seconds spawn
Need Help? Email Me | Templates | Full Game Source Code
@tatiang recently posted just this in the Spare Code Thread.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
yeah I have that already but it still won't work. I also have a real attribute RandomTime to 1.
Here's what I have:
rule when all is pressed : touch
interpolate alpha 0
timer every 1 second(run to completion) set self.RandomTime(2,4)
timer every 2 second
if self.randomtime 2
if self.randomtime 3
if self.randomtime 4
interpolate alpha 1
You posted this in Help Wanted which is for PAID requests. I moved this to Working with GS. If you're using Windows, let me know and I'll put this thread in the PC sub-forum.
Are you sure you tried my demo? It sounds like you're making things more complicated than they need to be. Here's the direct link to the post: http://forums.gamesalad.com/discussion/comment/464547/#Comment_464547.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
'How to Have a Random Time?'
Drink heavily on an empty stomach.