Bullet Behavior and instances

Get help using Construct 2

Post » Sat Jan 07, 2012 7:20 am

Hello Everyone. I'm new to C2 and don't know what's happening here.

I Have 4 enemies(instances of same object), and I want them to move on a square(box) path.
So I gave them the 'Bullet Behavior' and placed some Region Sprites over each corner of the box. When the enemy steps in, it just turn its Bullet Motion Angle.
The problem is, this happens just one time, and then even when it collides with another Region Sprite it goes straight.
I Checked many things, and I'm sure its triggering the event.

I've also had some kind of trouble with this bullet behavior and instances of same object before. I wanted to set bullet speed to double, but it didn't work. I solved getting all instances every tick and setting each speed. Wonder if there wasn't a better way, like setting the bullet speed for all instances just once and every time a new instance is created.

So I assume that when I do
Enemy1 Set bullet angle of motion to Enemy1.Bullet.AngleOfMotion + 90.
It works, but doesnt save it to the instance.

Example: Enemy1 Angle is 0. Enters Region ->[0+90] Turn 90 (but Enemy1Angle still 0) , then Enter Region Again ->[0+90] Keep facing 90,so goes straight.

And those enemies are facing diferent angles.The first one to reach one region goes to its angle +90. Then the other when reach a region, goes to the same angle of that first guy.

I Don't know if I'm missing something here, or its just the way C2 Works.
I Just want to make my enemies walk around...
Bah, it's confunsing, no one will undestand lol.Sorry, it's just 5am here,sleepy.
Posts: 44
Reputation: 1,315

Post » Sat Jan 07, 2012 10:57 am

send the capx
Posts: 1,479
Reputation: 16,336

Post » Sat Jan 07, 2012 5:16 pm

I was avoiding this. I solved creating an instance variable for the enemies called TURN.
I Set TURN to some initial angle. Then when it colides the region, I do
Enemy1.TURN + 90 -> Set Enemy1.Angle to TURN.
And It worked.

Just wanted to do this without extra variables, by using the existing BulletAngleMotion.
Posts: 44
Reputation: 1,315

Return to How do I....?

Who is online

Users browsing this forum: emoaeden, Kyatric, OddConfection and 6 guests