I Wanna Community
Fangames => Game Design => Programming Questions => Topic started by: Ario147 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.
-
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.
-
Could you make screen shots? I made it and nothing happend.
-
It sounds simple, are you sure you did it right?
-
I did, and after that i tried to change code, or to place the FlashLight object in the room, nothing D:
-
Odd... Well, what do you mean change the code?
-
when
x = player.x;
y = player.y;
haven't worked, i tried the
x = player;
y = player;
:Kappa:
-
It has to be following the player objects x and y, not just player.
-
Don't work anyway. :BibleThump:
-
Don't work anyway. :BibleThump:
Guess you will have to wait for Seph, it seems like it should work for everyone.
-
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?
(https://puu.sh/3sbXD.png)
-
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:
-
Also make sure the x and y tracking is in the right event type.