RPG Maker MV / MZ Script Call List

● ARCHIVED · READ-ONLY
Started by Archeia 569 posts Page 9 of 29 View original ↗
  1. Archeia said:
    I don't understand this post. I rechecked to be sure but the 'fix'is the same.

    Hey, Archeia, it is $dataWeapons[n] or $dataArmors[n], not $database.


    item = $databaseWeapons[n] or $databaseArmors[n]
  2. Shinma said:
    Hey, Archeia, it is $dataWeapons[n] or $dataArmors[n], not $database.


    item = $databaseWeapons[n] or $databaseArmors[n]



    Oh I see. We derped there. OK will fix now :3
  3. Edit:


    Took nearly 3 days but I figured it out! Thanks anyway all...
  4. -snip-
  5. I couldn't find a script call to open the item menu (I need to make an item that uses a common event and then goes back to the menu...)


    (Is there a way to directly open the item menu through plugin commands?)
  6. What is it again the script call to check if the actor has the item in his/her inventory, and if he/she has it, he/she loose one of the item(s) he/she has in his/her inventory?
  7. if($gameParty._items[id]>0)  {


    $gameParty.gainItem($dataItems[id], -1);


    } {};



    Replace id with the number in your items database.  I'm guessing you're also going to want to do something else?  If so you'll want to write your code on the third line above...
  8. I'm creating a battle with two enemies (each of a different type) where I want different things to happen if the player tries to use the same ability on the different enemies. If you use an ability on one of the enemies, it will be turned to stone while the other is completely unaffected.


    I'm using Yanfly's action system to do this and it works for most things (even without the plugin, I'd want to know how to do this in script), except my issue is this...


    <setup action>


    if ____________________ <----(I've tried a bajillion things here...)


    {change switch 7: on}


    else


    {change switch 9: on}


    end


    </setup action>


    What's the correct call for assessing the target of the current ability? Is it done with the enemyindex? target.enemyid? etc.
  9. It's kind of cheesy, but I have a skill that applies an invisible state while launching a common event that reads like:


    for(var i = 0; i< $gameTroop.members().length; i++){


    if ($gameTroop.members().states().contains($dataStates[YourInvisibleStateIndex]) ) {


    }


    You could then check to see if that Troopmember is the right enemy type.
  10. Internetomancer said:
    It's kind of cheesy, but I have a skill that applies an invisible state while launching a common event that reads like:


    for(var i = 0; i< $gameTroop.members().length; i++){


    if ($gameTroop.members().states().contains($dataStates[YourInvisibleStateIndex]) ) {


    }


    You could then check to see if that Troopmember is the right enemy type.



    Hmm I may have to do that, though it would be ideal if I could just find the call that determined which enemy ID the ability was targeting...
  11. I'm trying to make the game keep track of the job points (I use Yanfly's job points script) of each member of my party and set up a condition that when they have a JP greater than or equal to 500 the switch turns on, but if they don't, the switch turns off. I've been trying this script call,  


    if ($gameParty.members()[0,1,2,3,4,5].jp >= 500) {$gameSwitches.value(1) === true} else {$gameSwitches.value(1) === false}


    and the game doesn't detect any errors and I can test play just fine, but the switch isn't turning on when the members have 500 JP, so I'm thinking my switch command is wrong. I know it's not that the game can't recognize job points because I've been able to add and subtract JP from my party many times, it's just that the switch I have set to turn on with that condition will not turn on. So could anyone tell me where I might be going wrong with my script call?
  12. Did you try using single equals signs?  


    I think, in JS, == and === are for testing a variable, not setting a variable.
  13. Internetomancer said:
    Did you try using single equals signs?  


    I think, in JS, == and === are for testing a variable, not setting a variable.

    That didn't work, but i figured out another completely different way to do what i wanted. Thanks though!
  14. Um... I found a mistake!


    It says

    Spoiler
    $game_player.center($game_player.x, $game_player.y)

    on the script call list but it doesn't work! It should say

    Spoiler
    $gamePlayer.center($gamePlayer.x, $gamePlayer.y)

    which works PERFECTLY!
  15. I haven't found a script in the list to store the actor ID of an action in battle. But I have found this (that's a VXAce CS):


    battle_info_user.id


    Will it work with MV call script? Probably the syntax is different, maybe something like: $battleInfoUser.id will work? I really don't know a thing about scripts syntax I'm just making a guess looking at the list.
  16. I made an account on this forum to ask this question thank you.
  17. Is it possible to access any plugin activity's variables? How do you go about doing that ? For example I want to check is an npc can see me - using YEP's EventChasePlayer
  18. Does any one know the script for checking if the down key is being pressed  I tried (Input.isPressed(down)) but i keep getting error input undefined.
  19. blurymind said:
    Is it possible to access any plugin activity's variables? How do you go about doing that ? For example I want to check is an npc can see me - using YEP's EventChasePlayer

    To answer your question, yes you can, though Yanfly does not support it.


    Using the "Script Call" box inside an event will allow you to use the this handle to reference the event itself, to check the variable, you have to know what the variable is called, like _chasePlayer. So, calling - for instance - a conditional branch with the Script Call this._chasePlayer will return true if the event is chasing the player.
  20. Hikitsune-Red said:
    To answer your question, yes you can, though Yanfly does not support it.


    Using the "Script Call" box inside an event will allow you to use the this handle to reference the event itself, to check the variable, you have to know what the variable is called, like _chasePlayer. So, calling - for instance - a conditional branch with the Script Call this._chasePlayer will return true if the event is chasing the player.

    Neither seem to do anything.


    When i try to print them with


     $gameMessage.add(this._chasePlayer)


    it says that they are undefined.


    My conditional branch uses this script line:  this._chasePlayer


    nothing happens when the enemy starts chasing me.