Server Help

ASSS Custom Projects - <c> vehicles

Bak - Fri Dec 29, 2006 5:35 pm
Post subject: <c> vehicles
This module allows you to put vehicles in your zone and drive them around. You can enter a vehicle by going up to in and doing "?in". Once in a vehicle, you can leave it by doing "?out". Alternately, if the vehicle supports it, you can go up to a vehicle someone else is driving and do "?in" to attach to him. This allows you to disable attaching in the settings which will make the only way to attach be using "?in" near the vehicle. You can also disable specific ships from being drivers or attaching to each vehicle. After the turret is destroyed, it respawns after a few moments (defined by the settings). If the settings permit it, enemies can board your vehicles and battle you for control of them.

With this, you can use the settings to define stationary vehicles with 0 max turrets which act as mountable turrets on the map. Each vehicle is actually a ship, so you can change all the settings you want for the ship. The module automatically prevents players from shipchanging into turret ships.

You can also make a transport vehicle which can be used to carry your teammates to the front lines. Perhaps a fast vehicle for personal transport? There is no (resonable) limit to the number of vehicles on the map at any time, and you can have different type of vehicles on the same map.

Here's a runthrough of a sample usage with the module on the provided sample map and lvz:

Uncomment/Add objects and vehicles:vehicles in modules.conf. Also vehicles needs to be attached to the arena you are using it in. Also, to use the commands (?in and ?out), you need to enable access to them in groupdef.conf (putting them in groupdef.dir/default will work).

Then, you make your images. Vehicles are just ships you make a standard override lvz for the ship images. You will also need some graphics for how the ship appears on the map, or after it's destroyed.


After you make your images, include them in a lvz file. You need two mapobjects for each vehicle, one to place on the map when no one is in it and one for when it's destroyed. The location doesn't matter for these, as they will be moved into place by the module.


Then you describe the location of your turrets using eLVL Attributes, which you can edit using a map edtior like CLT. The details of this will be described later.


Players can see vehicles as lvz objects on the map


if the player is in a ship which can be a driver, he goes up to the ship and types "?in". The module then hides the lvz graphic, changes the player to the vehicle's ship, and warps him to the correct location.


When he's bored, he can type "?out" to exit the vehicle and the ready lvz shows up where he left. He is changed to his old ship and warped to where he exited the turret. Alternately, he can fight to his death in which case the turret will appear destroyed after he dies.


Alternately, settings permitted, other players can walk up to his vehicle and use ?in to become attached to it.



You will need to define eLVL attibutes to create turrets. In CLT, you can go to edit -> eLVL Attributes to enter the editor. The ones you can define follow:
Code: Show/Hide
Vehicle0Location (REQUIRED) - The spawn location of the vehicle, in tiles. Example: "(512, 512)"
Vehicle0ReadyLvz (REQUIRED) - The lvz map object id of the vehicle ready graphic. Example: "100"
Vehicle0BrokenLvz (REQUIRED) - The lvz map object id of the vehicle broken graphic. Example: "101"
Vehicle0Ship (REQUIRED) - The ship to change players to when they enter the vehicle. Example: "8"
Vehicle0DisallowDriverShips - The ships which should not be allowed to drive this vehicle. Example: "578", Default: ""
Vehicle0DisallowAttachShips - The ships which should not be allowed to attach to this vehicle. Example: "1", Default: ""
Vehicle0DisallowEnemyAttach - Should enemies be allowed to attach to this vehicle? Example: "0", Default: "1"
Vehicle0MaxTurrets - The maximum number of turrets allowed to be attached on this vehicle. Example: "0", Default: "1"

Vehicle1Location
Vehicle1ReadyLvz
...
You can't skip vehicle numbers or required attributes, or some vehicles may not get added.

Also, you can define some settings in the arena settings:
Code: Show/Hide
Vehicles:DeathSecs - the number of seconds a vehicle stays dead before respawning (default: 60)
Vehicles:ExitReenterTime - the number of seconds after one exits(?out) a vehicle before they are allowed to enter one again (default: 20)


The sourcecode and a precompiled windows .dll is attached, along with a sample lvl and lvz file.
Smong - Mon Jan 01, 2007 3:56 pm
Post subject:
Last time I tried I think if you set the TurretLimit to 0 and force attach, the turret player simply becomes stationary and appears as the turret graphic, they don't actually follow the driver around.
Bak - Tue Jan 02, 2007 1:35 am
Post subject:
hmm, then perhaps requiring a ridiculous bounty before players can attach would work?
hellzlaker - Sat Jan 06, 2007 11:01 pm
Post subject:
Nicejob it would be perfect for some one with a GTA type of a zone
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group