View unanswered posts | View active topics It is currently Mon Oct 22, 2018 4:02 pm



Reply to topic  [ 28 posts ]  Go to page 1, 2  Next
 CastMORay and CastObstacle Ray new argument 
Author Message
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 10340
Location: Here
Reply with quote
Post CastMORay and CastObstacle Ray new argument
Which is why your mods that have MORays and Obstacle are breaking. The argument notes what team for the MORay to ignore, and is placed somewhere near the end of the function call. I'm currently in the process of figuring out where exactly this argument is placed.

Edit:
Found it.
Code:
SceneMan:CastMORay( (Vector) Origin, (Vector) Trace, (int) IgnoreID, (int) IgnoreTeam, (int) IgnoreMaterial, (bool) IgnoreTerrainHits, (int) SkipPixels)


Edit: From Abdul:
Code:
float CastObstacleRay(const Vector &start, const Vector &ray, Vector &obstaclePos, Vector &freePos, MOID ignoreMOID = g_NoMOID, int ignoreTeam, unsigned char ignoreMaterial = 0, int skip = 0);


Last edited by CaveCricket48 on Sun Jun 03, 2012 10:02 pm, edited 4 times in total.



Sun Jun 03, 2012 7:44 pm
Profile
Data Realms SUPER Elite
Data Realms SUPER Elite
User avatar

Joined: Thu Jun 03, 2010 10:06 pm
Posts: 3717
Location: Over there.
Reply with quote
Post Re: CastMORay has a new argument!
WHERE. I NEED KNOW


Sun Jun 03, 2012 8:44 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 10340
Location: Here
Reply with quote
Post Re: CastMORay has a new argument!
Code:
SceneManager:CastMORay(const Vector&, const Vector&, number, number, number, boolean, number)

I'm gonna guess it's the 5th argument.


Sun Jun 03, 2012 9:05 pm
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1608
Location: UK
Reply with quote
Post Re: CastMORay has a new argument!
I think you're right there. Looking at all the B26 scripts I have, they all seem to go Vector, Vector, number, number, boolean, number.

What values would be appropriate for it? -1 = own team? etc.


Sun Jun 03, 2012 9:09 pm
Profile YIM
Data Realms SUPER Elite
Data Realms SUPER Elite
User avatar

Joined: Thu Jun 03, 2010 10:06 pm
Posts: 3717
Location: Over there.
Reply with quote
Post Re: CastMORay has a new argument!
self.Team would be correct, I think. It's often self.ID, which means that it will ignore its own ID, but now it's its own team, so self.Team


Sun Jun 03, 2012 9:12 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 10340
Location: Here
Reply with quote
Post Re: CastMORay has a new argument!
There, found it. Check OP.


Sun Jun 03, 2012 9:21 pm
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1608
Location: UK
Reply with quote
Post Re: CastMORay has a new argument!
CastObstacleRay appears to have been updated as well!

Quote:
ERROR: no overload of 'SceneManager:CastObstacleRay' matched the arguments (SceneManager, Vector, Vector, Vector, Vector, number, number, number)
candidates are:
SceneManager:CastObstacleRay(const Vector&, const Vector&, Vector&, Vector&, number, number, number, number)


Sun Jun 03, 2012 9:26 pm
Profile YIM
Data Realms SUPER Elite
Data Realms SUPER Elite
User avatar

Joined: Thu Jun 03, 2010 10:06 pm
Posts: 3717
Location: Over there.
Reply with quote
Post Re: CastMORay has a new argument!
testing the order


Sun Jun 03, 2012 9:31 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 10340
Location: Here
Reply with quote
Post Re: CastMORay has a new argument!
Edit: From Abdul:
Code:
float CastObstacleRay(const Vector &start, const Vector &ray, Vector &obstaclePos, Vector &freePos, MOID ignoreMOID = g_NoMOID, int ignoreTeam, unsigned char ignoreMaterial = 0, int skip = 0);


Sun Jun 03, 2012 10:00 pm
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1608
Location: UK
Reply with quote
Post Re: CastMORay and CastObstacle Ray new argument
Checks out. Got some stuff working again!


Sun Jun 03, 2012 10:13 pm
Profile YIM
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post Re: CastMORay and CastObstacle Ray new argument
What if I don't want it to ignore a team?

Just have the int as -1 or would that ignore Rogues as well?


Sun Jun 03, 2012 11:58 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 10340
Location: Here
Reply with quote
Post Re: CastMORay and CastObstacle Ray new argument
You could probably set it to -2 or 4.


Mon Jun 04, 2012 12:07 am
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1966
Location: The Netherlands
Reply with quote
Post Re: CastMORay and CastObstacle Ray new argument
I've got 33 hits for morays in the lua scripts in UniTec and 51 for obstaclerays and have no lua knowledge whatsoever. Seriously, guys? :cry:

Image


Mon Jun 04, 2012 12:36 am
Profile
DRL Developer
DRL Developer

Joined: Tue Aug 11, 2009 5:09 am
Posts: 395
Reply with quote
Post Re: CastMORay and CastObstacle Ray new argument
Gotcha! wrote:
I've got 33 hits for morays in the lua scripts in UniTec and 51 for obstaclerays and have no lua knowledge whatsoever.[/img]
Good news! The CastFindMORay have not changed and the CastObstacleRay just have an extra argument. Setting the sixth argument to self.IgnoresWhichTeam is probably enough.


Mon Jun 04, 2012 8:17 am
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1966
Location: The Netherlands
Reply with quote
Post Re: CastMORay and CastObstacle Ray new argument
Thanks, guys. I think I can figure it out with this info.
My apologies for my grumpiness yesterday. :oops:


Mon Jun 04, 2012 11:29 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 28 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.020s | 15 Queries | GZIP : Off ]