How do I Make an object fall from sky and follow player

Get help using Construct 2

Post » Tue Apr 22, 2014 11:32 pm

How do I Make an object fall from sky and follow player Avoider game
[img]imageshack.com/a/img19/5018/sqio.png[/img]
Banned User
B
5
S
1
G
1
Posts: 88
Reputation: 718

Post » Wed Apr 23, 2014 1:00 am

You should probably just figure this out but...

You spawn the object (physics / platformer whatever you're looking for) at the top of the screen (for example at Y = -10 X = random(windowwidth) ) and have another event on collision with the ground, which sets a (boolean) variable that describes whether it is "activated". When it is activated: if X < player.x move right else move left.

That's if you have a flat game world, otherwise I wish you luck with your AI.
B
42
S
14
G
3
Posts: 165
Reputation: 5,115

Post » Wed Apr 23, 2014 1:24 am

didint work this is a avoider game not platformer
[img]imageshack.com/a/img19/5018/sqio.png[/img]
Banned User
B
5
S
1
G
1
Posts: 88
Reputation: 718

Post » Wed Apr 23, 2014 1:34 am

@woddakota so you want like a guided missile?
B
43
S
12
G
6
Posts: 446
Reputation: 6,802

Post » Wed Apr 23, 2014 1:37 am

Just spawn an object with the bullet behavior and set the bullet's angle to angle towards the player
B
42
S
17
G
17
Posts: 2,247
Reputation: 17,461

Post » Wed Apr 23, 2014 1:38 am

What are you trying to do? Is this similar to some retro space shooters? Are you walking on a platform or suspended in the air? Do the objects follow you only after a certain point?

If this is suspended in the air, that's easier than above. You have them spawn, they drop automatically, you dodge them.
Also, if Sargas is right, then you just have your physics or whatever apply forces / move towards the player.
B
42
S
14
G
3
Posts: 165
Reputation: 5,115

Post » Wed Apr 23, 2014 3:38 am

the tnt still dont move i set the angle of motion on 0 cus my players is on 0 and tnt box dont move i put on start of layout set tnt box angle of motion to 0
[img]imageshack.com/a/img19/5018/sqio.png[/img]
Banned User
B
5
S
1
G
1
Posts: 88
Reputation: 718

Post » Wed Apr 23, 2014 9:46 am

@woddakota ok, listen, you really need to put more effort into this if you want people to help you, the forum is not a magical place where all your dreams come true. you'll need to give in order to get back.
at least use punctuation in your sentences.
You're assuming we will just understand what you're talking about, and we haven't even seen what you're doing. and we have 0 context to go by.

please read this before going any further: tips-for-posting-in-the-quot-how-do-i-quot-forum_t62843
B
43
S
12
G
6
Posts: 446
Reputation: 6,802


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 18 guests