So I have been looking at the above script, and it fits perfectly with the whole day/night script I have implemented.
However, does anyone know how to make the script so it puts a light on yourself? as I can't find it anywhere (as at night I want it visually harder to see, but I always want some light emitting from the main character)
Edit:
I may have been hesitant with this, might create a common event and give the user a lantern so they can use it if they want!
I will get back to this thread!
[ACE] Khas Awesome Light Effects
● ARCHIVED · READ-ONLY
-
-
please give a link to the script - no one can answer your questions without having access to the script you're talking about.
-
AFAIK, if ur using KHAS's, lanterns are the best way to go...
or you can try to use my lighting script (Lanthanum Lights, search for it) so that you can create lighting on the character and followers with a simple script call. Though it doesn't have dynamic shadows so if you need dynamic shadows, then you gotta stay with KHAS.
One word of advice though, unless you need dynamic lightings, I would highly suggest using overlay pictures for the night scene coz lighting scripts can cause a lot of lag due to the way they work. Though in your case since you want a lantern effect on the player, then I guess you do need to use scripts. -
Well I have got the in game lantern to toggle on, just no idea how to turn the common event off after its second use!
Really want to be able to toggle it off as it could lessen the lag (if it causes any)
I am going to implement it and if the testers get any lag I will try your idea and see the improvements as I don't want lag. -
maybe disable the lantern or destroy it if it's already on? can't help much without the actual script to work with. I had removed it from my comp when I made my own lighting script so this is just all from memory.
PS: maybe even just post the header of the script so we can see the instructions, I personally cannot download the demo anyways as I'm at work and AFAIK, the only download link for it was for the demo. -
The common event is :
comment: [light 2]
script
l = $game_map.lantern
l.change_owner($game_player)
l.set_graphic("torch_m")
l.set_opacity(180,30)
l.show
but just going to make it also add a "Lit Lantern" to your inventory, which will run the
script
l.hide
Going to see what the lag is like though (if there is any)
going to take a look at your lighting though! -
what happens if you call l.hide again?
-
Here is a link for the demo of him:
http://www.mediafire.com/download/diy3ba8uwxi3v6i/%5BACE%5D%5BEN%5D+Awesome+Light+Effects+1.0.rar
And that's how he disabled the lantern in the demo:
$game_map.lantern.hide -
Ok so I am using 2 Scripts
http://forums.rpgmakerweb.com/index.php?/topic/4917-khas-awesome-light-effects/
Gives torches, light sources e.c.t.
and
http://www.rpgmakervxace.net/topic/6145-advanced-game-time/
Gives morning noon and night + in game clock e.c.t.
AdvGT works as I want it too
and everything but 1 thing works for me with the Khas.
Which is when I want to make a cave pitch black (and only have lantern and occasional light source.
I use this as a Auto run event; (for example)
s = $game_map.effect_surface
s.change_color(120,0,0,0,200)
erase event
It seems to dim down then I think the AdvGT's tinting seems to stop this from actually processing and goes back to whatever clock dependent tint is meant to be on.
Before I start moving scripts (as I did before and made it so my custom menu broke)
If I put my Khas Lantern Script above my AdvGT script, will this action take priority?
I have messaged Vlue as he is very useful but waiting reply so thought you smarties could help :)
EDIT:
I have used the script line
USE_KHAS = true
Tested on a practice project of moving scripts over, still same issue of starting to fade then resets tint
Edit Edit: If It cant I dont mind just curious.
Will have to just sort something else out.
(was going to add a random weather generator to the mix but best sort this out first!)
Edit Edit Edit:
Tried using Notint on maps, but then it ignores the event implemented above, DoH! -
That one I used before of the one I'm using now, but it seems to have problems with KHAS Awesome Light Effects. :/
But I'm not a scripter att all, so I might be wrong, for me it crashed, even I used the line, like you did. :/
Tried copying it above KHAS and below, but both didn't worked. May others know it better, but I can't really help, sorry. :( (\s/) -
Its no problem :)
So I have figured out some of the way there (with help Vlue <3)
and on the transfer event to a cave I can put in
GameTime.pause_tint(true)
and on leaving
GameTime.pause_tint(false)
However,
for some reason my Lantern works and is on light [0]
but after 1 fight it dies right down, and I have no idea why! -
New issue posting it here in case there is a fix.
Using 640x 480 resolution now
Re/Write>
Done a bit of trouble shooting and it is due to Khas' lighting system, remove it from the scripts and the tint screen is fine with advanced lighting system.
So my new query is, how do I get Khas lighting system to work with 640x480 res?
Cheers :)
Edit:
Exact changes to my res are;
# Default Resized Min Tiles Default Min Tiles New
# Width 544 640 17 20
# Height 416 480 13 15
(Attached is what's happening)

-
The first line is 640 you need to change that:
You need to change at line 937 that:Spoilerreturn if sx > 544 && sy > 416 && sx + w < 0 && sy + h < 0
to
return if sx > 640 && sy > 480 && sx + w < 0 && sy + h < 0
Then in line 955 that:Spoiler$game_map.light_surface.bitmap.fill_rect(0,0,544,416,$game_map.effect_surface.color)
to
$game_map.light_surface.bitmap.fill_rect(0,0,640,480,$game_map.effect_surface.color)
The last line you need to fix is line 956 from that:Spoiler$game_map.light_surface.bitmap = Bitmap.new(544,416)
to
$game_map.light_surface.bitmap = Bitmap.new(640,480)
It worked for mine and it has a changing resolution, not a fixed one. ;) (\s/)Spoiler$game_map.light_surface.bitmap = Bitmap.new(544,416)
to
$game_map.light_surface.bitmap = Bitmap.new(640,480) -
That is perfect! Thankyou :)
I am guessing having a lot of events / light sources on 1 map will start lagging it, as all my maps but one seem ok (the one being a map with tones of lighting!)
I also have an issue where after combat my lantern light goes dimmer? -
This script get's easy affected by other scripts or the tint itself.
So if you have a day night script too, then it will also be affected by this.
Same goes for the tint command. Only the one from Victor don't get affected by those things.
But I wouldn't recommend it, because Victor scripts hates for example the Yanfly scripts. ;)
I needed to get around 20 lights to have a massive drop at a resolution of 1920x1200, this also belongs to the hardware you got. ;)
But up to 10 should make no problem, then it starts to lag. (\s/) -
The fix for the resolution is the same I gave you. :p
But if you never want to change that script again, even if you change resolution for some reason, you can use use Graphics.width for every 544 number in the script (which represents the width of the effect) and Graphics.height for every 416 number in the script (which represents the height of the effect).
And as for the lantern problem...
I made my lantern with button triggers, so, if the player press the needed button and the lantern is OFF, it will be turned ON, and if it is ON, it will be turned OFF. This can be made with a single common event. Get a script which can trigger common events on button press and you can make it too. Tsukihime got one, and Dekita too, I am using Dekita's, because that one got a neat on screen HUD too.
I never tested what happens after a battle thou, but there should be no reason for it to go off. I will test it when I come back from my afternoon shift.