I'm using the hidden choice plugin and it works great with switches, like
hide_choice(5, "$gameSwitches.value(23) === false")
but I would like to use self-switches too, to stop multiplying global switches. What would be the self switch equivalent of the bolded out piece?
Javascript for a self switch value?
● ARCHIVED · READ-ONLY
-
-
Same premise, just needs a bit more info -
$gameSelfSwitches.value([mapId, eventId, A-D])
So, you can check map 1, event 5, self switch B with -
$gameSelfSwitches.value([1, 5, 'B'])
Or, if you wanted to change the value through code -
$gameSelfSwitches.setValue([1, 5, 'B'], true) -
Works like a charm, thank you!
-
Hmm... found another one along these lines - what would be the javascript to check if the main character has a certain skill?
-
You can find documentation on that here, just search for learned/skill.
But this sounds like a totally different question than the title "Javascript for a self switch value?" right? -
True, my apologies.
-
to checking the actor has a specific skill, you can use this expection. Return value will be a boolean (true/false)
$gameActors.actor(actorId).hasSkill(skillId)
for example, the 1st actor has the skill whith the id 11:
$gameActors.actor(1).hasSkill(11)
the actorId and the skillId can be found in the database