casper667

csca
CSCA Light Effects

23 posts in this topic

CSCA Light Effects
By: Casper Gaming (Casper667)
Last Update: January 11, 2013
Latest version: 1.1.0

Introduction
Allows you to create lights for you game. Not as advanced as light system's like Victor's or Khas' light system. Comes with 12 preset light effects that are made to replicate the light effects of Thomas Edison VX, however you can easily create your own effects as well and even use different images for each light!

Features
- Easily customize and create light effects.
- 12 preset light effects.
- Turn lights on/off in game.

 

Updates

version 1.1.0

- Added ability to make lights not dependant on a switch.
- Added ability to alter light Z values


Screenshots


lighteffects.jpg



How to Use
Place in your materials section. Setup required. Instructions in script.

Script
Text file is found here(copy and paste everything into your script editor in the materials section): LINK
Demo can be found here: LINK
Light graphic: LINK (Light Graphic is from original Thomas Edison VX script and not made by me).

Credit
Casper Gaming

Terms
http://www.caspergam...rms_of_use.html

Edited by casper667

Share this post


Link to post
Share on other sites

Thanks you very much,Casper. This is a great script,just a little advice. It is not compatible with resolution change scripts,the script works,but the light effects are a little off.

Excuse me for my bad English and greetings from Argentina.

Share this post


Link to post
Share on other sites

I'll have to test it with a nonstandard resolution, but in the meantime there is a setting you can use to adjust the lights x and y coordinates already in the script.

Share this post


Link to post
Share on other sites

Hmm, I tested it at 640x480 resolution(max) and it worked fine, if anything the y coordinate was off by like 5 pixels, but not noticeable and you can easily set the y adjustment to 5 for each light in that case. I'm assuming your problem is a lot more severe than that... Are you using a certain script that changes more than just the resolution?

Share this post


Link to post
Share on other sites

I don't know what you're doing wrong. Check that your settings are all set up correctly and that no other scripts are conflicting with it.

Share this post


Link to post
Share on other sites

Step 1 copy the graphics

Step 2 past the script

step 3 add the comments to the event(Tags)

 

Still the lights don't show up help plzz!

 

Demo map works fine.

Same happens with me. And I can't find the Switch, thingy in the script.

Edited by Cheeyev

Share this post


Link to post
Share on other sites

The switch settings start around line 32 in the script. For the easiest way to get scripts to work (at least what I have found) is to try to directly copy and paste as much from the demo into your game as possible. Hopefully while copying you'll be able to see all that you need so you can better understand the script. That's what has worked best for me anyway.

 

Edit: I hope I understood your questions correctly.

Edited by KevinFrost
KaylieMarie likes this

Share this post


Link to post
Share on other sites

If you check the demo ,first event starts switches from 1 to 12 on.

Check the lines 32 33 34 49 and 50 in script:

 


32 #Set up your EFFECTS like this:
  33#EFFECTS[x] = ["NAME", graphic, zoom_x, zoom_y, opacity, blend_type, tone,
  34  #              switch, rand_opacity, adjust_x, adjust_y]

  49#switch is a switch ID. When this switch is ON, lights of this type will
  50# turn on. When the switch is OFF, lights of this type will turn off

 

 

.

 

So ,if you are using pre made effects you have to turn on the switches or just edit this part.....

 

 

 EFFECTS[0] = ["FIRE", "Light", 3, 3, 100, 1, Tone.new(255,-100,-255), 1, 10, 0, 0]
    EFFECTS[1] = ["LIGHT1", "Light", 1, 1, 150, 1, Tone.new, 2, 0, 0, 0]
    EFFECTS[2] = ["LIGHT2", "Light", 6, 6, 150, 1, Tone.new, 3, 0, 0, 0]
    EFFECTS[3] = ["LIGHT3", "Light", 1, 1, 150, 1, Tone.new, 4, 10, 0, 0]
    EFFECTS[4] = ["TORCH1", "Light", 6, 6, 150, 1, Tone.new(255,-100,-255),  5 , 30, 0, 0]
    EFFECTS[5] = ["TORCH2", "Light", 6, 6, 150, 1, Tone.new(255,-100,-255),  6 , 10, 0, 0]
    EFFECTS[6] = ["TORCH3", "Light", 3, 3, 100, 1, Tone.new, 7, 10, 0, 0]
    EFFECTS[7] = ["GROUND1", "Light", 2, 2, 100, 1, Tone.new, 8, 0, 0, 0]
    EFFECTS[8] = ["GROUND2", "Light", 2, 2, 100, 1, Tone.new, 9, 10, 0, 0]
    EFFECTS[9] = ["GROUND3", "Light", 2, 2, 100, 1, Tone.new(255,-255,-255,255),  10, 0, 0, 0] 
    EFFECTS[10] = ["GROUND4", "Light", 2, 2, 100, 1, Tone.new(-255,255,-255,100), 11, 0, 0, 0]
    EFFECTS[11] = ["GROUND5", "Light", 2, 2, 100, 1, Tone.new(-255,255,255,100), 12, 0, 0, 0]
 

 

 

.....to the switch you want. 

 

Hope this was helpful :D

Edited by J0pac
KaylieMarie likes this

Share this post


Link to post
Share on other sites

Hey folks! Was just wondering if anyone knew why the lights would be correct on one map and offset on another?

 

I can copy and paste the same event in the second map and the x appears to be offset to the left. The first room is 40 x 20 and the room where the lights aren't correct is a 17 x 13.

 

This may or may not be relevant, but my game resolution is set to 640 x 480. Any ideas? I can post screenshots or any information if needed! Thanks a bunch!

Share this post


Link to post
Share on other sites

Hey folks! Was just wondering if anyone knew why the lights would be correct on one map and offset on another?

 

I can copy and paste the same event in the second map and the x appears to be offset to the left. The first room is 40 x 20 and the room where the lights aren't correct is a 17 x 13.

 

This may or may not be relevant, but my game resolution is set to 640 x 480. Any ideas? I can post screenshots or any information if needed! Thanks a bunch!

If your resolution is 640x480, the screen is bigger than a 17x13 tile map, so of course it won't work (you can't have a map that is smaller than the resolution, that's why the editor doesn't let you go below 17x13, because that's the minimum size of the default resolution).

 

Take your resolution, divide each number by 32, and that is the smallest your map can be.

By default, 544x416 = 17x13

With 640x480 = 20x15

thegoodguylives likes this

Share this post


Link to post
Share on other sites

Oh my god man! Thank you SO much for that fix! It makes sense once you explained it, but I never would have thought of that on my own. (I'm pretty new to RPG Maker). Just been hitting up tutorials and trying out some scripts and such. I fiddled with this on and off for about a week, so you really saved me. Great script by the way. Thanks again  :lol:

Share this post


Link to post
Share on other sites

Quick question, I can't seem to figure out. Is there a way to have the Light stick to the character? As if they are holding a torch?

 

I could probably set up a janky way to do it with events and stuff, but if there is a script call that would be much easier.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.