How do I made random spawn picture for prank game

Get help using Construct 2

Post » Wed Jan 17, 2018 12:22 pm

Hi
im new in this field, and I am planning to create a puzzle game with prank theme, where suddenly a scary image filled the screen randomly for a few seconds then disappeared back into the main game, which I wanted to ask how to create the correct event to display the scary image suddenly, a few seconds on the screen, then disappear.
Thank you very much
B
9
S
2
Posts: 7
Reputation: 541

Post » Wed Jan 17, 2018 1:16 pm

You can make this image invisible, add Timer behavior. On start of the layout set Timer to random(10,30) for example.
On Timer event set image visible, wait 2 seconds, set invisible or destroy.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
156
Posts: 2,202
Reputation: 82,985

Post » Wed Jan 17, 2018 3:24 pm

dop2000 wrote:You can make this image invisible, add Timer behavior. On start of the layout set Timer to random(10,30) for example.
On Timer event set image visible, wait 2 seconds, set invisible or destroy.


ok i'll try it thanks a lot
B
9
S
2
Posts: 7
Reputation: 541

Post » Wed Jan 17, 2018 7:11 pm

dop2000 wrote:You can make this image invisible, add Timer behavior. On start of the layout set Timer to random(10,30) for example.
On Timer event set image visible, wait 2 seconds, set invisible or destroy.



i've try it and unfortunately it not work, i think it is because my knowledge still shallow on this logic :oops: ,
i'll very appreciated if anybody can give me step by step tutorial, or maybe some links related to it.
thanks a lot
B
9
S
2
Posts: 7
Reputation: 541

Post » Thu Jan 18, 2018 2:19 am

https://www.scirra.com/manual/167/timer

Code: Select all
System: On start of layout -> ScarySprite Start Timer "Suprise" for random(10,30) seconds

ScarySprite: On Timer "Surprise" -> ScarySprite set Visible
                                 System: Wait 2 seconds
                                 ScarySprite set Invisible

Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
156
Posts: 2,202
Reputation: 82,985

Post » Thu Jan 18, 2018 3:47 am

dop2000 wrote:https://www.scirra.com/manual/167/timer

Code: Select all
System: On start of layout -> ScarySprite Start Timer "Suprise" for random(10,30) seconds

ScarySprite: On Timer "Surprise" -> ScarySprite set Visible
                                 System: Wait 2 seconds
                                 ScarySprite set Invisible



THANKS IT WORK, you're my hero
B
9
S
2
Posts: 7
Reputation: 541


Return to How do I....?

Who is online

Users browsing this forum: Taz and 3 guests