How to create Flashlight

Hi there,

I can't find anything like this.

Basically how to make image follow player ? I have created something like flashlight ( black background with transparent hole) but I don't know how to make it follow player

Best Answer

  • MentalDonkeyGamesMentalDonkeyGames Posts: 1,276
    edited December 2015 Accepted Answer

    Create two game attributes (real). Call them playerX and playerY.

    In the character actot, create two behaviors.
    -constrain game.playerX to self position X.
    -constrain game.playerY to self position Y.

    In the flashlight actor, create two behaviors.
    -constrain self.position X to game.playerX.
    -constrain self.position Y to game.platerY.

    Mental Donkey Games
    Website - Facebook - Twitter

Answers

Sign In or Register to comment.