Data Realms Fan Forums http://868000.nnhp.asia/ |
|
CastMORay and CastObstacle Ray new argument http://868000.nnhp.asia/viewtopic.php?f=73&t=31080 |
Page 1 of 2 |
Author: | CaveCricket48 [ Sun Jun 03, 2012 7:44 pm ] |
Post subject: | 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); |
Author: | CaveCricket48 [ Sun Jun 03, 2012 9:05 pm ] |
Post subject: | 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. |
Author: | Arcalane [ Sun Jun 03, 2012 9:09 pm ] |
Post subject: | 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. |
Author: | CaveCricket48 [ Sun Jun 03, 2012 9:21 pm ] |
Post subject: | Re: CastMORay has a new argument! |
There, found it. Check OP. |
Author: | Arcalane [ Sun Jun 03, 2012 9:26 pm ] |
Post subject: | 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) |
Author: | CaveCricket48 [ Sun Jun 03, 2012 10:00 pm ] |
Post subject: | 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); |
Author: | Arcalane [ Sun Jun 03, 2012 10:13 pm ] |
Post subject: | Re: CastMORay and CastObstacle Ray new argument |
Checks out. Got some stuff working again! |
Author: | Coops [ Sun Jun 03, 2012 11:58 pm ] |
Post subject: | 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? |
Author: | CaveCricket48 [ Mon Jun 04, 2012 12:07 am ] |
Post subject: | Re: CastMORay and CastObstacle Ray new argument |
You could probably set it to -2 or 4. |
Author: | Gotcha! [ Mon Jun 04, 2012 12:36 am ] |
Post subject: | 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? |
Author: | Abdul Alhazred [ Mon Jun 04, 2012 8:17 am ] |
Post subject: | 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] |
Author: | Gotcha! [ Mon Jun 04, 2012 11:29 am ] |
Post subject: | 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. |
Author: | Arcalane [ Mon Jun 04, 2012 12:07 pm ] |
Post subject: | 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. |
Author: | Gotcha! [ Mon Jun 04, 2012 12:35 pm ] |
Post subject: | 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 |
Author: | Abdul Alhazred [ Mon Jun 04, 2012 4:17 pm ] |
Post subject: | 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. |
Page 1 of 2 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |