A good way to make an interrupt scene
#1
Hello im here to make a tip of an interrupt scene

What's an interrupt scene
Its an special scene than can be shown "inside" another scene (good to separate some thigs..., sometimes)

How can i make one?
It's not as hard as you can think, let me show how to make it.

First you need to add some variables in the scene you want to "insert" de scene.

example

Code:
class Your_Scene
def initialize
@interrupt_scene = nil
[more code]
end
end

Now the update part..
Code:
class Your_Scene
def update
if @interrupt_scene != nil
if @interrupt_scene.disposed?
@interrupt_scene = nil
else
@interrupt_scene.update
return
end
end
[more code]
end
end
And the last part: how to make the scene

Code:
class Your_new_scene
def initialize
@disposed = false
[your code]
end

def update
[your code]
end

def dispose
[your code]
end

def disposed?
return @disposed
end


end

And now the good part.
To call the scene:

@interrupt_scene = Your_scene.new
and to quit it. put in the scene:
@disposed = true

EXAMPLES FOR RPG MAKERS

[VX VERSION]
Content Hidden

[XP VERSION]

Content Hidden

to call the scene (on Scene_map in this example)

Put in an event as "insert script"

Code:
scene = Scene_Interrupt_Skill.new(0)
$scene.call_interrupt_scene(scene)


And that's all. see ya!
Reply }
#2
Sounds like its exactly what I've been looking for, but I don't really understand how this works, can you please make a short demo project showing an example interrupt scene if its not too much trouble?
Reply }
#3
It's just running another class' update method in place of the first class' update method.
In other words, it's using the current $scene's main method to update instead of having it's own main method.
Nothing special about it.
Reply }
#4
Ok i made an XP example and a VX example to call the Scene Skill on map
Remember, it's just an example you can make anything you want with this.
Reply }
#5
Thanks, I figured it all out :cheery: I'll be sure to credit you if I ever get this thing done
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   RPG Developer Bakin: Video Tutorial - How to make a Visual Novel JayRay 0 43 12-19-2024, 01:41 PM
Last Post: JayRay
   It's Good To Be Evil, Part 2: The Anti-Hero Kaos Tenshi 2 6,329 06-07-2010, 04:37 AM
Last Post: Kristovski
   Getting Good Character Names Angroth 0 3,972 01-20-2009, 07:10 AM
Last Post: Angroth
   It's Good To Be Evil Kaos Tenshi 0 3,445 01-20-2009, 06:41 AM
Last Post: Kaos Tenshi
   How to make interesting NPC's without scripting Third333Strike 0 3,879 12-06-2008, 04:59 PM
Last Post: Third333Strike



Users browsing this thread: 1 Guest(s)