JavaScript questions that don't deserve their own thread

● ARCHIVED · READ-ONLY
Started by Shaz 3413 posts Page 12 of 171 View original ↗
  1. How do I temporarily print text on the screen? (just for debugging purposes)

    this is what i was trying to get to show up

    Code:
    action.subject().hit + Intensity + " - " + target.eva
  2. Why do you want to print it on the screen?

    Why don't you log it to the console with console.log(text_that_you_want_to_log)

    You can open the console on F8 in-game
  3. Is there a script call or way to increase the max level of a character mid game for rpg maker mv?
  4. KockaAdmiralac said:
    Why do you want to print it on the screen?

    Why don't you log it to the console with console.log(text_that_you_want_to_log)

    You can open the console on F8 in-game
    Thanks, I didn't know about that.
  5. What'd be a way to check a skill's user?

    I know it's "a" in a Damage Formula, but I'm wanting to check this on my Normal Attacks.

    So what's the JS to, if a skill's user is [Actor ID] or [Enemy ID], return those (And if Actor or Enemy if possible)]

    While I'd be using this with Yanfly's engine, it's nothing with his scripts beyond an "IF then" Statement.

     
  6. ragnorak6608No, you must overwrite Game_Actor.prototype.maxLevel, but that shouldn't be a pain.

    AirshipCanonFrom where do you want to check who is skill's user, and by that mean from which class and from which method or are you trying to do that from damage formula or script call?
  7. KockaAdmiralac said:
    No, you must overwrite Game_Actor.prototype.maxLevel, but that shouldn't be a pain.
     How you go about doing that?
  8. AirshipCanon said:
    What'd be a way to check a skill's user?

    I know it's "a" in a Damage Formula, but I'm wanting to check this on my Normal Attacks.

    So what's the JS to, if a skill's user is [Actor ID] or [Enemy ID], return those (And if Actor or Enemy if possible)]

    While I'd be using this with Yanfly's engine, it's nothing with his scripts beyond an "IF then" Statement.
    study these functions:

    Code:
    Game_Action.prototype.setSubject = function(subject) {    if (subject.isActor()) {        this._subjectActorId = subject.actorId();        this._subjectEnemyIndex = -1;    } else {        this._subjectEnemyIndex = subject.index();        this._subjectActorId = 0;    }};Game_Action.prototype.subject = function() {    if (this._subjectActorId > 0) {        return $gameActors.actor(this._subjectActorId);    } else {        return $gameTroop.members()[this._subjectEnemyIndex];    }};
  9. Does anyone know how to get a specific item window to appear only at the location of an item in the inventory?

    Essentially, i am trying to create name boxes for my items when they are selected, before they are prompted to use the item.

    I have it so they move to the item to select it, then when pressing 'ok' they are prompted to use the item.  I'm trying to get a name window to pop up over the item when the item is selected.

    I have the window all setup, I just don't know how to get its x and y values to correlate to the position of the item in the menu.

    Any help would be appreciated, been stuck on this for hours!
  10. TouchInput.x only updates while the mouse is held down.

    Is there a way to get the mouse position without clicking?
  11. Hey ^^ So I have this weird behaviour with one of my scripts where the parameters author description and all that all take  the star (*) from the next line as "input"? All other plugins I wrote behave normal...

    this is the header of the problem plugin.

    /*:* @author Zanazaru* @plugindesc Skip parts or all of the battle transition** @param turnOnFlash* @desc turns on flash(1 for on)* @default 0* * @help */what the problem looks like:



    what other plugins look like:



    any Ideas?
  12. Hello! Does anybody know a good plugin where you can upgrade skills per level? just like playing ragnarok online where you add skill point every time you level up... that's all..

    thanks.
  13. In the Game Over scene, I want to do a set of images before it goes to the title.

    How can I roll the gameover scene to repeat itself until the list of images are done rolling?

    Scene_Gameover.prototype.update = function() { if (this.isActive() && !this.isBusy() && this.isTriggered()) { this.gotoTitle(); } Scene_Base.prototype.update.call(this);};In the script we only have one image, so what if I want to roll 10 images before it goes to the title? How can I do it?
  14. does any one know what pixi is running on mv so i can figure out how to make the canvas for tetris?
  15. Under Window_ShopStatus.prototype.drawActorParamChange, I'd like to adjust it so that a different paramId is used for each individual actor.

    I thought this would work, but it has no effect. Does anyone know the proper way to check the actor and change the paramId?

    Code:
    Window_ShopStatus.prototype.drawActorParamChange = function(x, y, actor, item1) {    var width = this.contents.width - this.textPadding() - x;    var paramId = this.paramId();    if (this._actor === $gameActors.actor(2)) {    	var paramId = 3;    }    var change = this._item.params[paramId] - (item1 ? item1.params[paramId] : 0);    this.changeTextColor(this.paramchangeTextColor(change));    this.drawText((change > 0 ? '+' : '') + change, x, y, width, 'right');};
  16. Milena said:
    In the Game Over scene, I want to do a set of images before it goes to the title.

    How can I roll the gameover scene to repeat itself until the list of images are done rolling?

    Scene_Gameover.prototype.update = function() { if (this.isActive() && !this.isBusy() && this.isTriggered()) { this.gotoTitle(); } Scene_Base.prototype.update.call(this);};In the script we only have one image, so what if I want to roll 10 images before it goes to the title? How can I do it?
    What exactly do you want to achieve? Should the user have to press enter 10 times, before going back to title or do you want to have a slideshow of sorts? Long gameover screen usually aren't a good idea, because you want to keep the players in the game, not discourage them even more after a defeat ;)
  17. Iavra said:
    What exactly do you want to achieve? Should the user have to press enter 10 times, before going back to title or do you want to have a slideshow of sorts? Long gameover screen usually aren't a good idea, because you want to keep the players in the game, not discourage them even more after a defeat ;)
    Sorry for not explaining. Yes, I want to show it as a slide show of sort, so I also want to cast like a waiting time of 5 seconds for example, then another image comes in. If you press enter or the confirm button it all fades away and finishes, but if you're just there waiting, the slideshow continues. So I want to know how to achieve this, please?
  18. I can't find a good class item plugin.  I would like to find a plugin that makes it so certain items can only be used on certain actors or classes.
  19. TheGamedawg said:
    I can't find a good class item plugin.  I would like to find a plugin that makes it so certain items can only be used on certain actors or classes.
    I think this should help you http://forums.rpgmakerweb.com/index.php?/topic/50155-class-items/ .

    ---------------------

    I'm not sure if this needs its own thread or not but here goes. I was wondering if anyone could help me with a formula for a yanfly plugin.

    I'm using one of his tips and tricks to boost stats

    <Learn Cost: 500 JP>

    <Learn Cost Eval>

    user._paramPlus[0] += 300;

    user.forgetSkill(52);

    user.refresh();

    </Learn Cost Eval>

    I want to do it so that the jp cost increases everytime it is used. Either by a set amount or through percentage.

    He said I could do it with lunatic costs but I'm afraid I'm inexperienced with such things.

    Thanks in advance
  20. Myst Desdemona said:
    I want to do it so that the jp cost increases everytime it is used. Either by a set amount or through percentage.

    He said I could do it with lunatic costs but I'm afraid I'm inexperienced with such things.

    Thanks in advance
    The only way I can think of, is with the help of variables or even switches.

    I can't test it (currently not home) but you could try something like this with switches:

    <Learn Cost: 500 JP> // Your starting cost<Learn Cost Eval>user._paramPlus[0] += 300;user.forgetSkill(52);if($gameSwitches.value(1)) { // This checks if Switch 1 is ONskill.learnCostJp = Math.floor(skill.learnCostJp * 0.1); // The JP cost of this skill increases by 10% if Switch 1 is ON} else {$gameSwitches.setValue(1, true) // If Switch 1 is OFF, switch to ON.}</Learn Cost Eval>/* * If you learn the skill for the first time, Switch 1 should be OFF, so it will get turned to ON and the cost doesn't change. * The second time you learn that skill, Switch 1 should be ON and the cost increases by 10%. * BUT the cost will increase for any character that learns that skill after one learned it for the first time. */or with variables:

    <Learn Cost: 500 JP><Learn Cost Eval>user._paramPlus[0] += 300;user.forgetSkill(52);if($gameVariables.value(1) > 0) { skill.learnCostJp = Math.floor(skill.learnCostJp * 0.1); } else {$gameVariables.setValue(1, 1);}</Learn Cost Eval>/* * If you learn the skill for the first time, the Variable 1 should be zero, the cost doesn't change, * and the value of the Variable is set to one. * The next time someone learnes that skill, the Variable 1 should be greater than zero, and the cost * increases by 10%. * Again, the cost increases for everyone after the first time someone learned that skill. */Oh, and you don't need to use

    user.refresh();'cause the script does this two lines later anyway BD

    /EDIT:

    Fixed some "obvious" syntax errors :o