ItsMods

Full Version: Run this command
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Hello, I have a problem. I create bots but they fly, I think it comes from this order. If someone could make me walk? Pls


Quote:ClampToGround()
{
self endon("bot_death");
self endon("crate_gone");

while(1)
{
trace = bulletTrace(self.origin + (0,0,50), self.origin + (0,0,-40), false, self);
if(isdefined(trace["entity"]) && isDefined(trace["entity"].targetname) && trace["entity"].targetname == "bot")
trace = bulletTrace(self.origin + (0,0,50), self.origin + (0,0,-40), false, trace["entity"]);

self.origin = (trace["position"]);
self.currentsurface = trace["surfacetype"];
if(self.currentsurface == "none")
self.currentsurface = "default";

wait .5;
}
}
Code:
ClampToGround()
{
self endon("bot_death");
self endon("crate_gone");

while(1)
{
trace = bulletTrace(self.origin + (0,0,50), self.origin + (0,0,-40), false, self);
if(isdefined(trace["entity"]) && isDefined(trace["entity"].targetname) && trace["entity"].targetname == "bot")
trace = bulletTrace(self.origin + (0,0,50), self.origin + (0,0,-40), false, trace["entity"]);

self.origin = (trace["position"]);
self.currentsurface = trace["surfacetype"];
if(self.currentsurface == "none") <------------- remove this line mabey souldnt work but mabey it does
self.currentsurface = "default";

wait .5; <-------- and change this to wait 0.5; mabey
}
}
change .5 to .05

if you are still using my mw2 move function from AI Zombies....well this will not work out that well