RPG Maker MV / MZ Script Call List

● ARCHIVED · READ-ONLY
Started by Archeia 569 posts Page 10 of 29 View original ↗
  1. blurymind said:
    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.

    My apologies, I was generalizing a code I did not look into. I was actually speaking with a poor example (I had no idea that was an actual variable Yanfly used XP)


    In general, you can grab certain things such as the Event ID using code like that (try setting a variable using Script Call "this.eventId()"), as to whether or not you can grab it directly from an event, let alone variables added in by Plug-Ins is a mystery to me.
  2. see, nobody has cracked it yet. :)


    I wouldnt ask otherwise. @Yanfly does not want to give out any hints either 
  3. I have a work-around for you @blurymind:


    You are allowed to run a Common Event on sighting, so setup a Common Event that tells the event you want to stall to wait x frames (be sure to turn off Wait for Completion), tell the event to call that Common Event on sighting, and viola.


    (If you have any more questions, though, please start up a proper QA thread instead of derailing this one.)
  4. Knowing how to access variables in plugins would be a very valuable information. If anyone figures that out, I would be much thankful!

    Hikitsune-Red said:
    I have a work-around for you @blurymind:


    You are allowed to run a Common Event on sighting, so setup a Common Event that tells the event you want to stall to wait x frames (be sure to turn off Wait for Completion), tell the event to call that Common Event on sighting, and viola.


    (If you have any more questions, though, please start up a proper QA thread instead of derailing this one.)

    The workaround did not function as I wanted, as it ran in the middle of the chase - when the chase already began


    I want the guard to actually not move when seeing the player, and then start moving
  5. @blurymind It honestly depends on the plug in itself, so a generic solution is not going to exist. You may need to ask under plug in support for the specific plug in you wish to access the variable for. That way people can better help you.
  6. blurymind said:
    The workaround did not function as I wanted, as it ran in the middle of the chase - when the chase already began


    I want the guard to actually not move when seeing the player, and then start moving

    I did some digging and testing, Script Call this in a conditional branch:


    $gameMap.event(this.eventId())._chasePlayer


    And it should correctly grab your variable.


    However, this solution works exactly the same as the Common Event one in that it will still allow the event to take one step (only one) before executing the Conditional Branch code. This is functionality that Yanfly did not intend, and as such, will not function correctly.
  7. @Hikitsune-Red You are awesome! I can finally get more out of game maker vm's plugin system ! 


    Thank you thank you thank you
  8. I don't suppose you could tell me how to check if a certain actor's specific equipment slot is empty?
  9. TTKOZ said:
    I don't suppose you could tell me how to check if a certain actor's specific equipment slot is empty?

    Simple,
     


    From the list:

    [SIZE=100%]# Check for Name/ID of Player Equipment
    # ----------------------------------------------
    $game_actors[X].equips[Y].id unless $game_actors[X].equips[Y] == nil
    # Returns the ID of the equipment on actor X, equipped in slot Y

    $game_actors[X].equips[Y].name unless $game_actors[X].equips[Y] == nil
    # Returns the name of the equipment on actor X equipped in slot Y

    # NOTE: If using any scripts that give or take equipment slots, the #Y is the number of the character's slot
    # not the slot's number in the script. I.E. using Yanfly Equip Menu script - if your character has equipment
    # slots 6,7,8,15,15,32,75 available then $game_actors[1].equips[0].id would return the ID of the
    # item equipped in the slot defined as slot 6 in Yanfly script because it's the 1st equipment slot for the
    # specific character.[/SIZE]



    This means you can check " if $game_actors[X].equips[Y] == nil " which means that slot is empty.
  10. Hikitsune-Red said:
    Simple,
     


    From the list:


    This means you can check " if $game_actors[X].equips[Y] == nil " which means that slot is empty.

    Tried that didn't work


    This did though

    Code:
    $gameActors.actor(actor_id).equips()[slot_id] == null;
  11. Hello, I'm interested in:

    Control Variable > Game Data > Item (Possession Count)

    I have seen from the list that this script command is: 
    $gameVariables.setValue(var, value);

    What is the "value" for when you want to access Game Data > Item (Possession Count) ?
  12. Is this list complete? Because I'd like to make a check that every time a skill is used, a certain state gets 1 counter.
    However in this list I can't find anything that would check if a skill is used.
  13. Hello guys.


    I search for a scriptcall thats opens in battle a specific skill type window. 


    I want to use it for an overdrive system and the player should open the window only with a button. But i dont have the call for this :(


    Can someone help?
  14. Is it posiible to check for two switches at the same time?
    Like this, just with game switches?


    question.png
  15. I'm trying to get the max level a character can get via script. I'm trying the following but it returns me "99" as a somewhat default. Even if I select 15 for the actor #1.


    $gameActors.actor(1).maxLevel();


    And at the same time, I couldn't find anything to set the max level value by script.


    Thanks for any help!
  16. Martin said:
    Is it posiible to check for two switches at the same time?
    Like this, just with game switches?


    View attachment 45994



    @Martin Yes.


    ◆If:Script:$gameSwitches.value(switchIdA) && $gameSwitches.value(switchIdB)

    :End



    Mikuri said:
    I'm trying to get the max level a character can get via script. I'm trying the following but it returns me "99" as a somewhat default. Even if I select 15 for the actor #1.



    $gameActors.actor(1).maxLevel();


    And at the same time, I couldn't find anything to set the max level value by script.


    Thanks for any help!



    What you have there works fine for me. Are you saving the project after making the change to the max level? Are you using any plugins which set the default max level (Yanfly, etc)? You can also use $dataActors[actorId] to access and/or set the raw actor data.
  17. Thank you very much! :)
  18. Hello there,


    i tried to make a death state that adds one new state by removing the death state.


    The new state should be one of three states. Here is my "script" xD


    <Custom Remove Effect>
    if(1 === \v[1] && a.isActor()) { ###check if variable 1 is equal 1 and check if the battler is an actor
    a.addState(51); ### if true add state 51
    }
    if(2 === \v[1] && a.isActor()) { ###check if variable 1 is equal 2 and check if the battler is an actor
    a.addState(52); ### if true add state 52
    }
    else {
    a.addState(53); ## if variable 0 or something else than 1 or 2 than add state 53
    }

    </Custom Remove Effect>




    The Maker said Ilegal Token <-<


    Edit: Mabye someone knows the command to get variable 1 random between 0 and 2?


    Than i dont have to create the variable via common event.


    Thanks in advance
  19. @styx92: please make a new topic for your problem as that has absolutely nothing to do with this topic. This topic is about existing script functions in the engine that could be called to simulate event commands or other things. What you ask needs to go into its own topic in plugin support (with a link to the website of the plugin you're using to process your code as by default the maker won't handle that)