View unanswered posts | View active topics It is currently Wed Dec 25, 2024 5:20 pm



Reply to topic  [ 25 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: 13144
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
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
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: 1609
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
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
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: 1609
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
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
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: 1609
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: 13144
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: 1972
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: 1972
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
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post Re: CastMORay and CastObstacle Ray new argument
It should be sufficient in most cases to add "self.team", comma'd, after "self.ID". I assume part of the problem is UniTec uses custom AI scripts for actor health regen or something? That would cause a lot of trouble.


Mon Jun 04, 2012 12:07 pm
Profile YIM
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: CastMORay and CastObstacle Ray new argument
Yeah, it used the old AI scripts, from last build. Hence most of the errors.

All in all it is less worse than I thought. /ashamed


Mon Jun 04, 2012 12:35 pm
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
Unless you have modified the behavior functions I recommend updating to the latest version of the AI. It should not involve that much work, since I have moved the behavior functions to a separate file. If were you I would copy the contents of HumanAI.lua to the actor's lua file and then copy your own Update-function in to the new file.


Mon Jun 04, 2012 4:17 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 25 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.046s | 15 Queries | GZIP : Off ]