OnPlayerWeaponShot: Using bullet hit coords to create an object?
#1

I am creating an object at the coords of a weapon shot, and it doesn't always like to create the object. I didn't know if it was my script, or a current bug.

It doesn't seen to work in a room I created, as well as on Grove Street (above my map, which is built under grove street).

EDIT: After further testing (getting the coords of the bullet hit) I realized that it says it's creating the objects at that point, yet it's not. On that note, I believe this to be a bug with OPWS conflicting with CreateObject when the object hit is a player-created object.

EDIT 2: After even further testing, I realized that when a player-created object or a car is shot, it uses relative coords. Is there any way to get exact coords when hitting player created objects? Or is there a way to calculate the hit coords from relative coords.






[ame]www.youtube.com/watch?v=Q3aXnNCTET4[/ame]
Reply
#2

Did you consider that when not hitting a player, object, or vehicle, the coordinates are relative and not absolute? So you would have to consider the targets coordinates and orientation to get the absolute coordinates.
Reply
#3

Quote:
Originally Posted by Mauzen
View Post
Did you consider that when not hitting a player, object, or vehicle, the coordinates are relative and not absolute? So you would have to consider the targets coordinates and orientation to get the absolute coordinates.
Yes, but they are hitting objects.
Reply
#4

Maybe streaming problems I assume. If you're saying that sometimes it shows it and sometimes it doesn't.
Reply
#5

Quote:
Originally Posted by Ox1gEN
View Post
Maybe streaming problems I assume. If you're saying that sometimes it shows it and sometimes it doesn't.
In the video I just uploaded, you can see it working on Grove Street, but I remember it not working once. I think that was a bug on my end, but the custom building should be working, as the code shows, but it's not.

BTW I'm not using a streamer.
Reply
#6

Can you give me the full code .
Reply
#7

Quote:
Originally Posted by Buhami
View Post
Can you give me the full code .
NOPE. That's all you need to help me with my problem.
Reply
#8

Bump.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)