I don't know much about scripting, but what is it defined as in the script?
Did you set up your different categories by name, or number?
I know that scripts are finicky and require exact inputs. Perhaps it's "car" instead of "Car".
Unfortunately, that's all the help I can offer (don't know much about this stuff XD).
I admit I have not looked at the plugin - I am neck-deep in my own code at the moment... but are you certain that randomizeEventRace needs anything passed into it at all? If it is indeed a string that needs to be passed in, you will need to enclose it in quotes. However, given that you are already specifying an event, I think nothing needs to go in the randomizeEventRace function.
tl;dr: try using $gameMap.event(6).randomizeEventRace();
The RandomizeEventRace() code, judging from how it's built, doesn't allow a variable to be passed through as an argument. The code needs to be modified to allow this, or you may need to create a new script specifically for cars.
What I meant was that the empty parentheses at the end of that bit of code doesn't allow for arguments to be passed through into the function. I don't think you need an entirely new plugin for this, but you'll likely need to add a new function to it. Try copying the code in the RandomizeEventRace() function, and tweaking the copy to make a car-specific one. Or if you're not sure if you can, find the guy who made the plugin and ask them to add the function.
Sadly I don't understand java a whole lot :/ I have also mailed this question to the creator but it has been several weeks since I last heard.
One simple question: did you rename the js file?
The js file in your original link is named a bit strange with the "forskurge" at the end - and a lot of plugins cannot function if the filename is wrong.
It has to do something with the function hierarchy, because the plugin filename becomes part of the function call - and the function call for their parts is needed by a lot of plugins.
I wasn't talking about adding something - you need the exact filename that was made by the plugin programmer, nothing else will work. any single wrong letter from that original filename will destroy all functionality.
So go back to the website where you got it and check the name that it has there.
Most likely you have to remove the "ForSkurge" part as well as the car part from that file.
And please give a link to the original website you got it from instead of uploading it here.
Even a quick check indicates that this plugin has to be called DreamX_RandomizeCharacter.js (unless the plugin writer got really tricky farther down in the code), you can see that by comparing the very first lines after the header. It might even be RandomizeCharacter.js alone, but I don't think it will ever work with that "forskurge" at the end.
So as I suggested above, remove the "ForSkurge" from the filename, and if that does not work then remove even the header DreamX_
Hm I'm having difficulty with this, either I'm missing something or the way I edit this has no effect or crashes it?
Does editing this in notepad effect this? I have javascript software to work with either.
I haven't read through all of the posts, but I suggest you pass in a string. "Car" instead of Car, as it thinks Car is a class or a variable, and it throws an error when it can't find where it's defined.
If you have Car in the list of Races in the parameters, and 8 in Sheet Max, $gameMap.event(6).randomizeEventRace("Car") should randomise between Car1 and Car8
Sorry - that script call doesn't do what you think it's doing. The call DreamX gave you did not include a race as a parameter. What that will do is simply re-randomize the event's image, but still select from the list in the parameters. It seems there's been a miscommunication - either in what he thought you were asking for, or what you thought he was telling you to do.
randomizeEventRace doesn't accept an argument, so whatever you pass through to it is being ignored. When you call it, it will randomise between what you've got listed as races in the plugin parameter. That is not what you want to do, if your goal is to give it a completely different random image, that isn't one of the races listed in the parameter.
If you just want to choose a random image for the event, without having to list it as a race, do this if you only have 1 car spritesheet and it's called Car:
$gameMap.event(6)._randomlyChosenCharacterName = "Car";
$gameMap.event(6)._randomlyChosenCharacterIndex = Math.floor(Math.random() * 8);
$gameMap.event(6).setImage($gameMap.event(6)._randomlyChosenCharacterName, $gameMap.event(6)._randomlyChosenCharacterIndex);
If you have, say, 3 Car spritesheets and they're called Car1, Car2 and Car3, do this instead:
$gameMap.event(6)._randomlyChosenCharacterName = "Car" + (Math.floor(Math.random() * 3) + 1);
$gameMap.event(6)._randomlyChosenCharacterIndex = Math.floor(Math.random() * 8);
$gameMap.event(6).setImage($gameMap.event(6)._randomlyChosenCharacterName, $gameMap.event(6)._randomlyChosenCharacterIndex);
In both cases, the 8 assumes you have 8 different cars on the spritesheet. If you only have 5, change the 8 to a 5 instead.
I don't know why all the other events are being randomized - I suspect it's not this script call that's doing it. What's on page 2 of that event?