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-04-2012, 10:19 PM #20
homeedog
I am error
Originally posted by LightModz View Post
testing on ps3 and only the host bounces....

You sir, are high!
09-05-2012, 08:05 AM #21
LightModz
League Champion
Originally posted by homeedog View Post
You sir, are high!


i dont do drugs Winky Winky
check for your self. :lol:
09-05-2012, 11:35 AM #22
SmileSmileWinky Winky:OSmile

The following 2 users groaned at TeksMoDz for this awful post:

Media907, Cmd-X
09-15-2012, 10:37 PM #23
Cmd-X
It's been awhile.
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 :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;
}
}}


It does work for everyone, and I edited it so everyone can use it No

here:

    
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("^4Trampoline ^2Spawned");
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;
}
}

The following user thanked Cmd-X for this useful post:

RaspberryIce
09-16-2012, 01:05 AM #24
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 :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;
}
}}


inb4 yamato groans :carling:

but anyway....
if I were to make a trampoline I would check distance from the trampoline. if you just land on it, your velocity will be half of what it was eventually causing you to come to a stop. and if you pressed jump on it, it would multiply your velocity by 1.1 or 1.2 making it look realistic.

No noob coders.
09-16-2012, 12:34 PM #25
LightModz
League Champion
Originally posted by GAMER View Post
inb4 yamato groans :carling:

but anyway....
if I were to make a trampoline I would check distance from the trampoline. if you just land on it, your velocity will be half of what it was eventually causing you to come to a stop. and if you pressed jump on it, it would multiply your velocity by 1.1 or 1.2 making it look realistic.

No noob coders.

fix it for meh, i didnt make it i got it from some guys a few years back
09-16-2012, 01:34 PM #26
homeedog
I am error
Originally posted by GAMER View Post
inb4 yamato groans

but anyway....
if I were to make a trampoline I would check distance from the trampoline. if you just land on it, your velocity will be half of what it was eventually causing you to come to a stop. and if you pressed jump on it, it would multiply your velocity by 1.1 or 1.2 making it look realistic.

noob coders.

Originally posted by LightModz View Post
fix it for meh, i didnt make it i got it from some guys a few years back


Are you both special ED?? Do you not know how to put a code in a patch?? Notice how EVERYONE ELSE has no problems with it. HERES A LINK FOR UR RETARTED ASSES

The following user thanked homeedog for this useful post:

Cmd-X

The following 4 users groaned at homeedog for this awful post:

247Yamato, LightModz, notoriousCFW
09-16-2012, 05:15 PM #27
LightModz
League Champion
Originally posted by homeedog View Post
Are you both special ED?? Do you not know how to put a code in a patch?? Notice how EVERYONE ELSE has no problems with it. HERES A LINK FOR UR RETARTED ASSES


-repped
ive managed to put the function in and got it working but it works for everyone literally.
if you jump on it everyone does even if there not on the tramoline.
09-16-2012, 05:25 PM #28
homeedog
I am error
Originally posted by LightModz View Post
-repped
ive managed to put the function in and got it working but it works for everyone literally.
if you jump on it everyone does even if there not on the tramoline.


I Dont care if you -Rep me but if you like you can join my lobby or open up my patch to see how i coded it

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo