Cortex Command

Cortex Command

Endless content for every part of the game
Built for modding from the ground up, Cortex Command supports a community of talent whose quality work can be enjoyed here: actors, items, vehicles, scenes, game modes, tech factions - you name it!
Learn More
LUA script help/request
I am fixing up old CC mods and I had much success however I have little to zero LUA experience so I am asking if anyone has any can help me fix up some old Lua files.

Like this one https://mega.nz/#!Kk9E1CIQ!R20lT-RWEmySKVe0hDByKn0Wzu_8AdkCwhfrEXu9HrQ

It is a script that is suppose to knock acters back but it doesn't while also causeing lag so if any ones willing please help.
Last edited by AbsoluteZeroHero; 19 Dec, 2015 @ 1:35pm
< >
Showing 1-2 of 2 comments
Reelshiny 25 22 Dec, 2015 @ 5:34pm 
dunno how to fix it but, theres a lot of mods with the same problem. I know at least that it has something to do with CastMORay. How Ray casting was handled by LUA had changed at some point and now you need an additional variable. Check the ingame lua console with tilda or / and you'll see a error spammed relating to that.

If you get lua errors porting other mods check the official DataRealms wiki, the notations there are really good.



TLDR: My best guess is that this part is wrong

self.parent = MovableMan:GetMOFromID(MovableMan:GetRootMOID(SceneMan:CastMORay(self.Pos,(self.Vel * -50),255,0,true,3)));


If this script works on a weapon then i guess you want the raycast to ignore allies
self.parent = MovableMan:GetMOFromID(MovableMan:GetRootMOID(SceneMan:CastMORay(self.Pos,(self.Vel * -50),self.parent.ID,self.Team,255,true,3)));


But otherwise, try this
self.parent = MovableMan:GetMOFromID(MovableMan:GetRootMOID(SceneMan:CastMORay(self.Pos,(self.Vel * -50),self.parent.ID,-2,255,true,3)));
Last edited by Reelshiny; 23 Dec, 2015 @ 11:19am
Thank you for the help I will give your code a try
< >
Showing 1-2 of 2 comments
Per page: 1530 50