Code:
symbols
message created
message timer
thing dog local
thing mine local
int i=1 local
vector dir local
end
#==============================================================#
code
#------------------------------------------------------
created:
SetTimerEx(2.0, GetSenderRef(), GetThingSignature(GetSenderRef()), 0);
mine = GetSenderID();
Return;
#------------------------------------------------------
timer:
if(GetParam(0) == GetThingSignature(GetSenderID()))
{
// Bring things towards the mine.
dog = FirstThingInView(mine, 360, 4, 0x424);
dir = VectorScale(VectorNorm(VectorSub(GetThingPos(mine), GetThingPos(dog))), 50);
DetachThing(dog);
ClearPhysicsFlags(dog, 0x1);
ApplyForce(dog, dir);
// Many times.
for(i = 0; i < 10; i = i + 1)
{
dog = NextThingInView();
dir = VectorScale(VectorNorm(VectorSub(GetThingPos(mine), GetThingPos(dog))), 50);
DetachThing(dog);
ClearPhysicsFlags(dog, 0x1);
ApplyForce(dog, dir);
}
SetThingHealth(mine, 0.01);
}
Return;
#------------------------------------------------------
endWent through Parsec without a hitch when I tried it. This is the secondary (proximity) mine class cog. I lay down the mine, but nothing happens. The only thing I have changed is this cog. Can I have a little help?
I'm outta ideas otherwise.
So what you want to do is create two ghost objects, and have both of those use 180 degrees facing in oppoisite directions, and move objects towards the mine.