Generate new object every 5 seconds


#1

Hi, I'm looking to generate a new object every 5 seconds. I would like each new object to be a multiple of 7 (text - number). I think I might need to use the modulo function but I am unsure. Can you help me?
Thanks in advance
Moonster01


#2

So, what you want is an object that clones itself every 5 seconds, and each clone somehow stores a multiple of 7 somehow?


#3

Yes, that sounds correct, but each new clone is a different multiple of 7. Do you have any ideas?

Thanks for the quick reply.


#4

Could you use this?

Or maybe when creating each clone, a value increases with one, and then we change the "random" operator to that value?


#5

By the way, welcome to the forum!
I hope you'll get a nice time here!

Here are some topics to check out:




#6

Thank you. I'm just preparing my reply.


#7

I've posted a couple of images. The first is what I'm trying to get my multiples to do, fly up from the bottom of the screen in an arc, but I wanted to write some code that would generate new multiples every few seconds, without having to write the code for each number.

The second screenshot is how far I've got. I know I'm a little way off, any help would be appreciated.

The thing I'm most stuck with is how to get a new, automatically generated number to fly up.


#8

To make the multiples "fly up", or do anything, you have to add that code in a "When object is cloned" rule.


#9

Welcolm to da Forum @moonster01!
And sweg name​:stuck_out_tongue_winking_eye:


#10

What's the largest number of "multiples of 7" that you want visible at any single time? I'm going to guess that you don't actually want to create a new clone every five seconds, but rather to create a certain number of them & then recycle them as needed.

This sounds like Fruit Ninja. Check out THT's video on how that's done. I think it'll explain much of what you want to know. Just Google "Hopscotch Fruit Ninja" and you'll find a video.

Edit: just realized that I made an assumption that you want the numbers to fall back down after they fly up, which you didn't explicitely say. Either way, the fruit ninja video should show you how to create the clones and then make them fly up as needed.


#11

Btw welcome to the forum! Tag me anytime you want help like this: "@KVJ"


#12

Thank you for your support on this topic. Yes, @ThinBuffalo, you are correct. I am trying to recreate a similar game. I'll check out THT's video. Thanks also @CreationsOfaNoob for your help. I'll let you know how I go.


#13

You're welcome :D


#14

Looks like @CreationsOfANoob already helped you out!
By the way, welcome to the forum! =D I'm glad you figured out how to make a topic! (It took me a week XP)
If you have any questions, just tag me by typing this: @BellaWafflez17
It'll show up like this: @BellaWafflez17 and I'll get a notification saying that you tagged me. You can tag me for anything else, too!
Here's a cool topic!