Jump to content

Home

Adding Locations Together


Recommended Posts

Originally posted by jmac7142

Is it possible to add locations together, for instance: (vVec, r) + (vVec2, r2), or lLoc + lLoc2?

 

You can add vectors together, but I don't think you can add locations (don't quote me on that, it's just a vague memory).

 

Use GetPositionFromLocation() to extract the vector from a location, and GetFacingFromLocation() to get the rotation part, then you can use maths on them as usual.

Link to comment
Share on other sites

Perhaps you could use the following functions (extract from nwscript):

[size=1]
object GetFirstObjectInShape(int nShape, float fSize, location lTarget, int bLineOfSight=FALSE, int nObjectFilter=OBJECT_TYPE_CREATURE, vector vOrigin=[0.0,0.0,0.0]);

object GetNextObjectInShape(int nShape, float fSize, location lTarget, int bLineOfSight=FALSE, int nObjectFilter=OBJECT_TYPE_CREATURE, vector vOrigin=[0.0,0.0,0.0]);

[/size]

Link to comment
Share on other sites

Perhaps you could use the following functions (extract from nwscript):

 

code:--------------------------------------------------------------------------------

object GetFirstObjectInShape(int nShape, float fSize, location lTarget, int bLineOfSight=FALSE, int nObjectFilter=OBJECT_TYPE_CREATURE, vector vOrigin=[0.0,0.0,0.0]);

 

object GetNextObjectInShape(int nShape, float fSize, location lTarget, int bLineOfSight=FALSE, int nObjectFilter=OBJECT_TYPE_CREATURE, vector vOrigin=[0.0,0.0,0.0]);--------------------------------------------------------------------------------

No, I need different levels to make explosions occur in a pattern kind of like a spiral, for instance:

 

* * * *

* * * *

* * * *

* * * *

where a "*" is an explosion and they're in a 4x4 square and a 2x2 square inside of that.

Link to comment
Share on other sites

  • 2 months later...
  • 4 months later...

oops, I'll get the link fixed later. That was due to a server problem back in July: we lost several threads and the url has changed since it was posted on our website. You will find the USM thread here:http://www.lucasforums.com/showthread.php?t=149509

 

EDIT: I went ahead and changed it already. I was on SWK "playing" anyways :D ~ ChAiNz.2da

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...