R3vo/Sandbox2 – User
mNo edit summary Tag: Reverted |
mNo edit summary Tags: Reverted Visual edit: Switched |
||
Line 7: | Line 7: | ||
Lastly, each vehicle will have a ''Vehicle Strength''. This value is calculated from the vehicles config ''cost'' property and set into relation of all vehicles that can be selected. | Lastly, each vehicle will have a ''Vehicle Strength''. This value is calculated from the vehicles config ''cost'' property and set into relation of all vehicles that can be selected. | ||
{{Youtube|Pw9Tz6RqoAs||center|400}} | |||
<gallery mode="slideshow"> | <gallery mode="slideshow"> |
Revision as of 11:26, 5 July 2025
The Spearhead 1944 vehicle customization feature allows the player to customize one or multiple selected vehicles and is fully multiplayer compatible Customization includes:
- Selecting a different vehicle from a defined list
- Changing the paint job, if any are available
- Adjust the parts shown such as additional shields, camo nets or armor
In addition to that, each vehicle can have a custom Vehicle Description displaying additional information to the player.
Lastly, each vehicle will have a Vehicle Strength. This value is calculated from the vehicles config cost property and set into relation of all vehicles that can be selected.
Setup
For this example we are going to add a hold action to two tanks that are then available to all players.
- Place two tanks with the name SPE_o_Player_Tank_SP and SPE_o_Player_Tank_MP in Eden Editor
- Create a file called init.sqf in the scenario folder, see Event Scripts
- Paste the following code into the file
- Preview the scenario and approach one of the tanks
- Now select the action entry and open the menu
Function Documentation
[_mode, _vehicle, _vehicleClasses, _vehicleDescriptions, _variablesToCopy, _params] call SPE_missionUtilityFunctions_fnc_vehicleCustomization;
- _mode - String: Defines the mode. Use init to open the UI. The other modes are used internally.
- _vehicle - Object: Defines the vehicle that can be customized
- _vehicleClasses - Array of Strings: The vehicle classes that will be available for selection
- _vehicleDescriptions - Array of Strings: The description for each vehicle class. Order needs to match the order of _vehicleClasses
- _variablesToCopy - Array of Strings: Variables that will be copied upon switching the vehicle. These variables will automatically be made public
- _params - Array - Internal use only!
Restrictions
Some limitations were implemented to prevent fauly behaviour. These consist of:
- The vehicle needs to be alive
- There must be at least one vehicle class defined
- The speed of the vehicle needs to be smaller than 1
- Only one player at a time can customize a vehicle
- In multiplayer the vehicle has to be empty
- In multiplayer only one player can customize a vehicle
Appropriate hints are displayed to inform the player why customization is currently not possible