collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: + [ Lock Screen ] +  (Gelesen 1513 mal)

woratana

  • Gast
+ [ Lock Screen ] +
« am: Juni 02, 2008, 04:51:41 »
Lock Screen
Version 1.0
by Woratana
Release Date: 02/06/2008


Introduction
Someone may know that my laptop AC adapter just broke, and it ran out of battery.
So I can't really do the big script or continue my Foxsuke project.
(I've backup the project, but it's not newest one)

However, I'm using other's laptop and installed RMVX. :P
That's why I have new script even though I can't use my laptop >_>.

This script will lock the screen from scroll when the switch that you choose turn ON.
I think this should be good for cut scene or something like that. :)

Enjoy~  :lol:


Screenshots
No need...


Script
Place it above main

#===============================================================
# ? [VX Snippet] ? Lock Screen ? ?
# * Lock/Unlock screen from scroll with switch~ *
#--------------------------------------------------------------
# ? by Woratana [woratana@hotmail.com]
# ? Thaiware RPG Maker Community
# ? Released on: 02/06/2008
# ? Version: 1.0
#--------------------------------------------------------------

#==================================================================
# ** HOW TO USE **
#-----------------------------------------------------------------
# * Set the switch ID you want to use to lock/unlock screen in SETUP part.
# * Turn that switch ON/OFF to LOCK/UNLOCK screen.
#==================================================================

class Game_Map
  #==========================================================
  # * [START] LOCK SCREEN SCRIPT SETUP
  #----------------------------------------------------------
  LOCK_SWITCH_ID = 1
  # Switch to LOCK/UNLOCK screen. (turn this switch ON to LOCK)
  #----------------------------------------------------------
  # * [END] LOCK SCREEN SCRIPT SETUP
  #==========================================================
  
  # List all the methods that use for scroll
  AM = [:scroll_up, :scroll_down, :scroll_left, :scroll_right]
  AM.each do |m|
    new_m = 'wora_lockscr_gammap' + m.to_s                # Create new name
    alias_method(new_m, m) unless method_defined?(new_m)  # Alias the method
                                                          # Create script
ascript = <<_SCRIPT_
def #{m} (*args)
  return if $game_switches[#{LOCK_SWITCH_ID}]
  #{new_m} (*args)
end
_SCRIPT_
    eval(ascript) # Run script
  end
end


Instruction
Just set the switch ID for lock screen in SETUP part in the script.

And in game, turn that switch ON when you want to lock screen. :D


Author's Notes
Free for use in your work if credit is included.


Bug Report?
Please give me these informations:
Zitat
- What is it says in error window?
- When is it get error? (Right after run game, when you choose something, etc.)
- Do you have any other scripts running in your game that may crash with this script?
« Letzte Änderung: Juni 02, 2008, 04:52:04 von woratana »

+ [ Lock Screen ] +

Dainreth

  • Gast
+ [ Lock Screen ] +
« Antwort #1 am: Juni 07, 2008, 16:56:13 »
Sounds good. Small script which can be useful for some people. I haven't test it yet because I think I didn't need it..although, thanks for scripting. Ah, and wora, hope that foxsuke goes on when you have the possibilty to keep it up!

+ [ Lock Screen ] +

woratana

  • Gast
+ [ Lock Screen ] +
« Antwort #2 am: Juni 08, 2008, 08:20:38 »
Thanks :D

I know that it's not something people really needs. :P

 


 Bild des Monats

rooftop party

Views: 3581
By: papilion

 Umfrage

  • Wer soll das BdM gewinnen?
  • Dot Kandidat 1
  • 3 (25%)
  • Dot Kandidat 2
  • 1 (8%)
  • Dot Kandidat 3
  • 2 (16%)
  • Dot Kandidat 4
  • 0 (0%)
  • Dot Kandidat 5
  • 6 (50%)
  • Stimmen insgesamt: 12
  • View Topic

 Schnellsuche





SimplePortal 2.3.3 © 2008-2010, SimplePortal