How do I have block randomly move left/right (Like Kaboom)

Get help using Construct 2

Post » Mon Mar 02, 2015 7:39 pm

Hi...

I'm trying to make the old school game where a character would randomly move left/right on the screen -- and then gradually increase its speed as time passes. I'm basically looking to make a game very much like the old atari 2600 game Kaboom (screenshot attached).

Oh... here is a short video I found on Youtube just incase you don't remember the game:
https://www.youtube.com/watch?v=K06GMTx_NgY

I am trying to make the character you see at the top of the screen dropping bombs -- he is randomly moving left/right and moves faster over time.

Unfortunately, I can't seem to figure out how to make the character move randomly left/right on the screen.... If somebody could let me know the EXACT command to do it, it would be be greatly appreciated.

PS: Basically.. the character moves only left and right on the screen.. It randomly moves from one end of the screen to the other... and then the character gradually increases his speed over time...

Thanks in advance. :)
You do not have the required permissions to view the files attached to this post.
B
9
S
2
Posts: 111
Reputation: 1,010

Post » Mon Mar 02, 2015 8:33 pm

First idea is to use Sine-Horizontal, then you can Set period to shorter after X seconds or after X bombs are dropped.
Frosty Elk AB
www.frostyelk.se
Have no fear, We come in peace!
B
13
S
3
G
1
Posts: 106
Reputation: 1,169

Post » Mon Mar 02, 2015 8:35 pm

I fiddled with the "sine-Horizontal" but I couldn't figure out how to make it RANDOM. I do NOT want it to always go from the left to the right and back forth... it needs to be random like in the video. Hence, I'm stumped. I'm sure that I use the random command some how but I haven't figured out exactly how. :(

Wait! I just found this tutorial:

https://www.scirra.com/tutorials/190/random-movement

I THINK I understand it a little better now... I'll give it a try when I get home.. thanks for the info on Sine.. I didn't realize it apparently has a random feature included. :)
B
9
S
2
Posts: 111
Reputation: 1,010

Post » Tue Mar 03, 2015 4:28 am

NOPE.. I'm still confused.. I looked very closely at the above tutorial which added 2 'sines' to it.. and i see that it put in 'random' numbers in the sine behavior.. but if you watch the pattern, it really is NOT random... it repeats the same pattern over and over... Plus... It doesn't make sense why I woulid need TWO (2) signs if I tell the first sign to use RANDOM anyway... so I'm REALLY confused now.

Hence.. I'm still confused.. if anybody could show me EXACTLY how to make a RANDOM character go back and forth, please do show me. Thanks greatly in advance. :)
B
9
S
2
Posts: 111
Reputation: 1,010

Post » Tue Mar 03, 2015 5:29 pm

Made an example file for ya. Instead of using Sine i used Bullet behavior and changed its speed randomly.

You can playtest the example here: (Use touch or mouse to drag the catcher left and right, you got 3 lives then you die)
https://www.frostyelk.se/bomberman/

Get the file here:
https://www.frostyelk.se/bomberman/BomberMan_Demo.capx
Frosty Elk AB
www.frostyelk.se
Have no fear, We come in peace!
B
13
S
3
G
1
Posts: 106
Reputation: 1,169

Post » Wed Mar 04, 2015 12:29 am

Wow! Wow! Wow!!

Thank you soooooooooooo much for taking the time to create that example. It is ENORMOUSLY appreciated.

At first, when I looked at it, I STILL could not figure out how you got the character to randomly go in the opposite direction for no particular reason (via the bullet object)... but then I FINALLY realized you used a NEGATIVE speed to make it go backwards. I never would have thought of that!

Thank you again very very much. :)
B
9
S
2
Posts: 111
Reputation: 1,010

Post » Wed Mar 04, 2015 9:31 am

Your welcome! Glad i can help!
Frosty Elk AB
www.frostyelk.se
Have no fear, We come in peace!
B
13
S
3
G
1
Posts: 106
Reputation: 1,169


Return to How do I....?

Who is online

Users browsing this forum: Ajbael, ismael123, Kenthria, lennaert, R0J0hound and 10 guests

cron