Author Topic: [XP] Heretic's Lightning  (Read 2191 times)

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 732
  • LV: 29
    • View Profile
[XP] Heretic's Lightning
« on: October 23, 2013, 11:08:49 AM »
Heretic's Lightning
Authors: Heretic
Version: 1.0
Type: Custom Lightning Flash
Key Term: Custom Environment System

Introduction

Using Change Screen Color Tone for Lightning Flashes can often lead to problems if you have another call to Change Screen Color Tone.  Typical when Transferring Maps.  This script provides a simplified solution.

Features

  • No "Stuck" Screen Bugs or Incorrect Fades that result from any use of Change Screen Color Tone for Lightning Flashes
  • Simulates a Lightning Flash with a Script call
  • Can be used as a Base Script for other more advanced Storm Scripts
  • Includes an easy way to Randomize Volume and Pitch for Thunder Sound Effects

Screenshots

No Screenshots.  The Game Screen lights up then goes back to dark.  Its Lightning!  What can I say?

Demo

No Demo.

Not entirely true.  Script does have a Demo, but the Demo contains a bunch of other scripts and hundreds of NPC's and many Maps.  Only one of those NPC's gives a Demo for the Lightning Flash effect.  Demo is my "Collection of 100% Compatible Scripts", and the NPC that provides the Demo is on the Beach Map where the Demo begins.

See my Signature for the Download Link of the "Collection Demo" at the bottom of this post.

Script

Place above Main.  Can go above everything except the Default Scripts and any other Scripts that fully redefine Game_Screen Initialize or Game_Screen Update.

(click to show/hide)

Instructions

In an Event Script, just run "lightning(30)" for a Lightning Flash that takes 30 Frames.

NOTES: If you make any calls to "Change Screen Color Tone", it takes precedence over Lightning and the Screen will fade properly.  That is what this script is intended to fix.  The script adds 6 Frames for the First Flash.  So if you put in 30 frames, it will take 36 Frames to complete.  You can mess with this if you'd like, or change the Tone that the Screen fades to, but some knowledge of scripting will be required.

This script also includes a call for "se_thunder(volume, pitch, file[optional])"

se_thunder was created to allow you to use a Variable when playing a Thunder Sound Effect instead of having to specify Numerically what the Volume and Pitch will be.  It also defaults to '061-Thunderclap01' when no "File" is specified.

In an Event Script, do this:
# Random Volume between 80 and 100
vol = rand(20) + 80
# Random Pitch between 50 and 150
pitch = rand(100) + 50
# Play Thunder Sound
se_thunder(vol, pitch)


Compatibility

I don't know of any scripts this wouldn't be compatible with.  Maybe seriously exotic stuff that completely redefines Game_Screen, but even then, it should be highly compatible

Credits and Thanks

  • Folders Coffee
  • Five Hour Energy
  • Totinos Pizza


Author's Notes

This script is mainly intended for people not too familiar with RMXP, or anyone else that has experienced a "Stuck Screen" glitch where using "Change Screen Color Tone" has ever caused their game to get "Stuck" on the bright part of a Lightning Flash.  Change Screen Color Tone isnt really intended for making Lightning Flashes due to the fact that multiple calls to Change Screen Color Tone are necessary to create that "Hollywood Lightning" type of flash.  When one is executed and another is not is what causes the Screen to get stuck.  This happens when Transferring Maps during a Lightning Flash.  It doesnt happen every time and can be difficult to diagnose the cause.

The "Style" of this script uses "Hollywood Lightning", where the screen will flash, immediatly go dark, then flash again with a slow fade to the original color.

Not sure about VX / Ace compatability as usual.  So expect a few revisions for forward compatability.
« Last Edit: January 14, 2014, 04:07:17 AM by Heretic86 »
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.)