That's not really a JavaScript question... but well, if your save points are events, you can add a choice command which then asks them if they want to save or use tent, if they choose use tent, then you check if they have the item, then do whatever the tent does then reduce it's amount by 1
There is a plugin requests forum if you want a plugin to do it. This thread is for 'simple' questions that might have just a couple of lines of code to solve them.
Does anyone know if there's a javascript command that can alter the opacity of a battler in the battle scene? I kind of need invisible enemies that the player can interact with, so using the Appear Halfway thing isn't really an option for me.
You could just make your sprites semi-transparent.
Well, you didn't indicate if you want the same enemy to always be 'invisible' or sometimes 'invisible' and sometimes not. If you want them to always be 'invisble' (not really invisible, but semi-transparent) then creating the sprite that way is the best way to go, as you're not doing extra processing at runtime.
mmm - what do you mean by 'invisible' - REALLY invisible? How does the player know they can interact with them? Try just not giving the enemy a battler sprite at all.
You could have one opaque and one semi-transparent version, set them both up as enemies with the same stats, and use the Enemy Transform command to switch between them.
You MIGHT be able to call battler.setOpacity(n) but then you have to get the right battler object.
If you want the player to be able to use a skill on an enemy, and then for the enemy to become visible, you could make it part of the damage formula of the skill. Just put b.setOpacity(255) into the damage formula (if there's also damage from the skill, put a ; followed by the actual damage formula after it). This will make the target of the skill change opacity. In that case, the target is the 'correct battler object'.
If it targets the user, you could still use b instead of a. I don't see anything wrong with that command - are you using it in battle or outside of battle via the menu? Again, I don't think that really matters. A screenshot of the console to provide full error details would be helpful, as well as a screenshot of the skill (and this is probably now beyond 'questions that don't deserve their own thread').
I do know that people have trouble trying to do changes to battlers during a battle, that they don't always actually change. And the engine itself might manipulate the opacity, so even if you didn't get an error, it might not work still. But it shouldn't give you an error message.
Edit: actually, setOpacity is a Game_CharacterBase method, which affects your sprites on the map, not battlers, and the battler sprite doesn't get its information from the character for this value. Looking through the battler sprites, there is no method to change opacity, and the engine itself does manipulate opacity a lot, so the above script call (even if you could do it for a battler) is not going to work.
You will either need to have a plugin written, or go for a non-plugin solution, and you already have a couple of those.
Hello there,
pretty new here, so sorry in advance if I'm using the wrong thread.
Here's my "problem":
I'm using yanflys core engine plugin. I know that within the plugin manager I am able to change the opacity for all my message windows. But I need a way to somehow change the opacity with an event "on the fly" since I don't want the change to be permanent throughout the whole game.
The reason for this is pretty simple. For the message windows during conversations I want to use a custom textbox image instead of the default maker windows. I know, I could simply make each message window transparent and that works completely fine. But it's a bit annoying to go through that dropdown menu on every single Show Text command in every conversation. It would be easier to reduce the window opacity in the same common event that shows the textbox image and then raise it again after the conversation, so my menus will still be visible.
tl;dr: I'm just asking for this for the sake of convenience.
Is there a command to achieve this in any way?
Thanks 🙂
Can someone help me fix this:
if(Input.keyTriggered("up") || Input.keyPressed("up")){
$gamePlayer.setTransparent(flag);
};
What I need this to do is to, regardless of if the up key is pressed or triggered (in both instances), I need the player to be switched to transparent. This gives me a script call error. I tried to set it up myself though. 🙂