Zeus Lights & Shadows

Zeus81

Veteran
Veteran
Joined
Mar 17, 2012
Messages
164
Reaction score
150
First Language
French
Primarily Uses
I'll do an update later and add an option for that.

Or you can show what this bug look like, maybe I can fix it.
 

Laptopdancer

Gaymerz Rock!
Veteran
Joined
Oct 22, 2012
Messages
158
Reaction score
20
First Language
English
Primarily Uses
Oh I'm sure your script is fine. I have over 56 scripts running in my project. :) Im sure it's compatibility. I cant get reflections to work either. LOL
 

Zeus81

Veteran
Veteran
Joined
Mar 17, 2012
Messages
164
Reaction score
150
First Language
French
Primarily Uses
UPDATE : http://pastebin.com/raw.php?i=VpHHBuaW

Log Change : 1.3 : - new option to disable lights at the beginning of the script - new option to disable shadows at the beginning of the script - new option in events to prevent them from being darkened - new option in shadows to setup if they should darken characters or not - new option that allow to create lights/shadows without naming them they will be named automatically with the id of their event - fixed display bug related to scripts that change the game size during game on map even if it's a nonsense - fixed display bug related to shake screenA few details about the new features.
- new option in events to prevent them from being darkened
Before we had no choice all characters were darkened (when in a shadow), now you can change it by using the set_shadowable function in a script.
- set_shadowable(value, chara_id) Defines if a character can be darkened or not. value = true or false Default value is true. chara_id = id of the character on which change this option. If we put nothing it means "this event", which runs the script, as @event_id. Example : set_shadowable(false, -1) # prevent the player from being darkened set_shadowable(false) # prevent "this event" from being darkened
- new option in shadows to setup if they should darken characters or not
Before it was handled automatically, characters were darkened when below shadows associated with the map but not when below those associated with characters, now it's up to us to choose.
- shadow(key).shadowable = true or false Defines whether a shadow should darken characters or not. For shadows linked with characters it's important to make them not darken, otherwise the linked character will be darkened all the time. Default value is true. Example : shadow("shadow 1").shadowable = false
- new option that allow to create lights/shadows without naming them, they will be named automatically with the id of their event
Before we were obliged to name differently each of our lights/shadows, now we can give no name and the script will automatically generate one using the id of the event that created it.That way we can create an unnamed light for example, and make multiple copy/paste without having to change the name each time.

Code:
            light("light 1").setup("torch.png") # new light            light.setup("torch.png") # new light without name
 
Last edited by a moderator:

sean2099

Villager
Member
Joined
Aug 26, 2013
Messages
26
Reaction score
3
First Language
english
Primarily Uses
Hi, I am trying to set up a common event where if the player is blinded, then the screen is tinted black as long as they are blind.  I don't knowif this is the way the effects work here or I am missing something but I have two questions.

So, I got the tint part to work but...

1.  I can see other lights, like if I use your demo torch and flashlight.

2.  I want the screen to return to the previous tint once the blind condition is removed instead of it remaining black until I move to an event where the light changes.
 

sean2099

Villager
Member
Joined
Aug 26, 2013
Messages
26
Reaction score
3
First Language
english
Primarily Uses
I solved my own problem.  Yay for me!!
 

Abaddyn

Villager
Member
Joined
Aug 25, 2013
Messages
13
Reaction score
1
First Language
English
Primarily Uses

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
How about commercial use?
 

Ethos

Warper
Member
Joined
Sep 1, 2013
Messages
1
Reaction score
0
First Language
English
Primarily Uses
Hmm this looks good for a dark forest level I am working on. I'll give it a try. :)
 

Pern

Hello
Veteran
Joined
Jul 21, 2013
Messages
253
Reaction score
164
First Language
English
Primarily Uses
N/A
This script is amazing. I changed over as soon as I got done with the demo for Map Effects. Very nice, thanks for the work and the detailed user guide. I'm a bit of a slow learner so I appreciate that. Also, (terribly sorry for my lack of knowledge here) I'm really starting to like the game using a slightly darker hue to it. It just makes everything nicer, for a lake of a better term. Besides carefully placing tint commands, is there a way in the scripts to make this change permanent? The answer to this is probably a no-brainer and I'm just missing it, but either way, thank you!
 

Zeus81

Veteran
Veteran
Joined
Mar 17, 2012
Messages
164
Reaction score
150
First Language
French
Primarily Uses
I'm not sure to understand, when you change the screen tone it actually is permanent, no?
 

Pern

Hello
Veteran
Joined
Jul 21, 2013
Messages
253
Reaction score
164
First Language
English
Primarily Uses
N/A
I'm terribly sorry, the fault was on my end. The issue is I would put the tint command in one room, go to another in game, save and reload and the tint wouldn't be there anymore. But that was just me being silly. My question had been if I could change the color someway that didn't require the tint command. Instead, I wanted to use scripts (particularly your user-friendly script) to make the default color for the project the (-30,-30,-30, 0) I was using and change that lighter when need be. But the tint command would probably be the best way to do that, wouldn't it? No need to make it any more complicated. Sorry to confuse you!
 
