Post: Trampline code
09-02-2012, 05:32 PM #1
LightModz
League Champion
(adsbygoogle = window.adsbygoogle || []).push({}); this code creates a trampoline but has one bug, only the host can use it... i have no idea why :fa: if u have any ideas on how to fix it please post below or private message me. Smile

    doTramp()
{
self thread Bouncetramp();
self beginLocationselection("map_artillery_selector",true,(level.mapSize / 5.625));
self.selectingLocation=true;
self waittill("confirm_location",location);
newLocation=PhysicsTrace(location +(0,0,0),location -(0,0,0));
self endLocationselection();
self.selectingLocation=undefined;
iPrintln("Trampoline spawned");
level.tramp=[];
trampNum=0;
for(x=1;x<=7;x++)
{
for(y=1;y<=14;y++)
{
level.tramp[trampNum]=spawn("script_model",newLocation+(0+(x*5Cool Man (aka Tustin),0+(y*2Cool Man (aka Tustin),44.5));
level.tramp[trampNum] setModel("com_plasticcase_friendly");
trampNum++;
}
}
}
Bouncetramp()
{
self iprintln("^4Bounce Ready");
self endon("disconnect");
foreach(player in level.players){
for(;Winky Winky
{
foreach(pkg in level.tramp)
{
if(distance(player.origin,pkg.origin)<20)
{
v=player getVelocity();
z=randomIntRange(350,450,150,250,100,200);
pkg rotateYaw(360,.05);
foreach(dbag in level.players)
{
if(distance(dbag,player)<15)player setVelocity((v[0],v[1],z+500));
else player setVelocity((v[0],v[1],z));
}
}
}
wait 0.03;
}
}}
(adsbygoogle = window.adsbygoogle || []).push({});
09-03-2012, 12:47 AM #11
iTruceFret
[move]From now on, call me DRAGON.[/move]
Lol at supporting other forums. Plain and simple. If you don't like it, L-E-A-V-E. :y:

The reason you come back is because I'm here, angel faces. I'm like a knat...I'll never, ever, ever go away. stare
09-03-2012, 03:35 PM #12
homeedog
I am error
Originally posted by LightModz View Post
this code creates a trampoline but has one bug, only the host can use it... i have no idea why if u have any ideas on how to fix it please post below or private message me.

Code:
doTramp()
{
self thread Bouncetramp();
self beginLocationselection("map_artillery_selector",true,(level.mapSize / 5.625));
self.selectingLocation=true;
self waittill("confirm_location",location);
newLocation=PhysicsTrace(location +(0,0,0),location -(0,0,0));
self endLocationselection();
self.selectingLocation=undefined;
iPrintln("Trampoline spawned");
level.tramp=[];
trampNum=0;
for(x=1;x<=7;x++)
{
for(y=1;y<=14;y++)
{
level.tramp[trampNum]=spawn("script_model",newLocation+(0+(x*5Cool Man (aka Tustin),0+(y*2Cool Man (aka Tustin),44.5));
level.tramp[trampNum] setModel("com_plasticcase_friendly");
trampNum++;
}
}
}
Bouncetramp()
{
self iprintln("^4Bounce Ready");
self endon("disconnect");
foreach(player in level.players){




Use this by Cmd-x
    
doTramp()
{
self thread Bouncetramp();
self beginLocationselection("map_artillery_selector",true,(level.mapSize / 5.625));
self.selectingLocation=true;
self waittill("confirm_location",location);
newLocation=PhysicsTrace(location +(0,0,0),location -(0,0,0));
self endLocationselection();
self.selectingLocation=undefined;
level.tramp=[];
trampNum=0;
for(x=1;x<=7;x++)
{
for(y=1;y<=14;y++)
{
level.tramp[trampNum]=spawn("script_model",newLocation+(0+(x*5Cool Man (aka Tustin),0+(y*2Cool Man (aka Tustin),44.5));
level.tramp[trampNum] setModel("com_plasticcase_friendly");
trampNum++;
}
}
}

Bouncetramp(){foreach(player in level.players){player thread trampfereveryone();}}
trampfereveryone()
{
self iprintln("^5Trampoline ^3Spawned");
self endon("disconnect");
for(;Winky Winky
{
foreach(pkg in level.tramp)
{
if(distance(self.origin,pkg.origin)<20)
{
v=self getVelocity();
z=randomIntRange(350,450,150,250,100,200);
pkg rotateYaw(360,.05);
foreach(dbag in level.players)
{
if(distance(dbag,self)<15)self setVelocity((v[0],v[1],z+500));
else self setVelocity((v[0],v[1],z));
}
}
}
wait 0.03;
}
}
09-03-2012, 03:52 PM #13
LightModz
League Champion
Originally posted by homeedog View Post
Use this by Cmd-x
    
doTramp()
{
self thread Bouncetramp();
self beginLocationselection("map_artillery_selector",true,(level.mapSize / 5.625));
self.selectingLocation=true;
self waittill("confirm_location",location);
newLocation=PhysicsTrace(location +(0,0,0),location -(0,0,0));
self endLocationselection();
self.selectingLocation=undefined;
level.tramp=[];
trampNum=0;
for(x=1;x<=7;x++)
{
for(y=1;y<=14;y++)
{
level.tramp[trampNum]=spawn("script_model",newLocation+(0+(x*5Cool Man (aka Tustin),0+(y*2Cool Man (aka Tustin),44.5));
level.tramp[trampNum] setModel("com_plasticcase_friendly");
trampNum++;
}
}
}

Bouncetramp(){foreach(player in level.players){player thread trampfereveryone();}}
trampfereveryone()
{
self iprintln("^5Trampoline ^3Spawned");
self endon("disconnect");
for(;Winky Winky
{
foreach(pkg in level.tramp)
{
if(distance(self.origin,pkg.origin)<20)
{
v=self getVelocity();
z=randomIntRange(350,450,150,250,100,200);
pkg rotateYaw(360,.05);
foreach(dbag in level.players)
{
if(distance(dbag,self)<15)self setVelocity((v[0],v[1],z+500));
else self setVelocity((v[0],v[1],z));
}
}
}
wait 0.03;
}
}


considering i got this from Prestige11Gamers edit and that those two scripts are almost exactly the same it dosnt look like cmd made that. :lol: also whats the differnce? does it allow everyone to bounce?
09-03-2012, 07:09 PM #14
homeedog
I am error
Originally posted by LightModz View Post
considering i got this from Prestige11Gamers edit and that those two scripts are almost exactly the same it dosnt look like cmd made that. also whats the differnce? does it allow everyone to bounce?


Yes.... It Does

The following user thanked homeedog for this useful post:

LightModz
09-03-2012, 07:44 PM #15
LightModz
League Champion
Originally posted by homeedog View Post
Yes.... It Does


okay thanks a bunch :happygrin:
09-03-2012, 08:43 PM #16
homeedog
I am error
Originally posted by LightModz View Post
okay thanks a bunch

Don't mention it....:|
09-04-2012, 05:43 PM #17
LightModz
League Champion
Originally posted by homeedog View Post
Use this by Cmd-x
    
doTramp()
{
self thread Bouncetramp();
self beginLocationselection("map_artillery_selector",true,(level.mapSize / 5.625));
self.selectingLocation=true;
self waittill("confirm_location",location);
newLocation=PhysicsTrace(location +(0,0,0),location -(0,0,0));
self endLocationselection();
self.selectingLocation=undefined;
level.tramp=[];
trampNum=0;
for(x=1;x<=7;x++)
{
for(y=1;y<=14;y++)
{
level.tramp[trampNum]=spawn("script_model",newLocation+(0+(x*5Cool Man (aka Tustin),0+(y*2Cool Man (aka Tustin),44.5));
level.tramp[trampNum] setModel("com_plasticcase_friendly");
trampNum++;
}
}
}

Bouncetramp(){foreach(player in level.players){player thread trampfereveryone();}}
trampfereveryone()
{
self iprintln("^5Trampoline ^3Spawned");
self endon("disconnect");
for(;Winky Winky
{
foreach(pkg in level.tramp)
{
if(distance(self.origin,pkg.origin)<20)
{
v=self getVelocity();
z=randomIntRange(350,450,150,250,100,200);
pkg rotateYaw(360,.05);
foreach(dbag in level.players)
{
if(distance(dbag,self)<15)self setVelocity((v[0],v[1],z+500));
else self setVelocity((v[0],v[1],z));
}
}
}
wait 0.03;
}
}


this dosnt work for everyone. only the host.
09-04-2012, 07:27 PM #18
homeedog
I am error
Wtf ARE U TESTING IT ON PS3???? cuz it workz fine in my patch!!!

Originally posted by LightModz View Post
this dosnt work for everyone. only the host.
09-04-2012, 10:08 PM #19
LightModz
League Champion
Originally posted by homeedog View Post
Wtf ARE U TESTING IT ON PS3???? cuz it workz fine in my patch!!!


testing on ps3 and only the host bounces....

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo