Collision something on something
#1

As the title says, I would like to start a script or something that will identifiy if an something ex: car is colliding with an object, but I dont have any ideeas where to start from.

Also, I would like to know if this can be created in SA-MP, I mean, i think we can create just Collision between created object through SA-MP, unless you know how to get the IDs of GTA SA Objects (Something that I dont know)

What should I start with, trying to work with the 3d Coordonates, loops through all the objects, and get their information?.... I mean I have some ideeas but I dont think that SA-MP will make this possible for me....
Or I can make something like a Health system, so if two objects get modified then a function is called (It wont be like a real Health, more something like a normal variable...
So what you think?
Reply
#2

https://sampwiki.blast.hk/wiki/GetVehicleModelInfo
https://sampforum.blast.hk/showthread.php?tid=407909
https://sampforum.blast.hk/showthread.php?tid=102865

So my idea is following:
I would start by creating a timer which will update frequently let's say 33 milliseconds (30 FPS).
First I need to check model of vehicle then get info of front bumper position. I would create a dynamic area around object using streamer area functions together with model size of object. Then I check if point is in dynamic area and if it is I will decrease HP of object. This idea is not the best idea, and I've never done something like this.
Reply
#3

Yeah thats smart, and then you can create a callback based on that wich calls if the objects's health decrease.
Thanks, I will try that xD
Reply
#4

Yo digo que el que publico esto es un pendejo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)