Will this work? :O

Get help using Construct 2

Post » Thu Aug 11, 2016 10:56 pm

Hello,

i want the game to select random background every 25th score point, will this work? :)

https://s10.postimg.org/t3msar8sp/dsffsdfsfsddfsd.png

Do you have any ideas how to implement into this code another condition, etc. when background fram is 0 change frame to 1 and opposite? :)

Thanks a lot! :P
B
10
S
1
Posts: 42
Reputation: 620

Post » Thu Aug 11, 2016 10:59 pm

As score increases add 1 to a global variable. When that global variable reaches 25, select a new random background, then reset global variable to 0.
B
46
S
16
G
77
Posts: 2,164
Reputation: 45,845

Post » Thu Aug 11, 2016 11:13 pm

I used modulo to devide the score(as you can see in link), thats the fastest way to do it, but I would like to know, if i can add another another condition, when 1st background is active, change it to background 2 and opposite way from 2 to 1. I cant make it work. :/
B
10
S
1
Posts: 42
Reputation: 620

Post » Thu Aug 11, 2016 11:18 pm

Select the Body events, press S for sub event and create two sub events. One will be if animation frame is 0 > set animation frame to 1, the other will be if animation frame is 1 > set animation frame to 0 or you can use an Else if 0 and 1 are going be the only two options. They will both act only when the modulo event is true.
B
46
S
16
G
77
Posts: 2,164
Reputation: 45,845

Post » Fri Aug 12, 2016 12:01 am

Thanks for help, you did guide me and i reworked it appreciate it! :)
B
10
S
1
Posts: 42
Reputation: 620


Return to How do I....?

Who is online

Users browsing this forum: yolkgames and 29 guests