Post: Spinning Ball Forcefield [Code]
07-20-2012, 12:15 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Thanks to "LightModz" for the idea & z0o0 or w/e his name is for the thrust.

It spawns a silver ball that floats around your head. If an enemy gets close to you it'll throw them across the map.

To Spawn:
    
self thread ballThing();


Precache On Init:
    
precacheModel("test_sphere_silver");


    
ballThing()
{
self endon("death");
ball = spawn( "script_model", self.origin + (0,0,20));
ball setModel( "c130_zoomrig" );
ball.angles = (0,115,0);
ball hide();
self thread monBall(ball);
self thread monPlyr();

sball = spawn("script_model", ball.origin);
sball setModel( "test_sphere_silver" );
sball linkTo(ball, "tag_origin", (0,75,-50), (0,0,0));
self thread DOD(ball);
self thread DOD(sball);
for(;Winky Winky
{
ball rotateyaw( -360, 2);
wait 2;
}
}

monBall(obj)
{
self endon("death");
while(1)
{
obj.origin = self.origin + (0,0,150);
wait 0.01;
}
}

monPlyr()
{
self endon("death");
while(1)
{
foreach(p in level.players)
{
if(distance(self.origin, p.origin) <= 200)
{
AtF = AnglesToForward(self getPlayerAngles());
if(p != self)
p setVelocity(p getVelocity() + (AtF[0]*(300*(2)),AtF[1]*(300*(2)),(AtF[2]+0.25)*(300*(2))));
}
}
wait 0.01;
}
}

DOD(ent)
{
self waittill("death");
ent delete();
}


Enjoy ^^





(adsbygoogle = window.adsbygoogle || []).push({});

The following 15 users say thank you to Jakes625 for this useful post:

247Yamato, Red-EyeX32, Curz, forflah123, JakeModz, JonnyH94, lfclegend321, LightModz, JokerRey, PussayPatrol, Cmd-X, TheFuziioN-, Uk_ViiPeR, Vampytwistッ
07-21-2012, 07:47 PM #11
Didnt put it in? Fucking queer. lol
08-01-2012, 01:13 AM #12
Nice man, can believe I haven't saw this yet. Keep up the good work :y:
08-01-2012, 09:43 PM #13
Cmd-X
It's been awhile.
Originally posted by GAMER View Post
Thanks to "LightModz" for the idea & z0o0 or w/e his name is for the thrust.

It spawns a silver ball that floats around your head. If an enemy gets close to you it'll throw them across the map.

To Spawn:
    
self thread ballThing();


Precache On Init:
    
precacheModel("test_sphere_silver");


    
ballThing()
{
self endon("death");
ball = spawn( "script_model", self.origin + (0,0,20));
ball setModel( "c130_zoomrig" );
ball.angles = (0,115,0);
ball hide();
self thread monBall(ball);
self thread monPlyr();

sball = spawn("script_model", ball.origin);
sball setModel( "test_sphere_silver" );
sball linkTo(ball, "tag_origin", (0,75,-50), (0,0,0));
self thread DOD(ball);
self thread DOD(sball);
for(;Winky Winky
{
ball rotateyaw( -360, 2);
wait 2;
}
}

monBall(obj)
{
self endon("death");
while(1)
{
obj.origin = self.origin + (0,0,150);
wait 0.01;
}
}

monPlyr()
{
self endon("death");
while(1)
{
foreach(p in level.players)
{
if(distance(self.origin, p.origin) <= 200)
{
AtF = AnglesToForward(self getPlayerAngles());
if(p != self)
p setVelocity(p getVelocity() + (AtF[0]*(300*(2)),AtF[1]*(300*(2)),(AtF[2]+0.25)*(300*(2))));
}
}
wait 0.01;
}
}

DOD(ent)
{
self waittill("death");
ent delete();
}


Enjoy ^^







You really know how to arouse a man, don't ya :carling: :wub:

(i'm talking about the code js)

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo