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
Last edited by BlazingDope ; 02-24-2012 at 09:55 AM.
02-24-2012, 12:23 AM #2
Stoodmang
Save Point
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:
02-24-2012, 12:27 AM #3
Blackstorm
Veni. Vidi. Vici.
it was created by Lost4468
02-24-2012, 09:54 AM #4
BlazingDope
Can’t trickshot me!
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:

Studman, you was banned off ngu for a reason, now stop flaming and **** off or I'll tell an admin to ban you Happy
02-24-2012, 12:45 PM #5
Stoodmang
Save Point
Originally posted by KillaMaJic View Post
Studman, you was banned off ngu for a reason, now stop flaming and **** off or I'll tell an admin to ban you Happy


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.
Last edited by Stoodmang ; 02-24-2012 at 12:54 PM.
02-24-2012, 03:02 PM #6
xRaW
xI2aW-
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.


Lol you are funny but the things u say are true there really are no real active modders in W@W I can admit I'm not great infact I'm pretty rubbish but still gota give credit in people tryin eh? If you don't try ull never know
02-24-2012, 04:28 PM #7
Originally posted by xRaW View Post
Lol you are funny but the things u say are true there really are no real active modders in W@W I can admit I'm not great infact I'm pretty rubbish but still gota give credit in people tryin eh? If you don't try ull never know


True, but wrong in a way. karoolus was the the first to make a patch for waw so all credits to him for making it happen :p
99% of the modders who edit patches are using his menu base and couldn't have done it without him Smile

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

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.


LOL, why you hating on this game its still fun even tho its old :p
02-24-2012, 05:36 PM #8
BlazingDope
Can’t trickshot me!
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.


It worked anyway you idiot :L ripped straight from my patch. He reserche's not hard to find things out over the internet now isit?
02-24-2012, 06:03 PM #9
Stoodmang
Save Point
Originally posted by KillaMaJic View Post
It worked anyway you idiot :L ripped straight from my patch. He reserche's not hard to find things out over the internet now isit?


I won't stick up for him but understand my point. He is the only one trying to advance modding. Yeah, scripts are cool but they get lame. Instead of putting shit together and calling it a day, take a bit of time and help this section. I will be the first one to say that i dislike modding, it has gotten so lame and stupid. Heres a goal for you and fellow modders, theres a mod menu built into the game already, its for developers that do model testing, its full of things ive never seen before. Its in a fastfile, look for it. I found it, would make an amazing forge patch.

---------- Post added at 01:03 PM ---------- Previous post was at 01:01 PM ----------

Originally posted by xRaW View Post
Lol you are funny but the things u say are true there really are no real active modders in W@W I can admit I'm not great infact I'm pretty rubbish but still gota give credit in people tryin eh? If you don't try ull never know


Read my post i just made to Majic.
02-25-2012, 12:33 AM #10
BlazingDope
Can’t trickshot me!
Originally posted by Stoodmang View Post
I won't stick up for him but understand my point. He is the only one trying to advance modding. Yeah, scripts are cool but they get lame. Instead of putting shit together and calling it a day, take a bit of time and help this section. I will be the first one to say that i dislike modding, it has gotten so lame and stupid. Heres a goal for you and fellow modders, theres a mod menu built into the game already, its for developers that do model testing, its full of things ive never seen before. Its in a fastfile, look for it. I found it, would make an amazing forge patch.

---------- Post added at 01:03 PM ---------- Previous post was at 01:01 PM ----------



Read my post i just made to Majic.

whats fastfile is this? patch_mp.ff is so what gsc?

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo