@tatiang said:
My guess is that you'd have the Move behavior active only when the player is not swiping but I'm not sure.
I have no conditions, only the behavior
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
But you have conditions for swiping so you would need to incorporate the behavior into those, possibly in an Else section. Because @Socks is using vectorToAngle, he might have a better sense of how to do that. Typically, swipe distance is determined and that can be used to set up an Else condition for when swiping is NOT occurring. But I think his demo only measures swipe direction, not distance.
@diegolaya_ said:
Sorry , let me see if I can explain it better.. If you see right above theres a GIF from Socks, thats how my game it now.. The horizontal lines move down, like in "Dont touch the white tile" you know what I mean? So, I want my actor to move down with the lines unless I want it to move up to avoid the game over (If the actor touches the bottom of the scene you lose)... better?
Its really hard to explain as my native language is not english. ok...The scene is divided by vertical and horizontal lines, that make it look like it had lots of squares.. So, I made the horizontal lines move down so that it looks like the background as well is going up. The point is that I want those lines moving down to pull/push/drag/move the actor (square) with them so that they make you touch the bottom and lose. Better?
@diegolaya_ said:
The scene is divided by vertical and horizontal lines, that make it look like it had lots of squares..
Understood.
@diegolaya_ said:
So, I made the horizontal lines move down so that it looks like the background as well is going up.
Not sure about this part . . . are the horizontal lines and the 'background' the same thing, are you using two terms for the same thing here or is there another element besides the horizontal lines that is called the 'background' ?
And if the horizontal lines are going down (and they are the 'background') then it will look like the background is going down rather than up ?
@diegolaya_ said:
The point is that I want those lines moving down to pull/push/drag/move the actor (square) with them so that they make you touch the bottom and lose. Better?
What is 'you' in this context ?
Are 'you', 'the actor' and the 'square' all the same thing ?
@Socks Yes, they are all the same.. And maybe this will make you understand... What happens if I create an actor called "Horizontal Lines" change its size to width 320 and height 1, position him right in the middle and set a rule that says "Move in direction 270 relative to actor" and in the scene I click on Wrap Y? That line will start going down and reappearing in the top infinite times right? Well, imagine that going on but with a line every 40y (Because the square/Actor is 40x40)
@diegolaya_ said:
Socks Yes, they are all the same.. And maybe this will make you understand... What happens if I create an actor called "Horizontal Lines" change its size to width 320 and height 1, position him right in the middle and set a rule that says "Move in direction 270 relative to actor" and in the scene I click on Wrap Y? That line will start going down and reappearing in the top infinite times right? Well, imagine that going on but with a line every 40y (Because the square/Actor is 40x40)
Ok, make sense, so you want these lines to push the square ?
@Socks Exactly! If the square touches the bottom of the screen the game is over, so the point of the lines pushing the square down (along with obstacles) is to make the game over (in other words, to make you lose)
@diegolaya_ said:
Socks Exactly! If the square touches the bottom of the screen the game is over, so the point of the lines pushing the square down (along with obstacles) is to make the game over (in other words, to make you lose)
Well seeing as none of this was mentioned in your original question - and only introduced once that question was addressed - I can't see how the method for moving the square I outlined would fit easily into the new requirements, so I guess you'd have to start from scratch.
@diegolaya_ said:
Socks Thats what I thought.. I didnt know that would mess up things... So, if I want to do this, the rules you gave me wont be useful anymore?
Hard to say without sitting down for a couple of hours and working out the best way, but more than likely you would have to take a different approach.
@Socks said:
Hard to say without sitting down for a couple of hours and working out the best way, but more than likely you would have to take a different approach.
I really appreciate your help man!.. Im thinking out how to do this, if I figure out how, Ill let you know
Maybe make a very tall scene (like massive, 48,000 pixels high or something like that) - one you can navigate with the method for moving the square I outlined - then animate the camera moving upwards . . .
You can detect whether the square hits the bottom of the screen with either a wide horizontal actor constrained to the bottom of the camera - or through some simple maths that measure the distance between the square and the camera.
@Socks: Seems great to me! But before trying out... Can I make the bottom bar thiner? and also, as you dont recommend me using the replicate actor, what should I do instead? Or, why do you not recommend it?
@diegolaya_ said:
Socks: Seems great to me! But before trying out... Can I make the bottom bar thiner?
Seriously ! Lol Is that a serious question !? Unfortunately no, GameSalad has only one size of 'bottom bars', and there is no way to modify the size Also you were right to type out a question rather than to simply test this yourself, I recommend this is always the first step, never assume anything is going to work.
@diegolaya_ said:
and also, as you dont recommend me using the replicate actor, what should I do instead? Or, why do you not recommend it?
I've found it to be less efficient than simply tiling an actor.
I would make your background actor 320 pixels x 48,000 pixels (or however tall you want it to be) - and then in the Graphics attributes set 'vertical wrap' onto 'tile' so the image is tiled within the actor.
@Socks said:
I would make your background actor 320 pixels x 48,000 pixels (or however tall you want it to be) - and then in the Graphics attributes set 'vertical wrap' onto 'tile' so the image is tiled within the actor.
I didnt have a "Background actor" Im creating it now, but how do I make it have the grid? As I see on the video it is an image
@Socks Hey! Theres a part of the video where you cut something, its in the camera controler and detector.. It says constrain attribute self.position.y to scene.Camera.Origin.y + ???
@diegolaya_ said:
Socks Hey! Theres a part of the video where you cut something, its in the camera controler and detector.. It says constrain attribute self.position.y to scene.Camera.Origin.y + ???
I think it was 22, I just moved it up a little so you could read the word 'dead', but you don't have to copy any of this, it just shows you the concept, it was thrown together in 2 minutes, no need to stick to any of it.
@Socks said:
I think it was 22, I just moved it up a little so you could read the word 'dead', but you don't have to copy any of this, it just shows you the concept, it was thrown together in 2 minutes, no need to stick to any of it.
I dont really understand what you did there so I just copied it, but I dont know... I might be doing it wrong because the bottom bar goes up and thats all that happens
@diegolaya_ said:
I dont really understand what you did there so I just copied it, but I dont know... I might be doing it wrong because the bottom bar goes up and thats all that happens
Hey, it doesnt work for me... I dont know why.... Perhaps, your scene.Camera.Origin.Y for me is game.Camera.Origin.Y does that affect anything? and I dont understand the way you positiones the actors in the scene
Comments
I have no conditions, only the behavior
But you have conditions for swiping so you would need to incorporate the behavior into those, possibly in an Else section. Because @Socks is using vectorToAngle, he might have a better sense of how to do that. Typically, swipe distance is determined and that can be used to set up an Else condition for when swiping is NOT occurring. But I think his demo only measures swipe direction, not distance.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I don't understand any of that !
Its really hard to explain as my native language is not english. ok...The scene is divided by vertical and horizontal lines, that make it look like it had lots of squares.. So, I made the horizontal lines move down so that it looks like the background as well is going up. The point is that I want those lines moving down to pull/push/drag/move the actor (square) with them so that they make you touch the bottom and lose. Better?
Understood.
Not sure about this part . . . are the horizontal lines and the 'background' the same thing, are you using two terms for the same thing here or is there another element besides the horizontal lines that is called the 'background' ?
And if the horizontal lines are going down (and they are the 'background') then it will look like the background is going down rather than up ?
What is 'you' in this context ?
Are 'you', 'the actor' and the 'square' all the same thing ?
@Socks Yes, they are all the same.. And maybe this will make you understand... What happens if I create an actor called "Horizontal Lines" change its size to width 320 and height 1, position him right in the middle and set a rule that says "Move in direction 270 relative to actor" and in the scene I click on Wrap Y? That line will start going down and reappearing in the top infinite times right? Well, imagine that going on but with a line every 40y (Because the square/Actor is 40x40)
Ok, make sense, so you want these lines to push the square ?
@Socks Exactly! If the square touches the bottom of the screen the game is over, so the point of the lines pushing the square down (along with obstacles) is to make the game over (in other words, to make you lose)
Well seeing as none of this was mentioned in your original question - and only introduced once that question was addressed - I can't see how the method for moving the square I outlined would fit easily into the new requirements, so I guess you'd have to start from scratch.
@Socks Thats what I thought.. I didnt know that would mess up things... So, if I want to do this, the rules you gave me wont be useful anymore?
Hard to say without sitting down for a couple of hours and working out the best way, but more than likely you would have to take a different approach.
I really appreciate your help man!.. Im thinking out how to do this, if I figure out how, Ill let you know
Maybe make a very tall scene (like massive, 48,000 pixels high or something like that) - one you can navigate with the method for moving the square I outlined - then animate the camera moving upwards . . .
You can detect whether the square hits the bottom of the screen with either a wide horizontal actor constrained to the bottom of the camera - or through some simple maths that measure the distance between the square and the camera.
Example:
@Socks: Seems great to me! But before trying out... Can I make the bottom bar thiner? and also, as you dont recommend me using the replicate actor, what should I do instead? Or, why do you not recommend it?
Seriously ! Lol Is that a serious question !? Unfortunately no, GameSalad has only one size of 'bottom bars', and there is no way to modify the size Also you were right to type out a question rather than to simply test this yourself, I recommend this is always the first step, never assume anything is going to work.
I've found it to be less efficient than simply tiling an actor.
I would make your background actor 320 pixels x 48,000 pixels (or however tall you want it to be) - and then in the Graphics attributes set 'vertical wrap' onto 'tile' so the image is tiled within the actor.
@Socks Cmon Socks!! Was that sarcasm?!
I didnt have a "Background actor" Im creating it now, but how do I make it have the grid? As I see on the video it is an image
Just create a grid image (in theory a single square will do), import it, apply it to the actor and set it to tile.
@Socks Hey! Theres a part of the video where you cut something, its in the camera controler and detector.. It says constrain attribute self.position.y to scene.Camera.Origin.y + ???
I think it was 22, I just moved it up a little so you could read the word 'dead', but you don't have to copy any of this, it just shows you the concept, it was thrown together in 2 minutes, no need to stick to any of it.
I dont really understand what you did there so I just copied it, but I dont know... I might be doing it wrong because the bottom bar goes up and thats all that happens
Ok ?
Hey, it doesnt work for me... I dont know why.... Perhaps, your scene.Camera.Origin.Y for me is game.Camera.Origin.Y does that affect anything? and I dont understand the way you positiones the actors in the scene
Im so stupid sorry... I was confusing something.. The only problem is that I cant see the background actor...
This kind of feedback is not really much use.
Of course its useful! See? it works now... Thank you very much
Best thread ever. @Socks spins his magic again.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Hahaha you both did!