playMaker

Author Topic: Looping background  (Read 1390 times)

Peeter1978

  • Playmaker Newbie
  • *
  • Posts: 23
Looping background
« on: April 15, 2021, 02:55:00 PM »
Hi,
I want to make a simple 2D game with looping background. Being absolutely new to Playmaker I have watched several videos and read explanations about it, but I am still a bit perplexed. Yes, I found this thread (https://hutonggames.com/playmakerforum/index.php?topic=18700.msg81179#msg81179), but came on - it's really impossible to follow the steps given there. They are too vague and too detailed at the same time and I don't get it at all. :(

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Looping background
« Reply #1 on: April 15, 2021, 08:08:44 PM »
Hi.
The important part is after 5min mark and it shows 3 ways on how you can do this.

You might want to follow some basic tutorials (series) 1st to get familiar with Playmaker before starting your own project.
its probably the biggest mistakes most people do is to start on your own project without being familiar with Unity (or any other game engine and Playmaker ) whether using playmaker or c# :)

You can find many links to tutorials on the Tutorial page and on Youtube

Peeter1978

  • Playmaker Newbie
  • *
  • Posts: 23
Re: Looping background
« Reply #2 on: April 16, 2021, 04:36:20 AM »
I will look again, thank You! I think my problem is, I started first learning C# and Unity and I could script now this rolling background, but I want to get the grip of Playmaker and I'm having difficulties undertanding it's inner logic. But thank's! I will try and if I still don't get it, I'll come back with more precise questions.  :D

Peeter1978

  • Playmaker Newbie
  • *
  • Posts: 23
Re: Looping background
« Reply #3 on: April 16, 2021, 06:04:15 AM »
Okay, I went now through these methods. I do understand the principles but I cannot get the system works because, yes, I am an absolute beginner and I have following questions (especially method 2 caught my eye as I have built exactly the same thing using C# and it seemed most familiar to me). Your actions use events or variables which are called 'move Speed', 'Current pos' and 'Reset'. Where do they come from? How are they defined? What do they contain? And most importantly - how are they launched? Even if I build a similar FSM with the same actions ('Translate', 'Get position' etc) I a cannot start it as they contain stuff I have no idea how to make. Well, I have some idea - I can go to the 'Variables' and write something there, but then: what are the contents?
I know these are some really dumb questions and You wrote I should first learn Playmaker basics, but believe me - I have watched enough videos to know I cannot learn without trying to build at least some really simple stuff. And I presume this is simple enough. :)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Looping background
« Reply #4 on: April 16, 2021, 10:21:02 AM »
Hi.
Translate is doing the movement.

The 'move Speed' is a variable where you can set a value , the higher the value, the faster it will move.
and when negative it moves to the left and positive will move to the right.

'Get position' is getting the current world position and stores it in the 'Current pos' variable.

and the 'Reset Pos' you have to manually set as shown on the video.

You can find a sample scene of this on my Playmaker Samples 1.1 asset

But you should be able to create your own, when you set a value manually on 'move Speed' and 'Reset Pos' and on the 'Set Position action x value.
instead of variables you can also just set a number but its easier to adjust on a exposed variable.

Peeter1978

  • Playmaker Newbie
  • *
  • Posts: 23
Re: Looping background
« Reply #5 on: April 17, 2021, 04:50:52 PM »
Okay, thank You for the advice. New some of the things, didn't know all. So - appreciated. :)
Just want to point out - considering also anyone else who has been having similar questions or problems - a video series which proved to be really useful. In particular this video here helped me out with the looping background: .