Author Topic: Constant RadiusImpulse force  (Read 2948 times)

Didn't work, but that would be exactly what I need.

Code: [Select]
function ForceFeildGeneratordProjectile::onCollision(%this, %obj, %slot){
     if(!%obj.client.isSuperAdmin && !%obj.client.isAdmin)
         return;
         %i = new Trigger() {
            position = %pos;
            rotation = "1 0 0 0";
            scale = "3 24 3";
            dataBlock = LastingImpulse;
            polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000";
         };
   schedule(2000,TriggerDelete,0);
}

datablock TriggerData(LastingImpulse){
   tickPeriodMS = 100;
};

function LastingImpulse::OnEnter(%this, %trigger, %obj){
   %obj.applyImpulse(0,2000)
}

function TriggerDelete(%obj){
   %obj.delete();
}


You getting any syntax's?

I think the trigger might need its stuff changing.

Didn't work, but that would be exactly what I need.

Code: [Select]
function ForceFeildGeneratordProjectile::onCollision(%this, %obj, %slot){
     if(!%obj.client.isSuperAdmin && !%obj.client.isAdmin)
         return;
         %i = new Trigger() {
            position = %pos;
            rotation = "1 0 0 0";
            scale = "3 24 3";
            dataBlock = LastingImpulse;
            polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000";
         };
   schedule(2000,0,TriggerDelete,%i);
}

datablock TriggerData(LastingImpulse){
   tickPeriodMS = 100;
};

function LastingImpulse::OnEnter(%this, %trigger, %obj){
   %obj.setVelocity(vectorAdd(%obj.getVelocity(),"0 0 500"));
}

function TriggerDelete(%obj){
   %obj.delete();
}



You never specified what object to delete and had a few problems with the deleting. Also, fixed/changed stuff in the actual impulsing.

I just done what the impulser done.

Didn't work, but that would be exactly what I need.

Code: [Select]
function ForceFeildGeneratordProjectile::onCollision(%this, %obj, %slot){
     if(!%obj.client.isSuperAdmin && !%obj.client.isAdmin)
         return;
         %i = new Trigger() {
            position = %pos;
            rotation = "1 0 0 0";
            scale = "3 24 3";
            dataBlock = LastingImpulse;
            polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000";
         };
   schedule(2000,0,TriggerDelete,%i);
}

datablock TriggerData(LastingImpulse){
   tickPeriodMS = 100;
};

function LastingImpulse::OnEnter(%this, %trigger, %obj){
   %obj.setVelocity(vectorAdd(%obj.getVelocity(),"0 0 500"));
}

function TriggerDelete(%obj){
   %obj.delete();
}



You never specified what object to delete and had a few problems with the deleting. Also, fixed/changed stuff in the actual impulsing.

I tried it, it still didn't work.

Is it ment to have that d?