- Joined
- Aug 3, 2012
- Messages
- 23,808
- Reaction score
- 13,729
- First Language
- English
- Primarily Uses
- RMMZ
@caethyril Thank you very much. You've been really helpful as always.
RPG MAKER MV _ MZ Script Calls.xlsx
tab "map"$gameMap.eventsXy(x, y)
// Get an array of all events at (7, 8)
// $gameMap.eventsXy(7, 8)
Details Info:
Finally I want to get the.name()
and/or thenotetag
of this Event at (7, 8) ...
random moving Events on the map example CAT(s) and DOG(s)
if event.at(7, 8).name === "DOG" then ...
The data is, as it says, events. Game_Event Objects.// $gameMap.eventsXy(7, 8)[/CODE]
? What data are in this array ?
? How can I read this data out [Array to string(s)] ?
if ($gameMap.eventsXy(x, y).some(event => $dataMap.events()[event.eventId()].name=="DOG"))
Game_Event
objects, like Turan says.Game_Event
has an event
method to get its base event data, so you could use that instead (probably safer if you're using any event spawner/template plugins). E.g. Conditional Branch -> Script:$gameMap.eventsXy(x, y).some(e => e.event().name === "DOG")
$gameMap.eventsXy(x, y).map(e => e.event().name)
$gameMap.eventsXy(x, y).map(e => e.event().name)
map
method is JavaScript knowledge:for
loop.$dataEvent
" objects have various other properties like meta
and pages
. For details of the properties on database records you can check the Database sheet of this document:Game_Event
to the $dataEvent
is a little more complex. I guess I could properly document the actor, enemy, event, and troop "game -> database" methods, and consider adding some practical examples for calls that return an array.$gameMap.eventsXy(8, 12)
$gameMap.event(1).event()
or $dataMap.events[1]
.]View attachment 250719
How can I get this damageformula as a string
for example Skill 0001 form the database
into a javascript variable ?
Nafraju
$dataSkills[1].damage.formula
Ok, so how do I get the class ID into a variable as a number?It returns the class object. If I remember correctly, every class has an _id member variable.
actor.currentClass()
returns an entry from the $dataClasses
array. These are technically anonymous objects (parsed directly from JSON) but the Script Call List notes them as $dataClass
for convenience.$dataClasses[1]
id
, learnings
, expParams
, etc.$gameParty.members()[0].currentClass().id
Game_Actor
, e.g.$gameParty.members()[0]._classId
this.turnTowardCharacter($gamePlayer.followers().follower(0));
1
instead of 0
, etc. if(some condition){
$gameTemp.requestBalloon(this,5);
/*I want it to wait for 60 frames here*/
this.jump(DivX,DivY);
this.setMoveSpeed(4);
}
this.setWaitMode('balloon')
this._waitCount = 59
you can't, because wait doesn't work that way.but now I'm a little lost how I can force it to wait out the balloon animation.
$gameTemp.requestBalloon(this.character(this._characterId = 1), 4);
$gameTemp.requestBalloon(this,5);