Post: [RELEASE] Build Stairway script
02-23-2012, 05:37 PM #1
BlazingDope
Can’t trickshot me!
(adsbygoogle = window.adsbygoogle || []).push({}); Edited the stairway to heaven script. Made it so you can toggle the height of the stairs before it creates it. I done it a weird way, but atleast it works ay.

First off make sure you precache this model.
Note: this model only works for some maps like airfield and seelow. Change the model if you wish.
    
precacheModel("static_peleliu_crate01");


Place this anywhere in your desired gsc.
    
CreateStairs()
{
//thread your exit menu function here
wait 1;
self iPrintln("[{+speed_throw}][{+attack}] - Toggle Stairs Height\n[{+usereload}] - Confirm Height & Build\nMax Height: 250");
self thread StairsText();
self.score = 0;
self endon("StairsConfirmed");
for(;Winky Winky
{
if(self AdsButtonPressed())
{
self.score -= 1;
}
if(self AttackButtonPressed())
{
self.score += 1;
}
if(self UseButtonPressed())
{
self.Text destroy();
self iPrintlnBold("Building Stairs..");
wait 2;
self thread stair( self.score );
self thread stairs( self.score );
self notify("StairsConfirmed");
}
if(self.score == 251)
{
self.score -= 1;
}
wait .2;
}
}
StairsText()
{
self endon("StairsConfirmed");
self.Text = self createFontString("Objective",2);
self.Text setPoint("TOPRIGHT","TOPRIGHT",0,0);
for(;Winky Winky
{
self.Text setText("Stairs Size: ^2"+self.score);
wait .01;
}
}

Stairs(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( "static_peleliu_crate01" );
}
}
stair(size)
{
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 );
}
}


Credits to Lost4468 who first created this
(adsbygoogle = window.adsbygoogle || []).push({});
02-25-2012, 04:52 AM #11
Jacob-And-Britt
I’m too L33T
Originally posted by KillaMaJic View Post
Edited the stairway to heaven script. Made it so you can toggle the height of the stairs before it creates it. I done it a weird way, but atleast it works ay.

First off make sure you precache this model.
Note: this model only works for some maps like airfield and seelow. Change the model if you wish.
    
precacheModel("static_peleliu_crate01");


Place this anywhere in your desired gsc.
    
CreateStairs()
{
//thread your exit menu function here
wait 1;
self iPrintln("[{+speed_throw}][{+attack}] - Toggle Stairs Height\n[{+usereload}] - Confirm Height & Build\nMax Height: 250");
self thread StairsText();
self.score = 0;
self endon("StairsConfirmed");
for(;Winky Winky
{
if(self AdsButtonPressed())
{
self.score -= 1;
}
if(self AttackButtonPressed())
{
self.score += 1;
}
if(self UseButtonPressed())
{
self.Text destroy();
self iPrintlnBold("Building Stairs..");
wait 2;
self thread stair( self.score );
self thread stairs( self.score );
self notify("StairsConfirmed");
}
if(self.score == 251)
{
self.score -= 1;
}
wait .2;
}
}
StairsText()
{
self endon("StairsConfirmed");
self.Text = self createFontString("Objective",2);
self.Text setPoint("TOPRIGHT","TOPRIGHT",0,0);
for(;Winky Winky
{
self.Text setText("Stairs Size: ^2"+self.score);
wait .01;
}
}

Stairs(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( "static_peleliu_crate01" );
}
}
stair(size)
{
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 );
}
}


Credits to Lost4468 who first created this
Maybe you should try puttin set contents 2 and maybe it will make it less laggy and more filled with a barrier.
02-25-2012, 05:01 AM #12
Stoodmang
Save Point
Originally posted by KillaMaJic View Post
whats fastfile is this? patch_mp.ff is so what gsc?


If i told you it wouldn't be much of a challenge would it? :L
Its the fastfile ISO modders use.

---------- Post added 02-25-2012 at 12:01 AM ---------- Previous post was 02-24-2012 at 11:59 PM ----------

Originally posted by jbglitching View Post
Maybe you should try puttin set contents 2 and maybe it will make it less laggy and more filled with a barrier.


SetContents it useless. Use spawnCollision. :derp:
02-25-2012, 02:02 PM #13
Correy
I'm the Original
Originally posted by KillaMaJic View Post
Edited the stairway to heaven script. Made it so you can toggle the height of the stairs before it creates it. I done it a weird way, but atleast it works ay.

First off make sure you precache this model.
Note: this model only works for some maps like airfield and seelow. Change the model if you wish.
    
precacheModel("static_peleliu_crate01");


Place this anywhere in your desired gsc.
    
CreateStairs()
{
//thread your exit menu function here
wait 1;
self iPrintln("[{+speed_throw}][{+attack}] - Toggle Stairs Height\n[{+usereload}] - Confirm Height & Build\nMax Height: 250");
self thread StairsText();
self.score = 0;
self endon("StairsConfirmed");
for(;Winky Winky
{
if(self AdsButtonPressed())
{
self.score -= 1;
}
if(self AttackButtonPressed())
{
self.score += 1;
}
if(self UseButtonPressed())
{
self.Text destroy();
self iPrintlnBold("Building Stairs..");
wait 2;
self thread stair( self.score );
self thread stairs( self.score );
self notify("StairsConfirmed");
}
if(self.score == 251)
{
self.score -= 1;
}
wait .2;
}
}
StairsText()
{
self endon("StairsConfirmed");
self.Text = self createFontString("Objective",2);
self.Text setPoint("TOPRIGHT","TOPRIGHT",0,0);
for(;Winky Winky
{
self.Text setText("Stairs Size: ^2"+self.score);
wait .01;
}
}

Stairs(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( "static_peleliu_crate01" );
}
}
stair(size)
{
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 );
}
}


