I used to following script to add two bikes to a 2p level:
Code: Select all
WHILE_EXEC ( loop = 1 )
IF ( ( ( IS_CHARACTER_IN_MODEL ( player1 , ISETTA ) ) OR ( IS_CHARACTER_IN_MODEL ( player1 , SPRITE ) ) ) AND ( p1_on_bike = 0 ) )
SET p1_on_bike = 1
STORE_CAR_CHARACTER_IS_IN ( player1 , bike1 )
SET_CAR_NUMBER_GRAPHIC ( bike1 , 0 )
ENDIF
IF ( ( ( IS_CHARACTER_IN_MODEL ( player2 , ISETTA ) ) OR ( IS_CHARACTER_IN_MODEL ( player2 , SPRITE ) ) ) AND ( p2_on_bike = 0 ) )
SET p2_on_bike = 1
STORE_CAR_CHARACTER_IS_IN ( player2 , bike2 )
SET_CAR_NUMBER_GRAPHIC ( bike2, 0 )
ENDIF
IF ( p1_on_bike = 1 )
IF ( NOT ( CHECK_CAR_HAS_DRIVER ( bike1 ) ) )
SET p1_on_bike = 0
SET_CAR_NUMBER_GRAPHIC ( bike1 , 8 )
ENDIF
ENDIF
IF ( p2_on_bike = 1 )
IF ( NOT ( CHECK_CAR_HAS_DRIVER ( bike2 ) ) )
SET p2_on_bike = 0
SET_CAR_NUMBER_GRAPHIC ( bike2 , 8 )
ENDIF
ENDIF
ENDWHILE
Convertibles work exactly the same way. This script can be expanded to support as much bikes and convertibles as you like.
There are a few downsides:
- Only players can leave a bike/convertible without leaving a driver on the vehicle. This means that if you shoot at a random bike/convertible with an unsuspecting driver, he'll get out, but leaves a 'ghost' driver behind.
- Technically it's possible to create deltas for passengers and expand the script so more people would show up if a passenger enters your convertible, but due to a bug in GTA2 instant gang members won't get into a declared vehicle, and thus they won't enter your bike or convertible.
- To prevent all players from looking the same while on a bike or in a convertible, you could make a different delta for each player, but most colors will change with the remap of the vehicle. You could create a special palette, but then the vehicle would have only one remap.
- You can't fall off your bike when crashing into another car at top speed. However, I'd say that's a good thing.
The two bikes from GTA1 in GTA2: the Superbike without a driver and the normal Bike with a driver.