Probably a stupid question, but is it possible to get the length for variable?
For example, if I set variable 1 to "Charge" could run a code to return "6"?
I tried $gameVariables.Value(x).length but it didn't seem work. (obviously with X replacing the variable number)
JavaScript questions that don't deserve their own thread
● ARCHIVED · READ-ONLY
-
-
lowercase v in value.$gameVariables.Value(x).length
also "charge" would be 6 -
lowercase v in value.
also "charge" would be 6
Yes, the 5 was a typo.
Sorry.
It works now though, thanks -
@ATT_Turan oohhhh. i'm sorry, i forgot there were differences in js syntax between engines :kaoswt:
is there an mv alternative then? -
It's not that there are differences in JavaScript syntax - the actual code for the two games is different in portions.@ATT_Turan oohhhh. i'm sorry, i forgot there were differences in js syntax between engines :kaoswt:
is there an mv alternative then?
Code:Window.prototype._updateCursor = function() { var cursorOpacity = this.contentsOpacity; this._windowCursorSprite.alpha = cursorOpacity / 255; this._windowCursorSprite.visible = this.isOpen(); }; -
Is there a script call or somefin to change a specific map's tileset during a cutscene? I have variations of tilesets with different palettes, and I wanted to change the tileset briefly during a cutscene.
-
Is there a script call or somefin to change a specific map's tileset during a cutscene? I have variations of tilesets with different palettes, and I wanted to change the tileset briefly during a cutscene.
$gameMap.changeTileset(tilesetId);
In general I recommend this spreadsheet for figuring out what script calls are needed to replicate an event command.
Though if it's a cutscene, wouldn't it be easier to just use the "Change tileset" event command? -
Thank you so much! Yep, you are right, I forgot that command existed.
$gameMap.changeTileset(tilesetId);
In general I recommend this spreadsheet for figuring out what script calls are needed to replicate an event command.
Though if it's a cutscene, wouldn't it be easier to just use the "Change tileset" event command? -
ohh. tysm. i don't have much js knowledge; the only thing i could code is lua and even that's just barely.It's not that there are differences in JavaScript syntax - the actual code for the two games is different in portions.
Code:Window.prototype._updateCursor = function() { var cursorOpacity = this.contentsOpacity; this._windowCursorSprite.alpha = cursorOpacity / 255; this._windowCursorSprite.visible = this.isOpen(); }; -
Using yanflys plugins is there a way to make a skill that increases the number of hits based on how much tp they have for example if their tp is above 25 the skill hits 2 times if the their tp is above 50 skill hits 3 times basically an extra hit per 25 TP, is there a way to achieve this effect ?
-
use the action sequences plugin to add more action effects if the user has the tp
-
i wonder if there's a way to display the skill user's parameter in message boxes and skill descs. tried calling for actor 2's atk value and it doesn't seem to work ;w;
-
i use this plugin for that, but theres other plugins too that lets you run code to be eval'd within text boxes
-
Plus, for the given example, you only need to put the value into a variable then use the default escape code to display the variable.i use this plugin for that, but theres other plugins too that lets you run code to be eval'd within text boxes
-
How do I get the value of the full incoming damage of an attack to an actor before the damage is dealt? I'm trying to make equipment that reduces the damage to 0 if the damage is less than 20% of an actor's Max HP.
-
what are you trying to do?
you can grab incoming damage with Turan's eval tags or visustella's battle core, but without knowing what youre trying to do with it theres no knowing if theyll do what you want -
I want to reduce the incoming damage to 0 if the damage is less than 20% of an actor's Max HP.what are you trying to do?
you can grab incoming damage with Turan's eval tags or visustella's battle core, but without knowing what youre trying to do with it theres no knowing if theyll do what you want
What I'm trying right now is the notetag <JS Pre-Damage as Target> but I have no idea what object I have to get. -
huh. the VS battle core page doesnt mention it, but try using
Code:there should be a "value" variable that applies to the damage dealtif (value < target.mhp/5) value = 0; -
Didn't know it was this simple. Thanks for this!huh. the VS battle core page doesnt mention it, but try using
Code:there should be a "value" variable that applies to the damage dealtif (value < target.mhp/5) value = 0; -
Hello everyone,
im using VisuStella Battle Core and i wanted to include more damage mechanics in the common events related to every skill. Within a common event that is connceted to an enemy skill, i want to check is Switch 43 is true or not. For this i'd like to check if the target (an actor) hat a specific state (ID 39) and if yes, change Switch 43 to "on" before the damage appears. Im unsure if the enemy battler can even find a (single-)target out of my actors group during the "Pre-Apply" phase. Currently, the switch stays off no matter what and im looking for solutions.
This is the notetag of the skill.
Code:<Custom Action Sequence> <JS Pre-Apply> if (target.isStateAffected(39)) { $gameSwitches.setValue(43, true); } else { $gameSwitches.setValue(43, false); } </JS Pre-Apply>