Blockland Forums > Modification Help
Constant RadiusImpulse force
<< < (3/5) > >>
MrPickle:
schedule(time,TriggerDelete,0);

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

Put the schedule in any function, best place would be the on collision function. Sorry for typo's im on psp.
Muffinmix:
Thanks alot for all your help :cookieMonster:
Muffinmix:
Doesn't work...

There's allot of Brick related stuff in that function, and I don't know where I can change the duration of the impulse, or change the impulse at all.

Is there a way to just create a function to prolongates the basic Impulse Force duration?
MrPickle:
Ill help when i get on my comp.
MrPickle:
Ok, Pretty simple i just done this quickly for you so if it dont work tell me and ill try and fix for you. Only Admins and Super Admins can put the trigger down.


--- Quote ---function ForceShieldProjectile::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(time,TriggerDelete,0);
}

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

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

function TriggerDelete(%obj){
   %obj.delete();
}
--- End quote ---

Replace the bold stuff
Navigation
Message Index
Next page
Previous page

Go to full version