Author Topic: Choose Vehicle Event v2  (Read 5120 times)



Displays the wrench vehicle spawn menu to the player and lets them choose what vehicle to spawn. Choosing NONE will despawn the vehicle.

The event features a drop down menu which lets you choose if you want to restrict the event to only allowing speedkarts. If the player picks other vehicles, it will be ignored. Meant to be used with modified speedkart gamemodes with modified maps.


Based on code from Script_SetMusic, which is similar to /boombox and /stereo.

Download

If you cannot access my website for whatever reason, please check the mirrors below:
View on Blockland Glass
View on NexusMods

If you want players to be able to color the vehicles, use this:
Bypass Vehicle Color Trust
« Last Edit: July 16, 2017, 03:10:46 PM by Crispy_ »

I wish I could set vehicles with this instead of only using speedkarts

I wish I could set vehicles with this instead of only using speedkarts
Quickly made a ChooseVehicle version which allows any vehicle, I haven't tested it though.
« Last Edit: December 10, 2016, 04:24:22 PM by Crispy_ »

They can't mess with anything but vehicle spawning right?
Also a companion script with the ability to restrict vehicles on that brick via events would be nice incase you want to load a new map with different vehicles being used

They can't mess with anything but vehicle spawning right?
Right, the code only reads what vehicle the player has selected and thus only applies the vehicle. Everything else is ignored.

Also a companion script with the ability to restrict vehicles on that brick via events would be nice incase you want to load a new map with different vehicles being used
Might be a little difficult. Pretty sure I'd need to create lists and check based on that, and I'd need a method to modifiy the list for the player. It MIGHT happen, but don't count on it.
« Last Edit: December 10, 2016, 04:42:23 PM by Crispy_ »

This is very cool, I bet if I could figure out how to hook this up to some kind of point system it could make for an interesting vehicle TDM

Oh yes thank you so much for doing this! Also please do include a select color button at some point, it could be like a button that changes the color of the brick, just so to avoid people spamming the spray can.

And, well yes, without a restriction feature to allow players to select specific cars, it can be abused against the minigame/gamemode, allowing players to fly out of the map or spawning a vehicle that is completely unfitting for it.
« Last Edit: December 11, 2016, 06:57:05 PM by Filipe »

Also please do include a select color button at some point, it could be like a button that changes the color of the brick, just so to avoid people spamming the spray can.
That requires a client mod.

without a restriction feature to allow players to select specific cars, it can be abused against the minigame/gamemode, allowing players to fly out of the map or spawning a vehicle that is completely unfitting for it.
A custom list feature might be added in the future. It's perfectly set up for speedkart gamemodes though. It checks the vehicle's uiname to see if the first 9 characters are "Speedkart".

Updated to v2:

- Both event add-ons have been merged into one, under chooseVehicle.

- chooseVehicle now features a drop down menu which lets you pick if you want to allow any vehicle or just speedkarts.

- Should no longer break Script_SetMusic and similar add-ons.

- Unrelated, but a server script that lets you color vehicles was made. Check below the download link.


Be prepared to have to re-add or fix these events if you used them before.
« Last Edit: December 11, 2016, 09:27:01 PM by Crispy_ »

The drop down menu should also allow us to choose speficic cars, not just all cars or speedkarts so to avoid the potential issue I mentioned earlier.

The drop down menu should also allow us to choose speficic cars, not just all cars or speedkarts so to avoid the potential issue I mentioned earlier.
What's the point of doing that? If you want to just allow a specific car to be chosen, just spawn it. If you mean like using multiple events on the same brick to allow multiple vehicles, I'd rather not go through that insanity. Or if you meant selecting many items in that menu, I'm pretty sure it's impossible to select multiple items in a single drop down menu? In any case, I plan to add a third option to that drop down menu, called "Custom List", which players will be able to add vehicle ui names to via commands.

What's the point of doing that? If you want to just allow a specific car to be chosen, just spawn it. If you mean like using multiple events on the same brick to allow multiple vehicles, I'd rather not go through that insanity. Or if you meant selecting many items in that menu, I'm pretty sure it's impossible to select multiple items in a single drop down menu? In any case, I plan to add a third option to that drop down menu, called "Custom List", which players will be able to add vehicle ui names to via commands.
Simple, let's say you make a TDM minigame where you want the players to spawn the right vehicles for it, but they end up spawning flying wheeled jeeps, magic carpets and race cars.

Simple, let's say you make a TDM minigame where you want the players to spawns the right vehicles for it, but they end up spawning flying wheeled jeeps, magic carpets and race cars.
...that's why im going to make a custom list feature. The first part I thought you meant just set the event to only allow a single vehicle.

The whole reason I made this add-on was for a speedkart server (which i'm hosting right now btw) and it restricts to only speedkarts excellently. When I add a custom list feature that will be perfect.

...that's why im going to make a custom list feature. The first part I thought you meant just set the event to only allow a single vehicle.

The whole reason I made this add-on was for a speedkart server (which i'm hosting right now btw) and it restricts to only speedkarts excellently. When I add a custom list feature that will be perfect.
Oh ok, now that would be excellent.