Random Vehicle Spawns
#1

Hi there, after a bit of advice hopefully.

At the present moment I load all my vehicles using AddStaticVehicleEx in a seperate filterscript.
I currently use a few arrays to randomise the vehicle model and colors on certain spawn locations, this works perfectly each time the filterscript is loaded.

However, I'd like to randomise the vehicle model that spawns after each time the car is destroyed, is this at all possible?

Basically, say a red Infernus spawns at A location, a blue Turismo spawns at B location, and a green Buffalo spawns at C location.. each time they are destroyed the same cars spawn.
I'd like it so when they are destroyed, they will be replaced with a blue Buffalo at A location, red Turismo at B location, green Infernus at C location.. etc etc.

Thanks in advance.
Reply
#2

There is no way to do this without it looking 'funky'.

You could do it so that:

When OnVehicleSpawn is called you use DestroyVehicle and use CreateVehicle to remake it with a new model.
Remember to assign a variable to each vehicle id to show that it's been remade already, check this OnVehicleSpawn and reset it OnVehicleDeath.
Reply
#3

Quote:
Originally Posted by Kyle
Посмотреть сообщение
There is no way to do this without it looking 'funky'.

You could do it so that:

When OnVehicleSpawn is called you use DestroyVehicle and use CreateVehicle to remake it with a new model.
Remember to assign a variable to each vehicle id to show that it's been remade already, check this OnVehicleSpawn and reset it OnVehicleDeath.
Interesting solution, thanks for that.

It's given me an alternative idea actually, so hopefully I can implement it using this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)