spawning a ceg effect in a unit.

spawning a ceg effect in a unit.

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
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

spawning a ceg effect in a unit.

Post by smoth »

Code: Select all

local x,y,z,dx,dy,dz	= Spring.GetUnitPiecePosDir(explosionPiece)
produces 6 nil values

Code: Select all

			local x,y,z				= Spring.GetUnitPiecePosition (unitID, explosionPiece)
			local dx,dy,dz 			= Spring.GetUnitPieceDirection (unitID, explosionPiece)
			
			Spring.Echo(x, y, z, dx, dy, dz)
			Spring.SpawnCEG("verticalbomb", x,y,z, dx, dy, dz)
results in values but unitspace values, not world space. The spawnceg call does nothing.

what am I missing here?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: spawning a ceg effect in a unit.

Post by knorke »

what am I missing here?
parameter in GetUnitPiecePosDir
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: spawning a ceg effect in a unit.

Post by smoth »

ah, that is what I did incorrect! thanks, I didn't see it for some reason
Post Reply

Return to “Game Development”