Hello everyone, I've been trying to finish a key mechanic in my project and I am one step away from hopefully completing it and being done with it.
I am in need of a plugin or script that can command a vehicle to turn transparent ON and OFF on command, the transparent event command on page 2 only seems to apply to the party members on foot something I think MV has overlooked.
Alternatively I could easily change the vehicle graphic into nothing but I need to avoid that so that I do not clutter up my event pages/common events with several graphical changes over the course of the game.
If anyone can help me out here that would be extremely helpful!
That is a good question and could work in my game as well. Watching to find out the answer as well.
How do I properly use this script?
I just get an error "cannot read property 'setTransparent of null
Hmm, where are you using the script at? In a comment event, or?
Event and Common event use, it's all part of a map/room mechanic i've been trying to complete.
Hmm, could you take a screen shot of the event, or within the common event panel press CTRL+A to select all of the commands, and then Right-Click > 'Copy as Text' so you can paste the text of the event into a post.
Oh, I literally cut and pasted the script, I don't really know what difference a plugin call or script call makes.
The common events are there to garentee each button press results in the same but I could perhaps just combine it.
I was using just the 'change transparency' event command but that does not make the vehicle invisible when driven.
Been giving it tests but it seems to render the vehicle invisible when exiting it after doing map teleportation.
I think I would prefer the option to have a command made via script call or plugin command to handle this just for the sake of avoiding bugs, having it built in second hand into the engine seems to have a few unexpected faults rather than a plugin. I hope that isn't too much to ask 😮
It depends which version you use.
The first multi-line version I posted is a plugin, which (assuming it works - I didn't test it) will cause the game to set the vehicle transparent if you use a Change Transparency command while the player is in a vehicle.
The version Ossra posted, which I added to in my second post, is something that you would copy-paste into a Script Command node in your event. To make it visible again, you change true to false just as you guessed.
Sorry to report but I'm still getting the same results previously with both script calls made seperately.
Hmm ... that is rather strange. The javascript snippet "$gameMap.vehicle('boat').setTransparent(true);" really should work, if you want to turn the 'boat' vehicle transparent. "setTransparent(false)" should work to cause the vehicle to appear, too.
Are you using any plugins that might affect the player or vehicles? Are you using the 'Set Vehicle Location' command in a common event? If you transfer to another map and then come back, the transparency is probably going to be reset to the default value (true). Depending on what is going on, we can debug from there.
Why do you need a plugin to make the vehicle larger? The vehicle is a "character" so it should support arbitrary-sized sprites. Unless the issue is collision rather than just size..
My vehicle graphics are larger than the default 48x48 grid and needed a plugin to accommodate there size.