Spawn Object at Random Position, Move towards another Object

Get help using Construct 2

Post » Mon Nov 30, 2015 11:18 am

Hello all,

I am working on one of the Game in which i have to Spawn single Sprite Object at random positions at run time with different time intervals. When that Sprite Objects Instantiated it should move towards Main Character or Main Sprite Object. Please tell me how to do this thing....I am new to Construct 2.
I also want to implement if-else if-else ladder because i want imposed some conditions according to that as there are 4 different positions or places like top/bottom/left/right of the screen from where i have to spawn object at run time and after spawning that object i have to move that object towards the main Object.

Thanks
B
4
Posts: 12
Reputation: 229

Post » Mon Nov 30, 2015 12:28 pm

This is all so basic:

create object at x: random() y: random()
give the object bullet behaviour

set angle towards position
or
set angle towards object

Did you follow the beginners tutorial?
Most of what you are asking is explained in it..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Dec 01, 2015 5:46 am

Thanks for your quick reply Little Stain.

I have tried this. I have created the Object through event and also add bullet behavior on that Object. Also add set angle towards position event. But when the Object spawn the angle of the Object reverse and it is moving in random direction not towards the Object i want to move.
B
4
Posts: 12
Reputation: 229


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests