Kyle's Snippet Zone
+3
moneymenace
omegas7
Kyle?
7 posters
OmegaDev :: Coding Plaza :: RGSS2 (VX)
Page 1 of 2
Page 1 of 2 • 1, 2
Kyle's Snippet Zone
Well Well I'm a kinda scripter newbish really so I make edits and snippets!
Snippet #1 - Random Transition (Credit to Guyver bane for base of script)
Snippet 2# - Boss Transition (BETA):
Snipper 3# - Male Or Female V0.3 BETA (Credit to Omegas for Helping me ages ago
Snippet #1 - Random Transition (Credit to Guyver bane for base of script)
- Spoiler:
- Code:
class Scene_Map < Scene_Base
def perform_battle_transition
@sprite = Sprite.new
case rand(3)
when 0; @sprite.bitmap = Graphics.transition(80, "Graphics/System/BattleStart", 80)
when 1; @sprite.bitmap = Graphics.transition(80, "Graphics/System/BattleStart2", 80)
when 2; @sprite.bitmap = Graphics.transition(80, "Graphics/System/BattleStart3", 80)
end
end
end
Snippet 2# - Boss Transition (BETA):
- Spoiler:
- Code:
module KYLE
SWITCH = 1
TRANSITION_NAME = "BossStart"
end
include KYLE
class Scene_Map < Scene_Base
def perform_battle_transition
if $game_switches[KYLE::SWITCH] == true
Graphics.transition(80, "Graphics/System/" + TRANSITION_NAME, 80)
Graphics.freeze
else
Graphics.transition(80, "Graphics/System/BattleStart", 80)
Graphics.freeze
end
end
end
Snipper 3# - Male Or Female V0.3 BETA (Credit to Omegas for Helping me ages ago
- Spoiler:
- Code:
#===============================================================================
#Kyle?/Kinghack's Male Or Female
#Version 0.3 BETA
#Date: 08/03/2010
#Time: 1:18
#
#Credits
#Omegas7 - Code Support
#
#
#Key:
#x = Varaible Number
#
# * How To Use *
#Turn This On in your intro or opening to activate AFTER! you turn the switch on
# Name.execute
#
#If switch 1 is on put \v[x] in text and it show's up as He, His, Him, He'd or Sir
#
#If switch 2 is on put \v[x] in text and it show's up as She, She's, Her, She'd
#or Ma'am
#
#
#
#===============================================================================
#------#
#Custom#
#------#
#======Switches======#
MALE_SWITCH = 1
FEMALE_SWITCH = 2
#==Variables Male====#
VARI_MALE_1 = 1
VARI_MALE_2 = 2
VARI_MALE_3 = 3
VARI_MALE_4 = 4
VARI_MALE_5 = 5
#==Variabes Female===#
VARI_FE_1 = 1
VARI_FE_2 = 2
VARI_FE_3 = 3
VARI_FE_4 = 4
VARI_FE_5 = 5
#===Speech Male======#
MALE_SPEAK_1 = "He"
MALE_SPEAK_2 = "His"
MALE_SPEAK_3 = "Him"
MALE_SPEAK_4 = "He'd"
MALE_SPEAK_5 = "Sir"
#------#
#Script#
#------#
class Name
def self.execute
if $game_switches[MALE_SWITCH]
$game_variables[VARI_MALE_1] = MALE_SPEAK_1
$game_variables[VARI_MALE_2] = MALE_SPEAK_2
$game_variables[VARI_MALE_3] = MALE_SPEAK_3
$game_variables[VARI_MALE_4] = MALE_SPEAK_4
$game_variables[VARI_MALE_5] = MALE_SPEAK_5
end
if $game_switches[FEMALE_SWITCH]
$game_variables[VARI_FE_1] = "She"
$game_variables[VARI_FE_2] = "She's"
$game_variables[VARI_FE_3] = "Her"
$game_variables[VARI_FE_4] = "She'd"
$game_variables[VARI_FE_5] = "Ma'am"
end
end
end
Last edited by Kyle? on Thu May 06, 2010 1:09 am; edited 6 times in total
Kyle?- Platinum Cookiez
- Posts : 500
Gald : 418
Stats
Cookies: 5
Re: Kyle's Snippet Zone
For the random transition snippet, I'd recommend letting the user input his/her own trasition names in an array:
So the user won't have to add cases when adding a new transition graphic
Good luck with yer snippets.
- Spoiler:
- Code:
class Scene_Map < Scene_Base
def perform_battle_transition
transitions = ['BattleStart','BattleStart2','BattleStart3'] # <--- Put all your transitions here.
@sprite = Sprite.new
@sprite.bitmap = Graphics.transition(80, "Graphics/System/" + transitions[rand(transitions.size)], 80)
end
end
So the user won't have to add cases when adding a new transition graphic
Good luck with yer snippets.
Re: Kyle's Snippet Zone
Can you make one where it doesn't make the transitions random but lets the creator choose? That way if I wanted a boss battle, I could use a special transition rather than a normal small battle transition.
moneymenace- Resource Moderator
- Posts : 538
Gald : 1337
Stats
Cookies: 0
Re: Kyle's Snippet Zone
Thanks and they kinda could but need some knowledge of how the transitions go and rand method just needs to change to how many like "rand(55)" but thanks for the pointer I'm mainly good at Size edit's in fact I'm making my own menu systemOmegas7 wrote:For the random transition snippet, I'd recommend letting the user input his/her own trasition names in an array:
- Spoiler:
- Code:
class Scene_Map < Scene_Base
def perform_battle_transition
transitions = ['BattleStart','BattleStart2','BattleStart3'] # <--- Put all your transitions here.
@sprite = Sprite.new
@sprite.bitmap = Graphics.transition(80, "Graphics/System/" + transitions[rand(transitions.size)], 80)
end
end
So the user won't have to add cases when adding a new transition graphic
Good luck with yer snippets.
It's going to be a bit customisable
Hmm... I'll try to see what I can do with thismoneymenace wrote:Can you make one where it doesn't make the transitions random but lets the creator choose? That way if I wanted a boss battle, I could use a special transition rather than a normal small battle transition.
Maybe a switch so if your desired switch is on then it will use a transition of your choice?
EDIT:
Finished it money
Kyle?- Platinum Cookiez
- Posts : 500
Gald : 418
Stats
Cookies: 5
Re: Kyle's Snippet Zone
Cool thanks! I'm going to test it out now, I'll tell you if it works for me in a second.
moneymenace- Resource Moderator
- Posts : 538
Gald : 1337
Stats
Cookies: 0
Re: Kyle's Snippet Zone
No, it doesn't work. I get a SyntaxError in line 13 before the title screen shows up.
moneymenace- Resource Moderator
- Posts : 538
Gald : 1337
Stats
Cookies: 0
Re: Kyle's Snippet Zone
How about this tested it worked on the title screen
- Code:
module KYLE
SWITCH = 1
TRANSITION_NAME = "BossStart"
end
def perform_battle_transition
if $game_switches[SWITCH]
Graphics.transition(80, "Graphics/System/" + TRANSITION_NAME, 80)
else
Graphics.transition(80, "Graphics/System/BattleStart", 80)
end
end
Kyle?- Platinum Cookiez
- Posts : 500
Gald : 418
Stats
Cookies: 5
Re: Kyle's Snippet Zone
If I may, can I request a script for smoother bgm transition during map transition? like say fadeout is 120 frames and bgm play is 60 frames (so it starts when the first bgm is half way faded out)
Andinator- Student
- Posts : 100
Gald : 458
Stats
Cookies: 0
Re: Kyle's Snippet Zone
Well I'm not really taking requests...
I took Moneys cause I thought it be preety easy...
But I think I can make this
may need help but I found the area
for transfer so I might make this in the end!
So I'll take it on
but remember not really taking requests just easy ones!
I took Moneys cause I thought it be preety easy...
But I think I can make this
may need help but I found the area
for transfer so I might make this in the end!
So I'll take it on
but remember not really taking requests just easy ones!
Kyle?- Platinum Cookiez
- Posts : 500
Gald : 418
Stats
Cookies: 5
Re: Kyle's Snippet Zone
Alright I tried it and am getting the exact same result with the Syntax Error in Line 13 before the title screen starts.
I modified the name and switch trigger to fit my parameters.
I modified the name and switch trigger to fit my parameters.
- Code:
module KYLE
SWITCH = 3
TRANSITION_NAME = "Boss Transition"
end
def perform_battle_transition
if $game_switches[SWITCH]
Graphics.transition(80, "Graphics/System/" + TRANSITION_NAME, 80)
else
Graphics.transition(80, "Graphics/System/Battle Transition", 80)
end
moneymenace- Resource Moderator
- Posts : 538
Gald : 1337
Stats
Cookies: 0
Re: Kyle's Snippet Zone
Look's like you have deleted or didn't copy the
last end
After the normal transition there shoud be two
last end
After the normal transition there shoud be two
Kyle?- Platinum Cookiez
- Posts : 500
Gald : 418
Stats
Cookies: 5
Re: Kyle's Snippet Zone
Alright, that did it. But the script didn't do anything...
I placed the right name on the transition that I wanted.
I turned on switch 3 as it said. And I didn't change the script any further except for that one end.
By the way, if this is a bother to you... you don't have to do this, it's just that small extra thing that could make my game better.
I placed the right name on the transition that I wanted.
I turned on switch 3 as it said. And I didn't change the script any further except for that one end.
By the way, if this is a bother to you... you don't have to do this, it's just that small extra thing that could make my game better.
moneymenace- Resource Moderator
- Posts : 538
Gald : 1337
Stats
Cookies: 0
Re: Kyle's Snippet Zone
Solved forgot to add the class O.o stupid me
Here:
Here:
- Spoiler:
- Code:
module KYLE
SWITCH = 1
TRANSITION_NAME = "BossStart"
end
include KYLE
class Scene_Map < Scene_Base
def perform_battle_transition
if $game_switches[KYLE::SWITCH] = true
Graphics.transition(80, "Graphics/System/" + TRANSITION_NAME, 80)
Graphics.freeze
else
Graphics.transition(80, "Graphics/System/BattleStart", 80)
Graphics.freeze
end
end
end
Kyle?- Platinum Cookiez
- Posts : 500
Gald : 418
Stats
Cookies: 5
Re: Kyle's Snippet Zone
Update:
Added a 3rd snippet
Omegas7 might remember this script...
Added a 3rd snippet
Omegas7 might remember this script...
Kyle?- Platinum Cookiez
- Posts : 500
Gald : 418
Stats
Cookies: 5
Re: Kyle's Snippet Zone
. Remember to use script call
- Code:
Name.execute
Re: Kyle's Snippet Zone
Alright, cool, it transitions. But, for some reason it turns on the call switch by itself. I don't have any event doing that. After every battle I check the F9 function, and I see that the call switch (Switch 3) was automatically turned on... then I turn it off, go into the battle, win, then check again it's on again.
So basically it just permanently stays on the new transition, rather than the original.
So basically it just permanently stays on the new transition, rather than the original.
moneymenace- Resource Moderator
- Posts : 538
Gald : 1337
Stats
Cookies: 0
Re: Kyle's Snippet Zone
moneymenace wrote:Alright, cool, it transitions. But, for some reason it turns on the call switch by itself. I don't have any event doing that. After every battle I check the F9 function, and I see that the call switch (Switch 3) was automatically turned on... then I turn it off, go into the battle, win, then check again it's on again.
So basically it just permanently stays on the new transition, rather than the original.
There is a small error in the script. Find the line
- Code:
if $game_switches[KYLE::SWITCH] = true
- Code:
if $game_switches[KYLE::SWITCH] == true
Re: Kyle's Snippet Zone
Wow, these are great, Kyle?! Gonna try them and maybe use them in my games!
Oh, just what does the Male or Female script do?
Is it basically letting you be a Male or Female?
Oh, just what does the Male or Female script do?
Is it basically letting you be a Male or Female?
Re: Kyle's Snippet Zone
dezz123 wrote:Oh, just what does the Male or Female script do?
Is it basically letting you be a Male or Female?
Ever had a game where the player can choose to be male or female? When an NPC talks to the player, you have to check if the player is male or female His sword or Her sword. It is quite annoying to create two different message windows just for that. The script will store words depending on the gender on some variables for you to use in one single window...
Re: Kyle's Snippet Zone
i guess, but I really wouldn't mind eventing it since I could get some more personalization out of it...
Andinator- Student
- Posts : 100
Gald : 458
Stats
Cookies: 0
Re: Kyle's Snippet Zone
Woah...:O
That's cool. Imma be using that for my next game. Great job, Kyle? (and Omegas7 for helping)!
I'll try it out.
That's cool. Imma be using that for my next game. Great job, Kyle? (and Omegas7 for helping)!
I'll try it out.
Re: Kyle's Snippet Zone
Thanks Omega, I will be able to test out the change when I get access to my other computer.
moneymenace- Resource Moderator
- Posts : 538
Gald : 1337
Stats
Cookies: 0
Re: Kyle's Snippet Zone
It's in the instructions thoughOmegas7 wrote:. Remember to use script callafter turning the desired switches .
- Code:
Name.execute
Updated it know Omegas Loz I always do thatOmegas7 wrote:Don't use debug try eventing itmoneymenace wrote:Alright, cool, it transitions. But, for some reason it turns on the call switch by itself. I don't have any event doing that. After every battle I check the F9 function, and I see that the call switch (Switch 3) was automatically turned on... then I turn it off, go into the battle, win, then check again it's on again.
So basically it just permanently stays on the new transition, rather than the original.
There is a small error in the script. Find the lineAnd replace with
- Code:
if $game_switches[KYLE::SWITCH] = true
- Code:
if $game_switches[KYLE::SWITCH] == true
Kyle?- Platinum Cookiez
- Posts : 500
Gald : 418
Stats
Cookies: 5
Re: Kyle's Snippet Zone
New problem, (don't you love them).
The boss transition will take the place of the default battle transition no matter if the switch is on or off.
The boss transition will take the place of the default battle transition no matter if the switch is on or off.
moneymenace- Resource Moderator
- Posts : 538
Gald : 1337
Stats
Cookies: 0
Page 1 of 2 • 1, 2
OmegaDev :: Coding Plaza :: RGSS2 (VX)
Page 1 of 2
Permissions in this forum:
You cannot reply to topics in this forum
|
|