Homing missile

0 favourites
From the Asset Store
Lasers, Blasts, Beams, Bullets, & Missiles! AAA quality Energy FX for your game.
  • i do really struggle with my homing missiles. but by whole project is quite complicated.

    i have a family called all_chars with the four players in it p1_ship, p2_ship, p3... they all have an instance variable stored called "player" and the value of their player.

    i now have a power up which should spawn a homing missile. i tried every f*** thing and didn't get it to work.

    i stored the UID of the player who spawned the missile and let it chase the family all_chars for target which members dont have the same instance variable.

    i tried to do it with the UID. something like

    missile has target

    missile.turret.targetUID not equals missile.originUID -> unacquire target.

    i even tried it with for-loops, checked every player if he has the same instance variable as the missile and then acquired/unacquired the target.

    how can i except players out of a family from the target objects.

    problem is, my missile keeps chasing the wrong players and keeps exploding the wrong players.

    I'd be veeeeeery happy about a sample capx of an advanced sample capx of a good working homing missile.

    im afraid i can't share a capx because the scirra site is blocked from the content filter due to "games"

    cheers!

    phil

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry... this line got me....

    a sample capx of an advanced sample capx

    :)

    You could always use the angle lerp method until the missile get's to within a certain distance and then switch over to the set angle towards object method at the end...

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