Script help.
Moderator: Core Staff
-
- CJ Worshipper
- Posts: 386
- Joined: July 12th, 2007, 6:07 pm
Script help.
Does anyone know how to make the script for... like on nm_dual where u have to shoot the buttons in a certain order for the door or what ever happens to happen?
I wanna use taht in my map lol.
I wanna use taht in my map lol.
Show me what lies just beyond my eyes
Would you take me to the world where my spirit flies?
Tell me is that really fact or a pack of lies?
Twiztid = By . Blink = Song.
Would you take me to the world where my spirit flies?
Tell me is that really fact or a pack of lies?
Twiztid = By . Blink = Song.
[color=#00FF00]Drofder2004[/color] wrote:Its not out of nowhere, I carry it in my backpack, with my elephant, 32 pets, a spare pair of leggings, 20 fish feasts, a staff I use to magically disenchant things, a stone I can use to travel home, 20000 arrows, a portable stable with a gorilla, a cat and a wolf, 20 bandages and massive quantity of cloth.
Re: Script help.
It's a bit complicated and requires some good knowledge of scripting. Here are all the necessary parts you need.
Got any questions? Just ask.
Code: Select all
main()
{
maps\mp\_load::main();
level.codeCount=0;
level.code="";
for(i=1;i<4;i++) //Change 4 to however many triggers you have
{
trig = getent("mp_indoors_trigger"+i,"targetname");
trig thread checkTrig(i);
}
}
checkTrig(i)
{
while(1)
{
self waittill("trigger",user);
if(level.codeCount<3) //Change 3 with however long your code is.
{
level.code=level.code+""+i;
level.codeCount++;
}
if(level.codeCount==3) //Change 3 with however long your code is
{
if(level.code==123) //Change 123 to whatever code you want
{
//Do Stuff Here
}
level.codeCount=0;
level.code="";
}
}
}
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
-
- CJ Worshipper
- Posts: 386
- Joined: July 12th, 2007, 6:07 pm
Re: Script help.
lol be quite lol.Soviet wrote:lol, he is never going to understand that
I can always try. i have all the time in the world to figure it out. Plus im good at asking nm for help lol.
Show me what lies just beyond my eyes
Would you take me to the world where my spirit flies?
Tell me is that really fact or a pack of lies?
Twiztid = By . Blink = Song.
Would you take me to the world where my spirit flies?
Tell me is that really fact or a pack of lies?
Twiztid = By . Blink = Song.
[color=#00FF00]Drofder2004[/color] wrote:Its not out of nowhere, I carry it in my backpack, with my elephant, 32 pets, a spare pair of leggings, 20 fish feasts, a staff I use to magically disenchant things, a stone I can use to travel home, 20000 arrows, a portable stable with a gorilla, a cat and a wolf, 20 bandages and massive quantity of cloth.
-
- Too cool for CoDJumper
- Posts: 3617
- Joined: August 28th, 2007, 11:46 am
- Location: Melbourne, Australia
Re: Script help.
All the time in the world? How long is that?zipperdude wrote:lol be quite lol.Soviet wrote:lol, he is never going to understand that
I can always try. i have all the time in the world to figure it out. Plus im good at asking nm for help lol.
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Script help.
Mismatch of types!
if(level.code==123) <--- Integer
level.code=level.code+""+i; <--- String
if(level.code==123) <--- Integer
level.code=level.code+""+i; <--- String
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: Script help.
Not with the quake 3 scripting, that's the magic of it.
It automatically switches to the correct type without need for stating so.
Hence how when you declare a variable, you don't have to declare it's type.
It automatically switches to the correct type without need for stating so.
Hence how when you declare a variable, you don't have to declare it's type.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
Re: Script help.
Well that is a week of Computer Science knowledge wasted
"Zaitsev is a cunt." - Pedsdude
-
- CJ Worshipper
- Posts: 386
- Joined: July 12th, 2007, 6:07 pm
Re: Script help.
I put my info in and it still doesnt do anything can someone help me?
Heres my script:
By the way... I have no knoledge of coding, C++ java or anything. I was taking a collage class on it but i quit to work full time for ups then they laid me off
Heres my script:
Code: Select all
main()
{
maps\mp\_load::main();
level.codeCount=0;
level.code="";
for(i=0;i<10;i++)
{
trig = getent("math_prob_"+i,"targetname");
trig thread checkTrig(i);
}
}
checkTrig(i)
{
while(1)
{
self waittill("trigger",user);
if(level.codeCount<2) //Change 3 with however long your code is.
{
level.code=level.code+""+i;
level.codeCount++;
}
if(level.codeCount=2) //Change 3 with however long your code is
{
if(level.code==62) //Change 123 to whatever code you want
{
door = getent("math_door_1","targetname");
door rotatepitch(90, 2);
door waittill("rotatedone");
wait(5);
door rotatepitch(-90, 2);
door waittill("rotatedone");
}
level.codeCount==2;
level.code="";
}
}
}
Show me what lies just beyond my eyes
Would you take me to the world where my spirit flies?
Tell me is that really fact or a pack of lies?
Twiztid = By . Blink = Song.
Would you take me to the world where my spirit flies?
Tell me is that really fact or a pack of lies?
Twiztid = By . Blink = Song.
[color=#00FF00]Drofder2004[/color] wrote:Its not out of nowhere, I carry it in my backpack, with my elephant, 32 pets, a spare pair of leggings, 20 fish feasts, a staff I use to magically disenchant things, a stone I can use to travel home, 20000 arrows, a portable stable with a gorilla, a cat and a wolf, 20 bandages and massive quantity of cloth.
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Script help.
hmm, this may be so in vCoD, but not in CoD2/4, and generally. Its bad practice.Nightmare wrote:Not with the quake 3 scripting, that's the magic of it.
It automatically switches to the correct type without need for stating so.
Hence how when you declare a variable, you don't have to declare it's type.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: Script help.
Meh, might as well take advantage of it.Drofder2004 wrote:hmm, this may be so in vCoD, but not in CoD2/4, and generally. Its bad practice.Nightmare wrote:Not with the quake 3 scripting, that's the magic of it.
It automatically switches to the correct type without need for stating so.
Hence how when you declare a variable, you don't have to declare it's type.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
-
- Too cool for CoDJumper
- Posts: 3617
- Joined: August 28th, 2007, 11:46 am
- Location: Melbourne, Australia
Re: Script help.
Lol, lazy .Nightmare wrote:Meh, might as well take advantage of it.Drofder2004 wrote:hmm, this may be so in vCoD, but not in CoD2/4, and generally. Its bad practice.Nightmare wrote:Not with the quake 3 scripting, that's the magic of it.
It automatically switches to the correct type without need for stating so.
Hence how when you declare a variable, you don't have to declare it's type.
Re: Script help.
Not exactly, just being efficient using the tools given. Pointless to change it's type when the game automatically does it for you.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
-
- CJ Worshipper
- Posts: 386
- Joined: July 12th, 2007, 6:07 pm
Re: Script help.
Show me what lies just beyond my eyes
Would you take me to the world where my spirit flies?
Tell me is that really fact or a pack of lies?
Twiztid = By . Blink = Song.
Would you take me to the world where my spirit flies?
Tell me is that really fact or a pack of lies?
Twiztid = By . Blink = Song.
[color=#00FF00]Drofder2004[/color] wrote:Its not out of nowhere, I carry it in my backpack, with my elephant, 32 pets, a spare pair of leggings, 20 fish feasts, a staff I use to magically disenchant things, a stone I can use to travel home, 20000 arrows, a portable stable with a gorilla, a cat and a wolf, 20 bandages and massive quantity of cloth.
Who is online
Users browsing this forum: No registered users and 2 guests