Scripts / Need angles of previous entity

Author
Message
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 14th Jan 2020 19:57
Hey. What's up? Trying to get GG lua to pull up the angles of [e-1] or (e-1).
It seems to be okay getting the positions of the previous entity (e) value,
but angles no luck. Need the one before the currently scripted entity.

Tried;

GetEntityAngleX (e-1)
GetEntityAngleX ( olde[e] ) ------------ olde[e] = e-1
GetObjectAngleX ( g_Entity[e-1]['obj'] )

I get zero sometimes and nil often.

PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 14th Jan 2020 20:46 Edited at: 14th Jan 2020 20:47
GetEntityAngleX (e-1) should be fine, you should check if the entity exists before hand though and it's possible it doesn't work for static objects? i'm not sure
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 15th Jan 2020 15:06 Edited at: 15th Jan 2020 15:10
@ GubbyBlips
Try:



Edit: Fixing code.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM

Login to post a reply

Server time is: 2024-12-22 09:34:05
Your offset time is: 2024-12-22 09:34:05