Last edited by a moderator:

Laptopdancer

Gaymerz Rock!
Veteran
Joined
Oct 22, 2012
Messages
158
Reaction score
20
First Language
English
Primarily Uses
You can if you use Basic Game Time + Night/Day v1.6.2 and call all the tints for every time of day (-30,-30,-30, 0). But then in eventing if you ever need a tint for effect you have to use a script call to suspend game time tints to do you event tint and then return it back to (-30,-30,-30, 0) yourself...  :rock-left:  
 

Pern

Hello
Veteran
Joined
Jul 21, 2013
Messages
253
Reaction score
164
First Language
English
Primarily Uses
N/A
That's an option I haven't considered. I haven't touched any day/night scripts yet. Thanks for the suggestion :) I'll try it out.
 

XinChao

Veteran
Veteran
Joined
Jun 11, 2012
Messages
117
Reaction score
3
Primarily Uses
Awesome script, it's a must have and more powerful than Khas' light effects. However if you can make it more simplistic similar to Khas light effects will be perfect. For example, in Khas' script it only needs to put one line of script to have light on.

The flash light in Khas' also is more realistic, he sets flash light position on the right instead of middle, it makes the character look like holding the flash light.
 

tyu48

Villager
Member
Joined
Nov 6, 2013
Messages
7
Reaction score
0
First Language
English
Primarily Uses
I'm trying to make the screen darken when the character enters a map and i just cant figure it out. Like I'm trying to set up a dungeon where the player needs to use a torch cause its total darkness. Also would it be possible to set some sort of time limit on the torch? To where it runs out after a while of having it equipped.
 

Zeus81

Veteran
Veteran
Joined
Mar 17, 2012
Messages
164
Reaction score
150
First Language
French
Primarily Uses
To make the screen all black simply use the tint (event command page 2 : visual effects) with RGB to -255.

The script can't handle time limit, but you can do it by programming with events variables, common events, parallel process...

xinchao : sorry for the late reply, the script haven't a single on/off script command because it haven't a single light effect, there is a lot of options and we have to set them up according to what we want.

About the position of the flashlight it's just an image, so if you want it to appear with an offset depending of the direction you just have to edit the image.
 
Last edited by a moderator:

tyu48

Villager
Member
Joined
Nov 6, 2013
Messages
7
Reaction score
0
First Language
English
Primarily Uses
To make the screen all black simply use the tint (event command page 2 : visual effects) with RGB to -255.

The script can't handle time limit, but you can do it by programming with events variables, common events, parallel process...
I got that far, but I have no clue how to make this take effect right when the player enters the map. I tried setting the trigger to auto run but then the Player cant move. I'm fairly new at this, sorry...
 

Zeus81

Veteran
Veteran
Joined
Mar 17, 2012
Messages
164
Reaction score
150
First Language
French
Primarily Uses
You can do it with a parallel process :

@> Tint Screen (-255, -255, -255, 0)

@> Erase Event
 

Quigon

electric boogaloo
Veteran
Joined
Mar 17, 2012
Messages
1,982
Reaction score
954
First Language
English
Primarily Uses
N/A
This is probably the best lighting script I've seen for torches with image overlays and such. One issue I'm running into however, if the player has a torch on and say, turns towards a ceiling tile, the torch will still display over the black border. It doesn't look great and I can't figure out how to fix it - I wonder if there's an option to kill the torch light on a certain terrain tag, perhaps? Here's a screenie of what I mean. I'm using parallaxes as maps so that may be an issue.

 

Zeus81

Veteran
Veteran
Joined
Mar 17, 2012
Messages
164
Reaction score
150
First Language
French
Primarily Uses
Not sure about how to do this, maybe I'll try something for the next update but it won't be as khas script.

Until then maybe you can use a picture that fit the black space, as pictures are above the map it will hide the light.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Posts

Latest Profile Posts

I think in the pursuit of making the game look and sound custom, we never really start making a game. Finish the game first using all necessary plugins (with placeholder assets), then replace it with the real ones.

I haven't finished a game, but I try this method. Progress seems to be faster. :D
Every now and then I think about all the things I need in my project, and get overwhelmed. Just focus on your tilesets, me. You can't build your maps without 'em!
If a picture speaks 1000 words, how many pictures does a video speak??
I don't really get the "Pass Interference" Flag in (American) Football. Aren't you SUPPOSED to interfere with passes in Defense?? What exactly is the threshold that warrants a Flag?
TS Zeta.. blow your ass east... I cant take a round 3.

Forum statistics

Threads
104,434
Messages
1,006,326
Members
135,957
Latest member
parttimerpgmaker
Top