Credits to Lost4468 who first created this


'self.score' will change your score not the stairway height as its already a set variable Smile

---------- Post added at 02:02 PM ---------- Previous post was at 01:59 PM ----------

Originally posted by Stoodmang View Post
You are right, i'm not flaming. You are. Go ahead, get me banned, do you know how easy it is to mess with your ip and make a new account? You're trash, this whole section is. maybe it could possibly get better if someone auctualy does some digging into the game's cfg's and gsc's instead of leeching code and making shit people could care less about. Sorry but as of now Ukviper is the only 'real' modder here. And from what i can tell, he knows alot more than what you think.

Edit: I went ahead and did this for you.

    
CreateStairs()
{
//thread your exit menu function here
wait 1;
self iPrintln("[{+speed_throw}][{+attack}] - Toggle Stairs Height\n[{+usereload}] - Confirm Height & Build\nMax Height: 250");
self thread StairsText();
self.stair["Size"] = 0;
self endon("StairsConfirmed");
for(;Winky Winky
{
if(self AdsButtonPressed())
{
self.stair["Size"] -= 1;
}
if(self AttackButtonPressed())
{
self.stair["Size"] += 1;
}
if(self UseButtonPressed())
{
self.Text destroy();
self iPrintlnBold("Building Stairs..");
wait 2;
self thread stair( self.stair["Size"] );
self thread stairs( self.stair["Size"] );
self notify("StairsConfirmed");
}
if(self.stair["Size"] == 251)
{
self.stair["Size"] -= 1;
}
wait .2;
}
}
StairsText()
{
self endon("StairsConfirmed");
self.Text = self createFontString("Objective",2);
self.Text setPoint("TOPRIGHT","TOPRIGHT",0,0);
for(;Winky Winky
{
self.Text setValue( self.stair["Size"] );
wait .01;
}
}

Stairs(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( "static_peleliu_crate01" );
}
}
stair(size)
{
stairPos = self.origin+(100, 0, 0);
for(i=0;i<=size;i++){
newPos = (stairPos + ((58 * i / 2 ), 0, (17 * i / 2)));
self.packo = [];
self.packo[i] = spawn( "trigger_radius", ( 0, 0, 0 ), 0, 65, 30 );
self.packo[i].origin = newpos;
self.packo[i].angles = (0, 90, 0);
self.packo[i] setContents( 1 );
}
}


Simple way of fixing. I'm not going into detail.


UKViper doesn't mod world at war :derp:
if it wasn't through EVERYONE no one would of progressed to what they are today, and for you to judge someone upon there skills and basically saying everyone else apart from UKViper is garbage, we could say the same about you maybe?
02-25-2012, 03:47 PM #14
Stoodmang
Save Point
Originally posted by Correy View Post
'self.score' will change your score not the stairway height as its already a set variable Smile

---------- Post added at 02:02 PM ---------- Previous post was at 01:59 PM ----------



UKViper doesn't mod world at war :derp:
if it wasn't through EVERYONE no one would of progressed to what they are today, and for you to judge someone upon there skills and basically saying everyone else apart from UKViper is garbage, we could say the same about you maybe?


I guess so, and having said he doesn't mod world at war it true but, he is the only known one digging deep for things, understand i'm not trying to prove myself or in fact put down anyone else. Never went that far.
02-25-2012, 04:41 PM #15
Correy
I'm the Original
Originally posted by Badman.
The variable is under an level directory, initiation is not needed.

---------- Post added at 11:31 AM ---------- Previous post was at 11:28 AM ----------


When you think about it all these old call of duty modifying sections here are running off of competition now, that's what makes it funny looking over it. Happy


they are starting to just become troll sections, thats why i never spend much time in them no more.
02-27-2012, 02:12 PM #16
Karoolus
I'm the W@W Menu Guy !
why does EVERY thread change into a flame war ?
cause just admit, all you guys are noobs :carling:

no serious, what's the point ?
02-27-2012, 04:05 PM #17
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Karoolus View Post
why does EVERY thread change into a flame war ?
cause just admit, all you guys are noobs :carling:

no serious, what's the point ?


Wouldn't call me a noob, to me everyone that codes COD are noobs i mean i'm just so 1337 :carling: Happy :p Smile < Smilies FTW.
03-08-2012, 06:33 PM #18
Originally posted by Stoodmang View Post
This has a number of errors including the fact that it will overflow your game fairly quickly. Cod5 doesn't have a unlimited number of strings, as soon as you call this it will start threading numerous strings every second thus crashing your game. Think again. Also if i'm not mistaken, the variable self.score is already used in the game, not user friendly or clean. Scruffy if you ask me. Also use spawnCollision instead of trigger radius. Looks like you copy/pasted a bunch of codes into a jumbled mess and made a thread on it.

Edit: After looking over the code you have a syntax: level.packo isn't added into an array. Fix :y:
all ive got to say about this is, you act like your amazing at scripting .gsc, atleast hes trying to contribute to the community. you just go around and flame people you never say good things on topics thats why you get banned probably. Winky Winky

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo