View Issue Details

IDProjectCategoryView StatusLast Update
0008538Multi Theft Auto : San AndreasScriptingpublic2014-12-31 12:26
Reportereinheit-101Assigned Tosbx320 
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Version 
Target Version1.4.1Fixed in Version1.4.1 
Summary0008538: [Request] A way to retrieve the Element that thrown satchels are attached to
Description

If you created a satchel or threw one, there is currently no way to get the Object/Vehicle/PED where the thrown satchel is now gluing at. They are attached to their landing position, but i would like to get the object they are attached to.

It could be done with getProjectileTarget (returns false if the given Element is no satchel or if the satchel is in flight and returns it's attached object if it has landed)
Or maybe with getAttachedElements.

TagsNo tags attached.

Users sponsoring this issue
Sponsors List Total Sponsorship = EUR 20

2014-12-27 23:07: einheit-101 (EUR 20)
Users sponsoring this issue (Total Sponsorship = EUR 20)

Activities

qaisjp

2014-12-28 00:14

administrator   ~~0022741

In addition, there is no way to get a specific satchel "element". I am not sure what this could be (perhaps a Projectile?).

lopezloo

2014-12-28 04:00

developer   ~~0022742

Yes it's projectile.

einheit-101

2014-12-28 07:05

reporter   ~~0022744

I use onClientProjectileCreation to get the satchel when it gets thrown. After that I use an onClientPreRender to check its velocity, if this velocity is suddenly suddenly going smaller from one frame to the next, I know that the satchel hit SOMETHING. If I could use getProjectileTarget now or something complete different then it would be possible to do advanced things with the element I hit.
A new event would be even better: onClientProjectileHit or something similar.

Grafu

2014-12-28 10:07

viewer   ~~0022745

What about launching a vector with the velocity coordinates from the satchel position point and then checking the vector with processLineOfSight?

einheit-101

2014-12-28 14:18

reporter   ~~0022747

No way to retrieve if there was an random object/vehicle/PED suddenly coming into the way of the satchel or if the satchel has hit something not covered by processLineOfSight (satchel has a size in all dimensions, so it may hit an object but processLineOfSight slightly misses), so this approach will fail very often while playing.

einheit-101

2014-12-28 14:24

reporter   ~~0022748

And due to the fact that satchels are randomly bouncing off from the target when thrown with high velocity, I can't use your idea even after the satchel impact. The satchel may hang 1 meter above its target in the air (2-3 frames after impact), I was able to reproduce this behavior while testing using exactly your method. Processing a line of sight with its previous velocity would result in a line that is going to nowhere (or the next object in range)

lopezloo

2014-12-30 22:06

developer   ~~0022755

Fixed in https://code.google.com/p/mtasa-blue/source/detail?r=6990

einheit-101

2014-12-30 23:19

reporter   ~~0022756

I will try it. Prepare for Donation :D

arranTuna

2014-12-31 12:26

manager   ~~0022758

https://code.google.com/p/mtasa-blue/source/detail?r=6990

Issue History

Date Modified Username Field Change