Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Polraudio

Calling a scene?

Question

Ok so im completely confused with the new scripting. I know my way around JS very well but i dont know how to work with other peoples crap like calling a scene i made. In unity its very simple to do because i only have my own code to worry about.

 

Im trying to make the most barebone simple script possible that just does 1 thing so i can get my foot in the door.

 

I know in the past you would do something like

$scene = Scene_Test

but it doesn't seem to be that simple anymore.

 

This is the test script im trying to run.

//=============================================================================
// Test.js
//=============================================================================

/*:
 * @plugindesc For testing
 * @author Polraudio
 *
 * @help This is for testing
 */
function Scene_Test() {
	$gameParty.gainGold(7000);
}

If anyone knows how i can call this simple script via event callscript please let me know and thanks :).

Im probably missing something since its been a very very long time since i ever touched something thats like RGSS.

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

I think it was $name_of_scene = scene.new in rmxp, but somehow I doubt that'll work.

 

edit: I had that backwards, it's $scene = name_of_scene.new

Share this post


Link to post
Share on other sites
  • 0

to open the other scripts which were included with the engine in the common events it was "Plugin Command: EnemyBook open", but i'm not suure how to open it from another scene like menu or something.

 

my suggestion is look into the menu script and see how they called the item scene.

Share this post


Link to post
Share on other sites
  • 0

Ok so im completely confused with the new scripting. I know my way around JS very well but i dont know how to work with other peoples crap like calling a scene i made. In unity its very simple to do because i only have my own code to worry about.

 

Im trying to make the most barebone simple script possible that just does 1 thing so i can get my foot in the door.

 

I know in the past you would do something like

$scene = Scene_Test
but it doesn't seem to be that simple anymore.

 

This is the test script im trying to run.

//=============================================================================
// Test.js
//=============================================================================

/*:
 * @plugindesc For testing
 * @author Polraudio
 *
 * @help This is for testing
 */
function Scene_Test() {
	$gameParty.gainGold(7000);
}
If anyone knows how i can call this simple script via event callscript please let me know and thanks :).

Im probably missing something since its been a very very long time since i ever touched something thats like RGSS.

 

 

Javascript is quite different to RGSS :)

I believe your particular code is creating a function in the main execution context (Something you probably wouldn't normally do with plugins).

 

But you could run it with the script command:

Scene_Test();
The brackets after the function name is how you execute functions in Javascript.

I recommend looking at plugins others have created as a good place to see how people do things differently :)

 

Calling an actual scene in MV is done by using:

SceneManager.push(Scene_Name);
But that requires more coding to set the scene up. Edited by Galv

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...