| Blockland Forums > Modification Help |
| Constant RadiusImpulse force |
| << < (4/5) > >> |
| Muffinmix:
Didn't work, but that would be exactly what I need. --- Code: ---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(); } --- End code --- |
| MrPickle:
You getting any syntax's? |
| MrPickle:
I think the trigger might need its stuff changing. |
| Space Guy:
--- Quote from: Muffinmix on July 19, 2007, 04:56:55 PM ---Didn't work, but that would be exactly what I need. --- Code: ---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(); } --- End code --- --- End quote --- You never specified what object to delete and had a few problems with the deleting. Also, fixed/changed stuff in the actual impulsing. |
| MrPickle:
I just done what the impulser done. |
| Navigation |
| Message Index |
| Next page |
| Previous page |