pipbrit

Villager
Member
Joined
Oct 1, 2015
Messages
14
Reaction score
1
First Language
English
Primarily Uses
Hello,
Hopefully I'm in the right place. I'm trying to use the Victory Aftermath Plugin and am trying to add in my own lines. I've added a new line, but can't figure out how to call a variable using the return function. I'm sure it's simple, I just can't figure out what it is.
Thanks!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,521
Reaction score
14,846
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.



YEP Victory Aftermath is also an MV plugin, not MZ.

So if you are using MZ you probably won't be able to use this plugin at all.

If you are using MV, please explain what exactly you're trying to do, because you don't "call" variables using any function. What is the new line you added, and where did you add it? Keep in mind if this is a paid plugin you will not be able to share its code.
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
797
Reaction score
642
First Language
English
Primarily Uses
RMMV
Basically 'return' ends your function, and hands out whatever the value is on that line.

if I have a function

Code:
myFunction = function (foo,bar)
{
return foo * bar;
}

then if I say

Code:
asdf = myFunction(3,6)

then asdf now equals 18

if I just said

Code:
myFunction(3,6)
it would multiply the numbers, but since nothing catches it it's kind of useless.

Since return ends the function, if I put in
Code:
myFunction = function (foo,bar)
{
return foo * bar;
doSomethingElse()
}
it would never get to the doSomethingElse(), since the return ends the function.

Does that make sense?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
1,159
Reaction score
636
First Language
English
Primarily Uses
RMMV
Also, not so pertinent to your question, but related to your title - RPG Maker MV and MZ are both driven by JavaScript, not Java. They're different languages.
 

Latest Threads

Latest Posts

Latest Profile Posts

For a long time I always consider XP soundtracks as the best one.
Just listened to some of MZ tracks from the free version.
It's... Quite mindblowing. xD
Only listened to the battles, towns, and fields.
But I'm sure the rest are equally good. :D
What do you guys want to see for the new Jump into Javascript? A continuation of the rpg_objects, or would you prefer a "lesson 0" where I go back to the absolute basics of Javascript and cover the fundamentals of the language and its construction?
Hey RPG members!!

How do you finish projects? Some new game developers start off strong but end up losing momentum. What keeps you motivated while working on new projects?
Feeling wee sleepy.. ZzzZ
So many threads to move to the right place. My post count is awesome, but 95% of it is due to moving things.

Forum statistics

Threads
112,452
Messages
1,068,376
Members
146,106
Latest member
sleymour
Top