How do I make a sprite move (A-B) in a variable arch path?

Get help using Construct 2

Post » Wed Dec 28, 2016 8:32 pm

Scofano wrote: I tried using sine movement on A and B and it works as well




you could'v drag the A and B point by hand forgot to tell you that! my bad :P
B
78
S
23
G
69
Posts: 1,353
Reputation: 43,985

Post » Wed Dec 28, 2016 9:32 pm

gamecorpstudio wrote:
Scofano wrote: I tried using sine movement on A and B and it works as well

you could'v drag the A and B point by hand forgot to tell you that! my bad :P



Haha, no problem. I noticed that. :D
B
33
S
5
G
1
Posts: 163
Reputation: 2,693

Post » Wed Dec 28, 2016 9:53 pm

I noticed I should find a way to reset the sequence from a certain point.

I mean, if i touch the screen, soccer player will go frame 1 (kick) and if it is colliding, he must kick the ball to the other side. Problem is, that ball will always go forward until it touches A.x A.y. Is there a way to interrupt it earlier? like if the ball has hit a wall?
B
33
S
5
G
1
Posts: 163
Reputation: 2,693

Post » Wed Dec 28, 2016 10:18 pm

Hi my name is Jazz813 and I have some troubleshots about my little project. First of all let's start from the beginning of my problem, I want to create a Game & Watch like game, I can move the player but in 5 differrent Layouts and here comes also my problem, here a picture from my game so maybe everyone can make a better image of the problem.
Image
So my problem is that when I move my player from left or right the birdscrap will disapear when the next frame jumps to the next Layout what's logical, I also tried to work with more Layer in one Layout because I think that if everything plays in one Layout it should work, but also there I encouted problems and it's when I tip it in the event sheet that the Player will move when I press the left or right button from the keyboard for example, it work for one frame but maybe I don't know the option to do it so , but I can't say the programm that if I press the left button anew the player move to the left agian and the last picture disapear...
Could anyone help me on this problem ?

Thanks very much
Jazz813
B
6
S
1
Posts: 8
Reputation: 366

Post » Wed Dec 28, 2016 11:31 pm

Jazz813 wrote:Hi my name is Jazz813 and I have some troubleshots about my little project. First of all let's start from the beginning of my problem, I want to create a Game & Watch like game, I can move the player but in 5 differrent Layouts and here comes also my problem, here a picture from my game so maybe everyone can make a better image of the problem.
Image
So my problem is that when I move my player from left or right the birdscrap will disapear when the next frame jumps to the next Layout what's logical, I also tried to work with more Layer in one Layout because I think that if everything plays in one Layout it should work, but also there I encouted problems and it's when I tip it in the event sheet that the Player will move when I press the left or right button from the keyboard for example, it work for one frame but maybe I don't know the option to do it so , but I can't say the programm that if I press the left button anew the player move to the left agian and the last picture disapear...
Could anyone help me on this problem ?

Thanks very much
Jazz813


Hey dude, I think you should create a new topic. :D
B
33
S
5
G
1
Posts: 163
Reputation: 2,693

Post » Wed Dec 28, 2016 11:58 pm

Ah ok, thanks, I was affraid to create a new topic but if it's ok I will do that.
B
6
S
1
Posts: 8
Reputation: 366

Post » Thu Dec 29, 2016 12:01 am

Scofano wrote:I noticed I should find a way to reset the sequence from a certain point.

I mean, if i touch the screen, soccer player will go frame 1 (kick) and if it is colliding, he must kick the ball to the other side. Problem is, that ball will always go forward until it touches A.x A.y. Is there a way to interrupt it earlier? like if the ball has hit a wall?


I tried to try out with the t variable but without sucess. I see on debug t just counts up and down, so the every tick would have priority over anything I set.
B
33
S
5
G
1
Posts: 163
Reputation: 2,693

Post » Thu Dec 29, 2016 6:26 am

Scofano wrote:I noticed I should find a way to reset the sequence from a certain point.

I mean, if i touch the screen, soccer player will go frame 1 (kick) and if it is colliding, he must kick the ball to the other side. Problem is, that ball will always go forward until it touches A.x A.y. Is there a way to interrupt it earlier? like if the ball has hit a wall?

just add overlapping with wall or on collision with wall change a variable and use that as a condition. im not sure what you have as a game, but if its simple enough u can post it here if its more complicated and u want to protect it send a capx to my pm. il look at it! and explain the changes i do.
B
78
S
23
G
69
Posts: 1,353
Reputation: 43,985

Post » Thu Dec 29, 2016 10:54 pm

gamecorpstudio wrote:
Scofano wrote:I noticed I should find a way to reset the sequence from a certain point.

I mean, if i touch the screen, soccer player will go frame 1 (kick) and if it is colliding, he must kick the ball to the other side. Problem is, that ball will always go forward until it touches A.x A.y. Is there a way to interrupt it earlier? like if the ball has hit a wall?

just add overlapping with wall or on collision with wall change a variable and use that as a condition. im not sure what you have as a game, but if its simple enough u can post it here if its more complicated and u want to protect it send a capx to my pm. il look at it! and explain the changes i do.


Nothing complicated, here it is https://www.dropbox.com/s/7us4eom03dtglyx/kickball.capx?dl=0
I just want A to kick the ball back and to be able to change the speed with a global variable (that I will random).
Notice that everytime A or B kicks the ball it changes the arc.
B
33
S
5
G
1
Posts: 163
Reputation: 2,693

Post » Mon Jan 02, 2017 1:48 pm

Happy new year, guys! :)
B
33
S
5
G
1
Posts: 163
Reputation: 2,693

Previous

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, dand, tinhofiel and 30 guests