Page 1 of 1

Vehicle question. How to remove the vehicle.

Posted: Tue Mar 26, 2024 7:20 pm
by minimy
Hello, im making code with any vehicles and work good. The problem is when need remove one from the scene.
Any way to remove any vehicle? because i cant see any comand to do this... like 'freeVehicle' or any similar thing.
Is possible?

Re: Vehicle question. How to remove the vehicle.

Posted: Tue Mar 26, 2024 9:50 pm
by jacdelad
The vehicle is an entity, you can remove it via FreeEntity(), see CreateVehicle: https://www.purebasic.com/documentation ... hicle.html.
Plus:
The new created vehicle is a regular entity, so all entity functions can be used to manipulate a vehicle.
https://www.purebasic.com/documentation ... index.html

Re: Vehicle question. How to remove the vehicle.

Posted: Wed Mar 27, 2024 3:43 pm
by minimy
Hello jacdelad! thanks for your help.
If remove car chasis and wheels (because i not see more entitys), of one of the two cars in the scene the program crash.
I put some conditions to see if was calling an entity removed, but not.
Goto use pivot to have more control over objects in the game.
Thanks and have nice day!