Spring.GetProjectileDirection does not exist

Spring.GetProjectileDirection does not exist

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

Spring.GetProjectileDirection does not exist

Post by Erik » 30 Mar 2014, 16:19

Spring.GetProjectileDirection doesn't seem to exist (using Spring 96)

http://springrts.com/wiki/Lua_SyncedRead says:
Spring.GetProjectileDirection New in version 95.0
( number projectileID ) -> nil | number dir.x, number dir.y, number dir.z

however using it yields:
"attempt to call field 'GetProjectileDirection' (a nil value)"
0 x

User avatar
Silentwings
Moderator
Posts: 3586
Joined: 25 Oct 2008, 00:23

Re: Spring.GetProjectileDirection does not exist

Post by Silentwings » 30 Mar 2014, 16:32

Are you calling it from a widget or a unsynced/synced gadget?
0 x

User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

Re: Spring.GetProjectileDirection does not exist

Post by Erik » 30 Mar 2014, 16:35

Synced Gadget

Edit: I found taking Spring.GetProjectileVelocity(proID) and normalizing the result works just fine.
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6106
Joined: 29 Apr 2005, 01:14

Re: Spring.GetProjectileDirection does not exist

Post by FLOZi » 30 Mar 2014, 21:40

0 x

Post Reply

Return to “Game Development”

cron