How do I change random expression over time?

Get help using Construct 2

Post » Thu Feb 25, 2016 12:38 am

Hello everyone!

I hope you can help me on this one.

I'm creating an object every random time of 5 an 10 sec. "System-Every Random (5,10) seconds".

What I need is after 20 seconds the random time goes to 1 and 5 seconds, and so on.

How do I do it? I hope you can help me.

Best!

Tuca
B
8
S
2
Posts: 25
Reputation: 650

Post » Thu Feb 25, 2016 2:54 am

Set a Global variable n and instead of using

Code: Select all
 "System-Every Random (5,10) seconds"


use

Code: Select all
 "System-Every Random (n x 5, n x 10) seconds"


Then every time you change the Global variable your randomness changes accordingly.

Hope I explained that correctly :)

"To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment."

Ralph Waldo Emerson
B
10
S
2
G
1
Posts: 56
Reputation: 1,300

Post » Thu Feb 25, 2016 2:45 pm

Hi BigFrank,

Thank you for your reply. It makes perfect sense!

But for some reason I can't get it to work properly. Is it possible for you make a simple capx with this? The object has a bullet behavior.

Thanks in advance,
B
8
S
2
Posts: 25
Reputation: 650

Post » Thu Feb 25, 2016 7:24 pm

Hmm, I roughed out a capx for you but I don't seem to be able to upload a file on this forum. I probably need a higher rep or post count or something like that.

"To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment."

Ralph Waldo Emerson
B
10
S
2
G
1
Posts: 56
Reputation: 1,300

Post » Thu Feb 25, 2016 10:55 pm

I've sent it to you by email. You should wait until the spawnDelay hits "0" - that's when it gets funny! :)

"To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment."

Ralph Waldo Emerson
B
10
S
2
G
1
Posts: 56
Reputation: 1,300

Post » Thu Feb 25, 2016 11:15 pm

Wow, that's perfect bigfrank!

Thank you so much for your help, This was exacly what I need!

All the best!
B
8
S
2
Posts: 25
Reputation: 650

Post » Thu Feb 25, 2016 11:49 pm

BigFrank wrote:I've sent it to you by email. You should wait until the spawnDelay hits "0" - that's when it gets funny! :)


Aw, c'mon. I want to see!

I'm still confused about the random events. Can somebody create a video example of how all of the separate 'random' commands work with regards to any kind of object it can be applied to?

Obviously I'm begging for a full video manual, LOL.
B
229
S
127
G
9
Posts: 150
Reputation: 23,101

Post » Fri Feb 26, 2016 1:12 am

B
8
S
2
Posts: 25
Reputation: 650

Post » Fri Feb 26, 2016 1:22 am

Hehehehe, now that's what I call a SPAWN! :twisted:

Edit: I just ran it in debug mode and at 0 spawnDelay there's up to 395 objects on screen :lol:

"To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment."

Ralph Waldo Emerson
B
10
S
2
G
1
Posts: 56
Reputation: 1,300


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests