MV How can I change LandVehicle plugin On/Off by Karberus

Hello!
I have a big problem with Javascript.
I found this JS from Karberus
The problem is:
- How to edit it and add an option (Turn plugin ON/OFF)
On the first map I need normal boat, but on the 2nd map I need a car(as a boat) for land.
So on the first map plugin must be OFF but on other map ON.
I need plugin commands I guess.
I use Switch 17 (Switch ID: 17)
How to do this? Anybody?


LINK to script:-> LINK <-
you could make the title more in a meaningfull:
"How can I change LandVehicle plugin On/Off by karberus"

but to answer your question.

set on top below function() {.....

if ($gameSwitches.value(40) { //change 40 to your own switch ID

on the botton but above })() you set } and that should do the trick for you.

next time, link to the plugin is better.
as there are also other approach to it, to see if a switch is ON to use the car,
and when off, use the boat.

I think you could even use both options (boat and car).
It didn't work or I put this in the wrong place...
Take a look on this: (I use switch 17)

I turn switch 17 ON/OFF in game, nothing happens... 🙁

PS: I do all that you want ShadowDragon, now my post look better.
I hope I get a solution soon 🙂
you should "LINK" the plugin, not copy paste as it might be against the terms,

but if you want a cleaner way for custom behicle on land and still uses the boat,
look into this plugin [VictorEngine Custom Vehicles] it require its core, but you
can create more than 3 vehicles besides the 3 you already have.

you can make more land vehicles and more ships, boats etc if required.

the simple vehicle plugin you have now should still be able to use the boat
and land vehicle, but it require scriptcalls in order to do so and reqion idea,
as the helpfile is a bit on low information (as it checks if its a boat, otherwise
land vehicle.

I believe CGMV might have a vehicle plugin too and DK, but I need to look
for those what the names exactly are.
you should "LINK" the plugin, not copy paste as it might be against the terms,

but if you want a cleaner way for custom behicle on land and still uses the boat,
look into this plugin [VictorEngine Custom Vehicles] it require its core, but you
can create more than 3 vehicles besides the 3 you already have.

you can make more land vehicles and more ships, boats etc if required.

the simple vehicle plugin you have now should still be able to use the boat
and land vehicle, but it require scriptcalls in order to do so and reqion idea,
as the helpfile is a bit on low information (as it checks if its a boat, otherwise
land vehicle.

I believe CGMV might have a vehicle plugin too and DK, but I need to look
for those what the names exactly are.
Thank you for reply. VictorEngine and Vehicles are way much to much complicated for me. I tryrd it out, but it hit so much javascript errors and I have no javascript knowlage for this. I need just one car vehicle, no 3 or more. The problem is, that normal boat is needed in the map so the car vehicle too. My character has costume (randomize) sprites, that's way I can't do the trick with player (change character graphic). It's not an option to save player graphic and load in an event. That's way I need a boat as a car. But boat as a boat too. Switch 17 do not work and I try to learn from script how to add this option to plugin for "plugin command". It's not easy for me, because I have no javascritp knowlage at all. If someon know how or what scritp can help me is more then welcome. From programming I know only old Turbo Pascal; Free Pascal now.

Thank for your time.

My project is free to play.
if you dont use the "ship" or "airship", than it might be even easier, as you
can also control those speed to a lower speed.

just change the "boat" to "ship" or "airship" and change those sprite.
you still require regions though.
I use now airship and it work perfect!
Thank you ShadowDragon for your time.

Problem solved, topic can be close now from moderator.
Thread closed

In future, please report your post and ask for it to be closed. We won't always see a comment.

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-change-landvehicle-plugin-on-off-by-karberus.155016/