Turn day on and off

Get help using Construct 2

Post » Tue Jul 23, 2013 10:11 am

If you want specifically to use the Boolean Function, Another option is that you could make a null object called "Day_Night_Toggle" and assign it a Boolean instance Variable that you call when you want in the Event sheet..or just assign the Variable to an existing object in the layer you want to toggle
Null objects are common usage in Games Design.

Null object can be a small invisible or Transparent Sprite created the usual way and has the added benefits of being an entity that you can easily access with other function calls..or implement other EFFECTS to like WEBGL

Often I find Simple Color Overlays are good for Day/Night Transitions..
and also allow lighting FX
mystazsea2013-07-23 10:15:04
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
34
S
13
G
8
Posts: 318
Reputation: 7,670

Post » Wed Jul 24, 2013 2:53 am

I don't know how you fixed this, but for future reference:

create global variable: Toggle_Daylight (set initial value to 0)

On SHIFT key pressed: -> set Toggle_Daylight to 1-Toggle_Daylight

Toggle_Daylight = 1 -> Set Daylight to Day

Toggle_Daylight = 0 -> Set Daylight to Night


This should work for any "toggle" type situation

Cheers
B
11
S
3
G
2
Posts: 26
Reputation: 3,124

Previous

Return to How do I....?

Who is online

Users browsing this forum: istero, zenox98 and 8 guests