Bullet Behavior and instances

0 favourites
  • 3 posts
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • 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.

    bye.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • send the capx

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)