Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

MV Script Calls

David FoxFire

Adventurer
Xy$
0.00
Are the variables the same? There are parts in my script where I need to call up a player's level for some math, for example. Or access a Switch or a Variable.
 

David FoxFire

Adventurer
Xy$
0.00
You may take a look at the line 17 if it can help. At least I hope it does ^^"
That works. But what I'd like to do is to call up a certain player's level and assign it to a variable, or use it as a condition. Like this:

LevelAlpha = $gameActors.actor(actorId)....... What's the rest of that?
 
That works. But what I'd like to do is to call up a certain player's level and assign it to a variable, or use it as a condition. Like this:

LevelAlpha = $gameActors.actor(actorId)....... What's the rest of that?
It'd help to have a basic idea of what the condition you have in mind was to help..
but to set it as a variable is easy youve done that , and as a condition is just as easy

exp.

levelActor1 = $gameActors.actor(exampleid);
levelActor2 = $gameActors.actor(exampleid);
playerLevel = $gameActors.actor(exampleid).Level(0);

if (playerLevel == 20) // or whatever else youre attempting to do here {
$gameActors.actor(exampleid).learnSkill(Fireblast); // first example that came to mind not even sure if its the proper syntax
// havent had time to actually get into MV scripting / plugging just yet
}

hope this can help give ya an idea

------------------------
 

David FoxFire

Adventurer
Xy$
0.00
It'd help to have a basic idea of what the condition you have in mind was to help..
but to set it as a variable is easy youve done that , and as a condition is just as easy

exp.

levelActor1 = $gameActors.actor(exampleid);
levelActor2 = $gameActors.actor(exampleid);
playerLevel = $gameActors.actor(exampleid).Level(0);

if (playerLevel == 20) // or whatever else youre attempting to do here {
$gameActors.actor(exampleid).learnSkill(Fireblast); // first example that came to mind not even sure if its the proper syntax
// havent had time to actually get into MV scripting / plugging just yet
}

hope this can help give ya an idea

That's basically what I wanted to know. I wanted to have a sort of bonus to checks that increases every 8th level. Like this:

proficiencyBonus = 1 + parseInt($gameActors.actor(PLAYERID).Level(0) / 8);

If "$gameActors.actor(PLAYERID).Level(0)" is the thing I needed then I understand what you're talking about.
[doublepost=1445719499,1445660237][/doublepost]There's also the need to call a switch or a variable on the script, so would this work:

if ($gameSwitches[1]) {} // if Switch 1 is true then....

and

var itemOne = $gameVariables[2]; // itemOne = Variable 2


EDIT: Thank Goodness that the Forum Program takes an unintended double posts and turns it into an ammendment to the above post. Pardon my faux pas.
 

PAC918

Towns Guard
Code:
Show Balloon Icon    
character.requestBalloon(id); this.setWaitMode('balloon');   
 For character: $gamePlayer; $gameMap.event(ID);
Can I use this in Set Movement Route for an event? If so, how? I'm lost. I tried multiple variations but nothing seemed work.
 

eivl

Local Hero
Xy$
0.00
Code:
Show Balloon Icon   
character.requestBalloon(id); this.setWaitMode('balloon');  
For character: $gamePlayer; $gameMap.event(ID);
Can I use this in Set Movement Route for an event? If so, how? I'm lost. I tried multiple variations but nothing seemed work.
Ill try it out later and rapport back
 

David FoxFire

Adventurer
Xy$
0.00
Found one of my answers while looking at scripts: $gameVariables[2] in Ruby becomes $gameVariables.value(N) (N being the Variable Number in the Editor) in Javascript. Correct me if I'm wrong.

Now to find out if $gameSwitches.value(N) works as well.
 

David FoxFire

Adventurer
Xy$
0.00
Thanks. That's what I wanted to know :)

I still need work on my script, which I posted here so that I won't bog the whole forum down just becuase I'm needy :p I also updated it by editing the original post because I'm a nice guy.
 
Last edited:
Top