How do I...

Get help using Construct 2

Post » Sun Oct 20, 2013 11:35 am

Hi!

I am a noob when it comes to C2 and my problem is this: I want my my bad guy to throw an object at my main (player controlled) hero, when he sees him.
What would you recommend: something with "on path" to make him move on a route? But how do you make him throw the object since you r not doing it yourself by pressing any mouse button? Line of sight, maybe? Is there any good tutorial on this problem?

/Jens
B
5
S
2
G
3
Posts: 2
Reputation: 2,095

Post » Sun Oct 20, 2013 11:59 am

You have to set up an event and add conditions to make your bad guy throw an object at the time you want.

ths condition could be based on distance, line of sight, or whatever else you think is important.

example:

(event and conditions)
badguy is mirrored
system compare two values: player.x < badguy.x
System compare two values: distance(player.x,player.y,badguy.x,badguy.y)< 200
system every 0.2 seconds

(actions)
- badguy spawn bullet
- bullet set angle towards player



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


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests