Post: How to make a solid stairway?
03-04-2012, 11:03 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); hey so heres the code:
    stairwayTH()
{
if(!self.Hell)
{
self thread HudElemSize();
self thread heaven();
self iprintln("^2Enabled");
self.Hell=true;
}
else
{
self thread hell();
self iprintln("^1Disabled");
self.Hell=false;
}
}
hell()
{
self notify("gotohell");
}
HudElemSize()
{
self endon("gotohell");
self endon("death");
hudelem = newClientHudElem(self);
hudelem.alignX = "center";
hudelem.alignY = "top";
hudelem.horzAlign = "center";
hudelem.vertAlign = "top";
hudelem.fontscale = 1;
hudelem.font = "hudbig";
hudelem.hideWhenInMenu = true;
for(;Winky Winky
{
if(self FragButtonPressed()) self.StairSize++;
else if(self SecondaryOffhandButtonPressed()) self.StairSize--;
hudelem settext("Size: "+self.StairSize);
wait 0.05;
}
}
startDpad()
{
self.curweap = self GetCurrentWeapon();
self SetActionSlot( 3, "weapon","smoke_grenade_mp" );
self giveweapon("smoke_grenade_mp");
self thread monitorDpad();
}
monitorDpad()
{
self endon ( "disconnect" );
for(;Winky Winky
{
self waittill("weapon_change");
if(self getCurrentWeapon()=="smoke_grenade_mp")
{
self notify("change");
self TakeWeapon( "smoke_grenade_mp");
self switchToWeapon( self.curweap );
self giveweapon("smoke_grenade_mp");
}
wait 0.02;
}
}
heaven()
{
self endon("gotohell");
self endon("death");
wait 1;
self iprintlnbold("Press [{+smoke}]/[{+frag}] to change stair height");
wait 1.5;
self iprintlnbold("Press [{+actionslot 3}] to spawn");
wait 1.5;
self thread startDpad();
self.StairSize = 200;
for(;Winky Winky
{
self waittill("change");
vec = anglestoforward(self getPlayerAngles());
center = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 200000, vec[1] * 200000, vec[2] * 200000), 0, self)[ "position" ];
level.center = spawn("script_origin", center);
//level.stairs = [];
origin = level.center.origin+(70,0,0);
h = 0;
for(i=0;i<self.StairSize;i++)
{
level.center rotateyaw(22.5, 0.05);
wait 0.05;
level.center moveto(level.center.origin+(0,0,1Cool Man (aka Tustin), 0.05);
wait 0.05;
level.stairs = spawn("script_model", origin);
level.stairs setmodel("com_plasticcase_beige_big");
level.stairs linkto(level.center);
level.stairs Solid();
level.solid=spawn("trigger_radius",(0,0,0),70,70,60 );
level.solid.origin =(origin);
level.solid setContents(1);
}
level.center moveto(level.center.origin-(0,0,10), 0.05);
}
}


Hope u can help me, cuz i tried everything -.-
(adsbygoogle = window.adsbygoogle || []).push({});
03-08-2012, 08:04 AM #20
Choco
Respect my authoritah!!
Just use this for a stairway to heaven (it's not a spiral but that would be way too buggy on cod4):

    stairz(size)
{
stairz = [];
stairPos = self.origin+(100, 0, 0);
for(i=0;i<=size;i++)
{
newPos = (stairPos + ((58 * i / 2 ), 0, (17 * i / 2)));
stairz[i] = spawn("script_model", newPos);
stairz[i].angles = (0, 90, 0);
wait .1;
stairz[i] setModel( "com_plasticcase_green_big" );
}
}

stair(size)
{
stairz = [];
stairPos = self.origin+(100, 0, 0);
for(i=0;i<=size;i++)
{
newPos = (stairPos + ((58 * i / 2 ), 0, (17 * i / 2)));
level.packo[i] = spawn( "trigger_radius", ( 0, 0, 0 ), 0, 65, 30 );
level.packo[i].origin = newpos;
level.packo[i].angles = (0, 90, 0);
level.packo[i] setContents( 1 );
}
}


Thread it like this:
    self thread stairz(70);
self thread stair(70);


Credits to quiksilver for the script Winky Winky
03-08-2012, 03:56 PM #21
Originally posted by .Choco View Post
Just use this for a stairway to heaven (it's not a spiral but that would be way too buggy on cod4):

    stairz(size)
{
stairz = [];
stairPos = self.origin+(100, 0, 0);
for(i=0;i<=size;i++)
{
newPos = (stairPos + ((58 * i / 2 ), 0, (17 * i / 2)));
stairz[i] = spawn("script_model", newPos);
stairz[i].angles = (0, 90, 0);
wait .1;
stairz[i] setModel( "com_plasticcase_green_big" );
}
}

stair(size)
{
stairz = [];
stairPos = self.origin+(100, 0, 0);
for(i=0;i<=size;i++)
{
newPos = (stairPos + ((58 * i / 2 ), 0, (17 * i / 2)));
level.packo[i] = spawn( "trigger_radius", ( 0, 0, 0 ), 0, 65, 30 );
level.packo[i].origin = newpos;
level.packo[i].angles = (0, 90, 0);
level.packo[i] setContents( 1 );
}
}


Thread it like this:
    self thread stairz(70);
self thread stair(70);


Credits to quiksilver for the script Winky Winky
this is the one i was trying to find for him, lol. but i think it was made by Arizona not quiksilver Winky Winky

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo