How do I move an object to a x,y position?

Get help using Construct 2

Post » Sat Nov 05, 2016 11:59 am

I tried something out, maybe this is what you are searching for. There are some more tiny things also, but you don't need to use everything there, I also noted what you need and what not.

https://www.dropbox.com/s/b6roeljscbf1qg2/CardGame_example.capx?dl=0
Last edited by 13spongg13 on Sat Nov 05, 2016 2:28 pm, edited 4 times in total.
B
13
S
2
Posts: 80
Reputation: 821

Post » Sat Nov 05, 2016 1:03 pm

@pikazho
Making an object move in a simple linear way from A to B and make it stop at B is something that you can't do in Construct 2 out of the box unless you use the unsuited, complicated methods that people have suggested you before, like pathfinding ??? what ?
it still boggles my mind how can a basic and fundamental function is not an official behavior.
Yes you can achieve it using lerp but if I'm gonna spend time to write a few low-level events everytime I want to simply move an object I might as well learn coding and use a non beginner-friendly engine.
Anyway, you can use an unofficial behavior called Litetween.
B
21
S
10
G
3
Posts: 50
Reputation: 3,271

Post » Sat Nov 05, 2016 1:10 pm

@Abdellah

Actually watch my capx...
I did it with pathfinding and that's actually petty pretty simple (2 conditions needed)

A new behavior wouldn't be needed really since pathfinding does the same.
B
13
S
2
Posts: 80
Reputation: 821

Post » Sat Nov 05, 2016 5:30 pm

@13spongg13 Yeah, sure, that's possible.
But it would take up waaaaay more CPU power.
Imagine if you want to move like 50 cards for example.
Pathfinding would have to find a path for each and every single card while lerp for example just has to calculate once for every card.
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091

Post » Sat Nov 05, 2016 6:16 pm

@randomly
Yeah it may be, but as I said it's just one way to do it. I had only in mind to move 1 card at once (e.g. if you activate it)
+ I never really used lerp yet.
B
13
S
2
Posts: 80
Reputation: 821

Previous

Return to How do I....?

Who is online

Users browsing this forum: farsen and 22 guests