Author Topic: [XP] Flashlight System.  (Read 9882 times)

Offline Lukas

  • Trained Member
  • *
  • Posts: 35
  • LV: 6
  • Gender: Male
  • Forza Juve !!
    • View Profile
[XP] Flashlight System.
« on: July 23, 2012, 06:00:46 AM »
Flashlight System
Authors: Lukas
Version: 1.1
Type: Environment Add-on
Key Term: Environment Add-on

Introduction

 :D

Features

  • Flashlight

Screenshots

(click to show/hide)
(click to show/hide)

Demo

https://dl.dropbox.com/u/71706537/flashlight.exe

Script

-

Instructions

Place above main.

Compatibility

RPG XP

Credits and Thanks

  • Lukas

Author's Notes

Enjoy  :w00t:
« Last Edit: July 23, 2012, 08:31:29 AM by Blizzard »
(click to show/hide)
This image been put in a spoiler because it's 2 MB which is above the size of images allowed in a spoiler.
Thank you for your understanding.
~Blizz


~Sorry :)

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3247
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [XP] Flashlight System.
« Reply #1 on: July 23, 2012, 06:57:24 AM »
Nice little script. :)

I think "Environment Addon" would be far more appropriate than "Environment System", though.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Lukas

  • Trained Member
  • *
  • Posts: 35
  • LV: 6
  • Gender: Male
  • Forza Juve !!
    • View Profile
Re: [XP] Flashlight System.
« Reply #2 on: July 23, 2012, 08:28:29 AM »
sorry  :)
(click to show/hide)
This image been put in a spoiler because it's 2 MB which is above the size of images allowed in a spoiler.
Thank you for your understanding.
~Blizz


~Sorry :)

Offline Memor-X

  • Ethereal Devastator
  • ****
  • Posts: 428
  • LV: 8
  • Gender: Male
  • "The Otherworld Awaits you"
    • View Profile
    • MHO Ultra Mega
Re: [XP] Flashlight System.
« Reply #3 on: July 26, 2012, 01:08:45 AM »
nice, was thinking about setting up some dungeons in Nexis Core where you needed light, this saves me time having to try and code it myself (which i really should be doing)

couple of questions which the answers you can put in the features part

1) how is the Flashlight Triggered, is it by pressing a Key or using an item or both

2) (which should really be 1 but i'm asking these in order of as the appear in my head) do you need an item in your inventory to use it, if not, here's a suggestion, an option that will allow you to choose if you have to have an item in the inventory (eg, a Flashlight Item) and another option to choose if you want to use another item as fuel (eg, a Battery Item)

3) can you have another event to hold a flashlight....like a street lamp or something, i can't remember the game (i think it was Alone in the Dark Inferno) but there was a part where you had a light source at either end of this room and and in certain parts of the room and in the darkness there was this path which you would fall to your death if you walked off it so you had to use a light source to guide you across to each light sorce

Trish: hay Angela, you should take the role, you always wanted to be an actress
Angela: yeh but what about you
Trish: i'll become one too
Angela: what? but about you being a Doll Turner
Trish: first, i'm 500 years old in a 19 year old body, i deserve a rank higher than other tuners, like Miester or something, second, i want to help you since you mean a lot to me
Angela: *imagine kissing scene between them and blushes* thank you
Trish: why are you going red? you should know i can only fix Dolls, not humans

Offline pickedlastjake

  • Trained Member
  • *
  • Posts: 10
  • LV: 0
    • View Profile
Re: [XP] Flashlight System.
« Reply #4 on: December 07, 2012, 10:23:14 PM »
Bringing a dead forum post back to life, but I'm implementing the darkness script in this for my game, but having a timer is a big part of the game play. I'm trying to find a way that the darkness doesn't overlap everything on the screen, but I'm having trouble trying to come up with a way. (I'm fairly new to RGSS). Is there some way I can make it so this is more compatible with other picture based scripts?
Example:

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 740
  • LV: 29
    • View Profile
Re: [XP] Flashlight System.
« Reply #5 on: December 08, 2012, 02:59:48 AM »
I suppose it is possible if there are two images using alpha channes, to have the values of each alpha channel be added.  Over my head tho.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Flashlight System.
« Reply #6 on: December 08, 2012, 03:09:50 AM »
That's not needed. The Z Values in the scripts just need to be changed.

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 740
  • LV: 29
    • View Profile
Re: [XP] Flashlight System.
« Reply #7 on: December 08, 2012, 05:11:40 AM »
Hmm...

I missed something in that pic the first time.  It has the word "Time" in it, which looks like that is where his trouble is coming from, if I understood the post correctly.  I am guessing the word "Time" is being displayed from a Picture Event.  If that is the case, the Picture that displays the word "Time" has to have a higher number than the Picture that holds the Light and Shadow Effect.

---

I still think it might be interesting to see a "Blend" of shadows allowing for the illusion of Dynamic Light Sources.  Oh, and just to make sure those other pics dont run around with their own shadow, just need an alpha channel with no other data.  Could be an interesting script if anyone feels like taking a crack at it...
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3038
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Flashlight System.
« Reply #8 on: December 08, 2012, 08:25:32 AM »
Line 41 under "Darkness System"
Code: [Select]
@darknes = Sprite.new; @darknes.ox, @darknes.oy, @darknes.z = 624, 624, 999Change that 999 to a smaller value. Try 199 first and experiment from there.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline ThallionDarkshine

  • Ethereal Devastator
  • ****
  • Posts: 268
  • LV: 55
  • Gender: Male
    • View Profile
Re: [XP] Flashlight System.
« Reply #9 on: December 08, 2012, 02:19:38 PM »
@KK20 - Actually, that probably wouldn't work. The lower tiles on the map with high priorities would overlap the darkness. I think the smallest you can make the z value is 641, accounting for tiles with a priority of 5 on the bottom of the map.

@pickedlastjake - What you actually have to do is find whatever script you're using for that hud on the bottom of your screen in the picture, go into that, and change the z of the hud. If you'll post that script, then I'll find the right line to change for you.

Edit: Nevermind. The tilemap is in it's own viewport so it doesn't matter.
« Last Edit: December 08, 2012, 02:21:36 PM by ThallionDarkshine »

Offline pickedlastjake

  • Trained Member
  • *
  • Posts: 10
  • LV: 0
    • View Profile
Re: [XP] Flashlight System.
« Reply #10 on: December 13, 2012, 02:02:42 AM »
Line 41 under "Darkness System"
Code: [Select]
@darknes = Sprite.new; @darknes.ox, @darknes.oy, @darknes.z = 624, 624, 999Change that 999 to a smaller value. Try 199 first and experiment from there.

Worked perfectly, thanks! (And now I know how to look for (X,Y,Z) variables in RGSS. So double thanks!)