Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Lighting issue


Recommended Posts

So my game has dark areas that can be illuminated with an item. I've managed to simulate it by having a shadow and/or light graphic follow the player's position. I've managed to get it to appear and dissapear only when the light sensor is overlapping a shadow trigger. The problem I'm having is getting the flash light to work. I'm basically having two shadow graphics follow the camera, one is invisible until a button is pressed. At that point I want the graphics to swap visibilities and stay that way until the button is pressed again.

I can't get it to work right. It either just flashes for a moment or doesn't work at all. Active 27 is the flashlight graphic and Active 28 is the shadow graphic.

Light>

[INDENT]-Start of Frame>[/INDENT]


[INDENT][INDENT]-Make "Active 27" invisible
-Make"Active 28" invisible[/INDENT]

[/INDENT]

[INDENT]-Always>[/INDENT]


[INDENT][INDENT]-Set position of "Active 27" at (-240,-173) from "Player sensor"
-Set position of "Active 28" at (-240, -173) from "Player sensor"[/INDENT]

[/INDENT]
>>>>>>DARK

[INDENT]-If "lightsensor" is overlapping "Shadowtrigger">
-NEGATE upon pressing "D">
-"Active 27" is invisible>[/INDENT]


[INDENT][INDENT]
-"Active 28" Reappear[/INDENT]

[/INDENT]

[INDENT]-If "lightsensor" is NOT overlapping "Shadowtrigger">
-NEGATE upon pressing "D">
-"Active 27" is invisible>[/INDENT]


[INDENT][INDENT]-"Active 28" Invisible[/INDENT]

[/INDENT]

[INDENT]-If "lightsensor" is overlapping "Shadowtrigger">
-upon pressing "D">
-"Active 27" is invisible>[/INDENT]


[INDENT][INDENT]-Make "Active 28" invisible
-"Active 27" Reappear[/INDENT]

[/INDENT]
>>>>FLASHLIGHT

[INDENT]-If "lightsensor" is overlapping "Shadowtrigger">
-NEGATE upon pressing "D">
-"Active 28" is invisible>[/INDENT]


[INDENT][INDENT]
-"Active 27" Reappear[/INDENT]

[/INDENT]

[INDENT]-If "lightsensor" is NOT overlapping "Shadowtrigger">
-NEGATE upon pressing "D">[/INDENT]


[INDENT][INDENT]-"Active 27" Invisible[/INDENT]

[/INDENT]

[INDENT]-If "lightsensor" is overlapping "Shadowtrigger">
-upon pressing "D">
-"Active 28" is invisible>[/INDENT]


[INDENT][INDENT]-Make "Active 27" invisible
-"Active 28" Reappear[/INDENT]

[/INDENT]
[/CODE]

halp plz

Link to comment
Share on other sites

  • 3 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...