Author Topic: Flashlight effect.  (Read 3630 times)

Ario147

  • Spike Dodger
  • Posts: 201
  • Sex me
    • View Profile
    • YouTube
  • Playstyle: Keyboard
Flashlight effect.
« on: June 30, 2013, 08:30:40 AM »
I need someone to explain me how to make flashlight effect in game maker. I have the sprite for it, just don't know how to make it hide level, and light follow the kid, don't know how.
Its a beautiful day outside.

Birds are singing, flowers are blooming,

On days like these, kids like you...

S H O U L D  B E  B U R N I N G  I N  H E L L .

Sephalos

  • Spike Dodger
  • Posts: 228
    • View Profile
  • Playstyle: Gamepad
Re: Flashlight effect.
« Reply #1 on: June 30, 2013, 02:39:18 PM »
To make a object follow to kid is pretty simple.
Make a object with the flashlight sprite and add this code in the "End Step Event"
x = player.x;
y = player.y;

Just make sure the origin of the sprite is set correctly.

Ario147

  • Spike Dodger
  • Posts: 201
  • Sex me
    • View Profile
    • YouTube
  • Playstyle: Keyboard
Re: Flashlight effect.
« Reply #2 on: June 30, 2013, 03:29:38 PM »
Could you make screen shots? I made it and nothing happend.
Its a beautiful day outside.

Birds are singing, flowers are blooming,

On days like these, kids like you...

S H O U L D  B E  B U R N I N G  I N  H E L L .

Holyanus

  • Guest
Re: Flashlight effect.
« Reply #3 on: June 30, 2013, 03:40:42 PM »
It sounds simple, are you sure you did it right?

Ario147

  • Spike Dodger
  • Posts: 201
  • Sex me
    • View Profile
    • YouTube
  • Playstyle: Keyboard
Re: Flashlight effect.
« Reply #4 on: June 30, 2013, 04:33:20 PM »
I did, and after that i tried to change code, or to place the FlashLight object in the room, nothing D:
Its a beautiful day outside.

Birds are singing, flowers are blooming,

On days like these, kids like you...

S H O U L D  B E  B U R N I N G  I N  H E L L .

Holyanus

  • Guest
Re: Flashlight effect.
« Reply #5 on: June 30, 2013, 05:03:49 PM »
Odd... Well, what do you mean change the code?

Ario147

  • Spike Dodger
  • Posts: 201
  • Sex me
    • View Profile
    • YouTube
  • Playstyle: Keyboard
Re: Flashlight effect.
« Reply #6 on: June 30, 2013, 06:56:09 PM »
when
x = player.x;
y = player.y;
haven't worked, i tried the
x = player;
y = player;

 :Kappa:
Its a beautiful day outside.

Birds are singing, flowers are blooming,

On days like these, kids like you...

S H O U L D  B E  B U R N I N G  I N  H E L L .

Holyanus

  • Guest
Re: Flashlight effect.
« Reply #7 on: June 30, 2013, 07:05:44 PM »
It has to be following the player objects x and y, not just player.

Ario147

  • Spike Dodger
  • Posts: 201
  • Sex me
    • View Profile
    • YouTube
  • Playstyle: Keyboard
Re: Flashlight effect.
« Reply #8 on: June 30, 2013, 07:10:22 PM »
Don't work anyway.  :BibleThump:
Its a beautiful day outside.

Birds are singing, flowers are blooming,

On days like these, kids like you...

S H O U L D  B E  B U R N I N G  I N  H E L L .

Holyanus

  • Guest
Re: Flashlight effect.
« Reply #9 on: June 30, 2013, 07:11:16 PM »
Don't work anyway.  :BibleThump:

Guess you will have to wait for Seph, it seems like it should work for everyone.

Starz0r

  • Owner
  • The Kid
  • Administrator
  • Posts: 343
  • Hall Of Fame
    • View Profile
  • Playstyle: Keyboard
Re: Flashlight effect.
« Reply #10 on: June 30, 2013, 08:28:36 PM »
Don't work anyway.  :BibleThump:

Guess you will have to wait for Seph, it seems like it should work for everyone.

Did you press the center button on the sprite?


Sephalos

  • Spike Dodger
  • Posts: 228
    • View Profile
  • Playstyle: Gamepad
Re: Flashlight effect.
« Reply #11 on: July 01, 2013, 06:05:07 AM »
It really should have worked.

Make sure you assigned a sprite to the object.
Make sure it is visible.
Make sure the sprite is not 100% transparent.
Make sure the origin is set properly.
Make sure the object has no draw event.
Make sure the object is in the room.

 :OneHand:
« Last Edit: July 01, 2013, 06:12:37 AM by Sephalos »

lemonxreaper

  • Administrator
  • Spike Dodger
  • Posts: 222
  • Do you even needle?
    • View Profile
Re: Flashlight effect.
« Reply #12 on: July 02, 2013, 04:24:44 AM »
Also make sure the x and y tracking is in the right event type.
Just pretend I have a cool picture like Zero.
Completed Fangames: httpss://dl.dropboxusercontent.com/u/4678222/Complete%20Fangames.txt