Looking for expression / solution Bullet behavior

0 favourites
  • 6 posts
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • Black dot every 1 second should spawn one blue arrow with bullet behavior

    Arrow on created/spawned should randomly choose direction to fly in the hole

    Black dot should NOT be rotated

    What i should do ?

  • IGDev

    Assuming you've already given the Blue Arrow the Bullet behaviour, add these two events:

    System: Every 1 second -> Black Dot: Spawn another object - Blue Arrow

    Blue Arrow: On created -> Set angle to random(360)

  • IGDev

    Assuming you've already given the Blue Arrow the Bullet behaviour, add these two events:

    System: Every 1 second -> Black Dot: Spawn another object - Blue Arrow

    Blue Arrow: On created -> Set angle to random(360)

    Set random to 360 is wrong because arrow will multiple times miss hole

    arrow on created should randomly sethis angle to holes position

    when i use SET angle(self.X, self.Y, hole.X, hole.Y)

    arrow go always to nearest hole and that is wrong

  • when i use SET angle(self.X, self.Y, hole.X, hole.Y)

    arrow go always to nearest hole and that is wrong

    Pick a random hole!

    [event] Blue Arrow: On Created

    [sub-event] System: Pick random instance (hole) -> Blue Arrow: Set angle to angle(self.X, self.Y, hole.X, hole.Y)

  • IGDEV try this

    1 create Global variable Spawn_Time = 2

    2 system every random (Spawn_Time) seconds ACTION BlackDot create bluearrow

    3 set bullet speed to ACTION random(220,400)

    4 set angle of motions ACTION random (360) degree

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > when i use SET angle(self.X, self.Y, hole.X, hole.Y)

    > arrow go always to nearest hole and that is wrong

    >

    Pick a random hole!

    [event] Blue Arrow: On Created

    [sub-event] System: Pick random instance (hole) -> Blue Arrow: Set angle(self.X, self.Y, hole.X, hole.Y)

    WORKS ! thanks

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