Hi, I tried to devolp a rule, which is bouncing you from the wall.
But it's just sometimes working, here is the code:
for(var obj in FindObjects(Find_OnLine(
0,
LandscapeHeight()-2,
LandscapeWidth(),
LandscapeHeight()-1))) {
var ydir = obj->GetYDir();
obj->SetYDir(-ydir);
}
With things like loam, or stones it's working the most time, but if I jump with a clonk on the ground, sometimes nothing happens.
Does anybody know, what I'm doing wrong?
But it's just sometimes working, here is the code:
for(var obj in FindObjects(Find_OnLine(
0,
LandscapeHeight()-2,
LandscapeWidth(),
LandscapeHeight()-1))) {
var ydir = obj->GetYDir();
obj->SetYDir(-ydir);
}
With things like loam, or stones it's working the most time, but if I jump with a clonk on the ground, sometimes nothing happens.
Does anybody know, what I'm doing wrong?
Now the clonk often stucks, so he's in Jump-Action, but he doesn't came out from that.
It looks like, the clonk stucks in the for-loop.
My code is now:
for(var obj in FindObjects(Find_OnLine(
0,
LandscapeHeight()-2,
LandscapeWidth(),
LandscapeHeight()-1))) {
var ydir = obj->GetYDir();
obj->SetYDir(-ydir);
obj->SetAction("Jump");
}
It looks like, the clonk stucks in the for-loop.
My code is now:
for(var obj in FindObjects(Find_OnLine(
0,
LandscapeHeight()-2,
LandscapeWidth(),
LandscapeHeight()-1))) {
var ydir = obj->GetYDir();
obj->SetYDir(-ydir);
obj->SetAction("Jump");
}
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill