Kyle's Snippet Zone
+3
moneymenace
omegas7
Kyle?
7 posters
OmegaDev :: Coding Plaza :: RGSS2 (VX)
Page 2 of 2
Page 2 of 2 • 1, 2
Re: Kyle's Snippet Zone
Oh look another error... Try removing "include KYLE" and instead put it below
- Code:
class Scene_Map < Scene_Base
Re: Kyle's Snippet Zone
Ok I'm so new to that methos I foudn out about it when you made my hud
Kyle?- Platinum Cookiez
- Posts : 500
Gald : 418
Stats
Cookies: 5
Re: Kyle's Snippet Zone
- Code:
module KYLE
SWITCH = 3
TRANSITION_NAME = "Battle Transition"
end
class Scene_Map < Scene_Base
include KYLE
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/Battle Transition", 80)
Graphics.freeze
end
end
end
Like this Omega? Because if so, then it still doesn't work.
moneymenace- Resource Moderator
- Posts : 538
Gald : 1337
Stats
Cookies: 0
Re: Kyle's Snippet Zone
The snippet could made do with an alias as well instead of an entire rewrite, and the == true isn't even needed. Here is a clean up code for ya.
- Code:
module KYLE
SWITCH = 1
TRANSITION = "BossBattleStart"
end
class Scene_Map
include KYLE
alias kyle_perform_battle_transition perform_battle_transition unless $@
def perform_battle_transition
if $game_switches[SWITCH]
Graphics.transition(80, "Graphics/System/" + TRANSITION, 80)
Graphics.freeze
else
kyle_perform_battle_transition
end
end
end
Jet- Newcomer
- Posts : 13
Gald : 91
Stats
Cookies: 0
Re: Kyle's Snippet Zone
Well I barely know what an alais doe's or how to use it
Kyle?- Platinum Cookiez
- Posts : 500
Gald : 418
Stats
Cookies: 5
Re: Kyle's Snippet Zone
Well, what do you know! You certainly know your stuff on scripting! Glad to have you on OmegaDev.
Good effort, Kyle?, I can't do what you guys do, so that's a big to me.
Good effort, Kyle?, I can't do what you guys do, so that's a big to me.
moneymenace- Resource Moderator
- Posts : 538
Gald : 1337
Stats
Cookies: 0
Re: Kyle's Snippet Zone
Trust me once you start scripting...
You learn something new everyday (Almost)
oh learning about alais...
Kinda know how to use em'
You learn something new everyday (Almost)
oh learning about alais...
Kinda know how to use em'
Kyle?- Platinum Cookiez
- Posts : 500
Gald : 418
Stats
Cookies: 5
Re: Kyle's Snippet Zone
The thing is, I don't know a thing on scripting with Ruby or RGSS2, so I just appreciate the help I can get from the people who can script. So thanks guys.
moneymenace- Resource Moderator
- Posts : 538
Gald : 1337
Stats
Cookies: 0
Re: Kyle's Snippet Zone
I may use the boss transition XD
Andinator- Student
- Posts : 100
Gald : 458
Stats
Cookies: 0
Re: Kyle's Snippet Zone
Just adding to what Jet said.
He said the == true isn't necessary.
This is because when using an if branch (or an unless, or a while etc.)
the if checks to see if what's on the right returns "true".
Badly explained. Sorry.
He said the == true isn't necessary.
This is because when using an if branch (or an unless, or a while etc.)
the if checks to see if what's on the right returns "true".
- Code:
variable = 4
if variable == 4 # variable == 4 returns 'true'
puts variable
end
Badly explained. Sorry.
IMP1- Coding Moderator
- Posts : 503
Gald : 1399
Stats
Cookies: 5
Page 2 of 2 • 1, 2
OmegaDev :: Coding Plaza :: RGSS2 (VX)
Page 2 of 2
Permissions in this forum:
You cannot reply to topics in this forum
|
|