P
Polska
Guest
Coucou les chèvres
Débrouillez vous
Needed :
Giant Robot :
Preview :
Code :
Ferris Wheel :
Preview :
Code :
Centrox :
Preview :
Code :
Amusez-vous
Débrouillez vous
Needed :
Code:
modelSpawner(origin, model, angles, time)
{
if(isDefined(time))
wait time;
obj = spawn("script_model", origin);
obj setModel(model);
if(isDefined(angles))
obj.angles = angles;
if(getentarray().size >= 590)
{
self iprintln("^1Error^7: Please delete some other structures");
obj delete();
}
return obj;
}
createRoll( divide )
{
roll = self getPlayerAngles()[1];
wait 0.05;
return (((roll-self getPlayerAngles()[1])*-6) / divide);
}
calcDistance(speed,origin,moveTo)
{
return (distance(origin, moveTo) / speed);
}
spawnTrig(origin,width,height,cursorHint,string)
{
trig = spawn("trigger_radius", origin, 1, width, height);
trig setCursorHint(cursorHint, trig);
trig setHintString( string );
trig setvisibletoall();
return trig;
}
Giant Robot :
Preview :
Code :
Code:
Build_Robot()
{
level endon("Stop_Robot");
level.Ext_Body = [];
Robot_Spawn = self.origin + (0,0,20);
for(i = 0; i < 16; i++) for(Ext = 0; Ext < 2; Ext++)
level.Ext_Body[level.Ext_Body.size] = modelSpawner(Robot_Spawn + (cos(i*22.5)*60,sin(i*22.5)*60, 500 + Ext*70), "t6_wpn_supply_drop_ally", (0,(i*22.5)+90,90));
for(i = 0; i < 16; i++)
level.Ext_Body[level.Ext_Body.size] = modelSpawner(Robot_Spawn + (cos(i*22.5)*60,sin(i*22.5)*60, 630), "t6_wpn_supply_drop_ally", (0,(i*22.5)+90,30));
for(i = 0; i < 2; i++)
level.Ext_Body[level.Ext_Body.size] = modelSpawner(Robot_Spawn + (-30+i*60,-40,550), "t6_wpn_supply_drop_axis", (0,180,0));
for(i = 0; i < 8; i++)
level.Ext_Body[level.Ext_Body.size] = modelSpawner(Robot_Spawn + (cos(i*45)*30,sin(i*45)*30, 430), "t6_wpn_supply_drop_ally", (0,(i*45)+90,90));
for(i = 0; i < 4; i++) for(Ext = 0; Ext < 5; Ext++)
level.Ext_Body[level.Ext_Body.size] = modelSpawner(Robot_Spawn + (-140,0,400) + (Ext*70, sin(-90+i*90)*15, sin(i*90)*15), "t6_wpn_supply_drop_ally", (0,90,0));
for(x = 0; x < 4; x++) for(i = 0; i < 4; i++)
level.Ext_Body[level.Ext_Body.size] = modelSpawner(Robot_Spawn + (160,0,380+x*-70) + (cos(i*90)*20,sin(i*90)*15, 0), "t6_wpn_supply_drop_ally", (0,(i*90)+90,90));
for(x = 0; x < 4; x++) for(i = 0; i < 4; i++)
level.Ext_Body[level.Ext_Body.size] = modelSpawner(Robot_Spawn + (-160,0,380+x*-70) + (cos(i*90)*20,sin(i*90)*15, 0), "t6_wpn_supply_drop_ally", (0,(i*90)+90,90));
for(x = 0; x < 3; x++) for(e = 0; e < 3; e++) for(i = 0; i < 4; i++)
level.Ext_Body[level.Ext_Body.size] = modelSpawner(Robot_Spawn + (70+e*-70,0,x*-70) + (cos(i*90)*20,sin(i*90)*15, 360), "t6_wpn_supply_drop_ally", (0,(i*90)+90,90));
for(x = 0; x < 3; x++) for(i = 0; i < 4; i++)
level.Ext_Body[level.Ext_Body.size] = modelSpawner(Robot_Spawn + (-45,0,x*-70) + (cos(i*90)*20,sin(i*90)*15, 160), "t6_wpn_supply_drop_ally", (0,(i*90)+90,90));
for(x = 0; x < 3; x++) for(i = 0; i < 4; i++)
level.Ext_Body[level.Ext_Body.size] = modelSpawner(Robot_Spawn + (45,0,x*-70) + (cos(i*90)*20,sin(i*90)*15, 160), "t6_wpn_supply_drop_ally", (0,(i*90)+90,90));
for(e = 0; e < 2; e++) for(i = 0; i < 4; i++)
level.Ext_Body[level.Ext_Body.size] = modelSpawner(Robot_Spawn + (-45,-35+e*35,-40) + (sin(-90+i*90)*15, 0, sin(i*90)*15), "t6_wpn_supply_drop_ally", (0,180,0));
for(e = 0; e < 2; e++) for(i = 0; i < 4; i++)
level.Ext_Body[level.Ext_Body.size] = modelSpawner(Robot_Spawn + (45,-35+e*35,-40) + (sin(-90+i*90)*15, 0, sin(i*90)*15), "t6_wpn_supply_drop_ally", (0,180,0));
}
Ferris Wheel :
Preview :
Code :
Code:
Spawn_Ferriswheel()
{
level endon("Destroy_Ferris");
level.ferrisOrg = self.origin;
level.speed = 0;
level.FerrisLegs = [];
level.FerrisSeats = [];
level.Ferris = [];
level.FerrisAttach = modelSpawner(level.ferrisOrg + (0,0,420), "tag_origin");
level.FerrisLink = modelSpawner(level.ferrisOrg + (0,0,60), "tag_origin");
for(a=0;a<2;a++) for(e=0;e<30;e++)
level.Ferris[levl.Ferris.size] = modelSpawner(level.ferrisOrg + (-50+a*100,0,420) + (0,sin(e*12)*330, cos(e*12)*330), "t6_wpn_supply_drop_ally", (0,0,e*-12),.1);
for(a=0;a<2;a++) for(b=0;b<5;b++) for(e=0;e<15;e++)
level.Ferris[level.Ferris.size] = modelSpawner(level.ferrisOrg + (-50+a*100,0,420) + (0,sin(e*24)*40+b*65, cos(e*24)*40+b*65), "t6_wpn_supply_drop_ally", (0,0,(e*-24)-90),.1);
for(e=0;e<15;e++)
level.FerrisSeats[level.FerrisSeats.size] = modelSpawner(level.ferrisOrg + (0,0,420) + (0,sin(e*24)*330, cos(e*24)*330), "t6_wpn_supply_drop_axis",(e*24,90,0),.1);
for(e=0;e<3;e++)
level.FerrisLegs[level.FerrisLegs.size] = modelSpawner(level.ferrisOrg + (82-e*82,0,420),"t6_wpn_supply_drop_ally",(0,90,0),.1);
for(e=0;e<2;e++) for(a=0;a<8;a++)
level.FerrisLgs[level.FerrisLegs.size] = modelSpawner(level.ferrisOrg + (-100+e*200,-220,0) + (0,a*28,a*60),"t6_wpn_supply_drop_ally",(0,0,65),.1);
for(e=0;e<2;e++) for(a=0;a<8;a++)
level.FerrisLegs[level.FerrisLegs.size] = modelSpawner(level.ferrisOrg + (-100+e*200,220,0) + (0,a*-28,a*60),"t6_wpn_supply_drop_ally",(0,0,-65),.1);
foreach(model in level.Ferris)
model linkTo(level.FerrisAttach);
foreach(model in level.FerrisSeats)
model linkTo(level.FerrisAttach);
level.FerrisAttach thread ferrisRotate(1);
level.FerrisLink checkRidersFerris(level.FerrisSeats);
}
ferrisRotate(speed)
{
self thread doFerrisRotate(speed);
}
resetFerrisSpeed()
{
level.speed = 0;
self thread doFerrisRotate(1);
}
doFerrisRotate(speed)
{
level endon("Destroy_Ferris");
level.speed += speed;
if(level.speed >= 15)
level.speed = 15;
if(level.speed <= -15)
level.speed = -15;
iprintln(level.speed);
while(true)
{
for(a=0;a<360;a+=level.speed)
{
self rotateTo((0,self.angles[1],a),.2);
wait .05;
}
for(a=360;a<0;a-=level.speed)
{
self rotateTo((0,self.angles[1],a),.2);
wait .05;
}
wait .05;
}
}
checkRidersFerris(Array)
{
level endon("Destroy_Ferris");
level.ferrisTrig = spawnTrig(self.origin,250,40,"HINT_NOICON","Press &&1 To Enter / Exit The Ferris Wheel!");
while(isDefined(self))
{
level.ferrisTrig waittill("trigger",i);
if(!isDefined(i.riding) && isPlayer(i) && i useButtonPressed())
{
Closest = getClosest(i.origin,Array);
Seat = modelSpawner(Closest.origin-anglesToRight(self.angles)*22,"script_origin",(0,90,0));
Seat thread seatAngleFix(Closest);
if(!isDefined(Closest.FerrisOccupied))
{
i setStance("crouch");
i.ridingFerris = true;
i PlayerLinkToDelta(Seat);
i thread playerExitFerry(Closest,Seat);
Closest.FerrisOccupied = true;
}
}
}
}
seatAngleFix(seat)
{
while(true)
{
for(a=0;a<360;a+=level.speed)
{
self.angles = (0,90,0);
self MoveTo(seat.origin+(0,0,10),.1);
wait .05;
}
wait .05;
}
}
playerExitFerry(Seat,tag)
{
while(isDefined(level.Ferris_Wheel))
{
if(self fragButtonPressed()) break;
wait .05;
}
tag unLink();
tag delete();
self.ridingFerris = undefined;
Seat.FerrisOccupied = undefined;
self unlink();
}
Centrox :
Preview :
Code :
Code:
Spawn_Centrox()
{
level endon("Stop_Centrox");
level.Centrox = [];
level.Seats = [];
level.Center = [];
level.Movements = modelSpawner(self.origin + (40,0,20), "tag_origin");
time = .1;
for(e = 0; e < 2; e++)
for(i = 0; i < 6; i++)
level.Center[level.Center.size] = modelSpawner(level.Movements.origin + (cos(i*60)*20,sin(i*60)*20, e*70), "t6_wpn_supply_drop_ally", (0,(i*60)+90,90), time);//Center
for(i = 0; i < 15; i++)
level.Centrox[level.Centrox.size] = modelSpawner(level.Movements.origin + (cos(i*24)*70,sin(i*24)*70, -20), "t6_wpn_supply_drop_ally", (0,(i*24)+90,0), time);//floor inner
for(i = 0; i < 25; i++)
level.Centrox[level.Centrox.size] = modelSpawner(level.Movements.origin + (cos(i*14.4)*140,sin(i*14.4)*140, -20), "t6_wpn_supply_drop_ally", (0,(i*14.4)+90,0), time);//floor outer
for(i = 0; i < 30; i++)
level.Centrox[level.Centrox.size] = modelSpawner(level.Movements.origin + (cos(i*12)*185,sin(i*12)*185, 30), "t6_wpn_supply_drop_ally", (0,(i*12)+90,90), time);//Wall
for(i = 0; i < 10; i++)
level.Centrox[level.Centrox.size] = modelSpawner(level.Movements.origin + (cos(i*36)*178,sin(i*36)*178, 30), "t6_wpn_supply_drop_axis", (0,(i*36)+90,90), time);//Seats Visual
for(i = 0; i < 10; i++)
level.Seats[level.Seats.size] = modelSpawner(level.Movements.origin + (0,0,-40) + (cos(i*36)*165,sin(i*36)*165, 30), "t6_wpn_supply_drop_axis", (0,(i*36)+180,0));//Seats
level.Centrox[68] MoveTo(level.Centrox[67].origin, .3);//Doors Open
level.Centrox[69] MoveTo(level.Centrox[40].origin, .3);//Doors Open
level.Movements thread monitorPlayersCentrox(level.Seats);
wait 5;
level.Movements thread Monitor_Centrox();
level.Movements thread Spin_Centrox();
}
Monitor_Centrox()
{
level endon("Stop_Centrox");
while(isDefined(self))
{
wait 10;
level.RideActive = true;
level.Centrox[68] MoveTo(level.Centrox[67].origin+(13,40,0), .3);
level.Centrox[69] MoveTo(level.Centrox[40].origin+(-13,-40,0), .3);
wait 3;
foreach(model in level.Centrox)
model LinkTo(level.Movements);
foreach(model in level.Seats)
model LinkTo(level.Movements);
for(Ext = 0; Ext < 22; Ext += 2)
{
self MoveTo((self.origin[0],self.origin[1],self.origin[2]+Ext),.7);
wait .6;
}
wait 8;
for(e = 0; e < 2; e++)
{
for(Ext = 0; Ext < 40; Ext++)
{
self RotateRoll(Ext*0.1, .7);
wait .1;
}
wait 5;
}
wait 8;
for(e = 0; e < 2; e++)
{
for(Ext = 0; Ext < 40; Ext++)
{
self RotateRoll(0-Ext*0.1, .7);
wait .1;
}
wait 8;
}
level.RideActive = undefined;
for(Ext = 0; Ext < 22; Ext += 2)
{
self MoveTo((self.origin[0],self.origin[1],self.origin[2]-Ext),.7);
wait .6;
}
foreach(model in level.Seats)
model unlink();
foreach(model in level.Centrox)
model Unlink();
wait .3;
level.Centrox[68] MoveTo(level.Centrox[67].origin, .3);
level.Centrox[69] MoveTo(level.Centrox[40].origin, .3);
foreach(rider in level.players)
rider unlink();
for(e = 0; e < 10; e++)
level.seatTaken[e] = undefined;
wait .05;
}
}
Spin_Centrox()
{
level endon("Stop_Centrox");
Speed = 0;
for(;;)
{
while(isDefined(self) && isDefined(level.RideActive))
{
self RotateYaw(Speed*0.4, .9);
Speed++;
wait .1;
}
Speed = 0;
wait .05;
}
}
monitorPlayersCentrox(Array)
{
level endon("Stop_Centrox");
level.CentroxTrig = spawnTrig(self.origin,250,40,"HINT_NOICON","Press &&1 To Enter / Exit The Centrox!");
while(isDefined(self))
{
level.CentroxTrig waittill("trigger",i);
if(i useButtonPressed() && !i.riding)
{
closest = getClosest(i.origin,Array);
if(!closest.occupied)
{
i setStance("stand");
i.ridingCentox = true;
i PlayerLinkToAbsolute(closest);
i thread playerExitCentrox(closest);
closest.CentroxOccupied = true;
}
}
}
}
playerExitCentrox(seat)
{
level endon("Stop_Centrox");
self endon("death");
self endon("disconnect");
wait 1.5;
while(isDefined(seat))
{
if(self useButtonPressed() && !isDefined(level.RideActive))
break;
wait .05;
}
seat.CentroxOccupied = undefined;
self setStance("stand");
self unlink();
wait 1.5;
self.ridingCentox = undefined;
}
Amusez-vous
Dernière édition: