script

Have questions about CoD2 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
User avatar
t3vY
CJ Worshipper
CJ Worshipper
Posts: 362
Joined: January 15th, 2006, 1:57 pm
Location: zamušani

script

Post by t3vY » October 27th, 2006, 3:57 pm

hi i want to make a script(i am noob at scripting) that when i press f my platform ll move 2300 units forward and then same distance back....
can anyone please help me? :roll:

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » October 27th, 2006, 8:31 pm

Heres a Tutorial I made ;)
http://codjumper.com/forums/viewtopic.php?t=2963

Dont foget to use the search button
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]

User avatar
t3vY
CJ Worshipper
CJ Worshipper
Posts: 362
Joined: January 15th, 2006, 1:57 pm
Location: zamušani

Post by t3vY » October 28th, 2006, 1:36 pm

tnx m8! :)

User avatar
t3vY
CJ Worshipper
CJ Worshipper
Posts: 362
Joined: January 15th, 2006, 1:57 pm
Location: zamušani

Post by t3vY » October 28th, 2006, 4:10 pm

everything works great....platform moves on my command, but there is no white hand
can anyone help?

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » October 28th, 2006, 11:52 pm

thats because if you want a white hand, you want to make the trigger a trigger/use instead of a trigger/multiple
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]

User avatar
t3vY
CJ Worshipper
CJ Worshipper
Posts: 362
Joined: January 15th, 2006, 1:57 pm
Location: zamušani

Post by t3vY » October 29th, 2006, 10:48 am

thats because if you want a white hand, you want to make the trigger a trigger/use instead of a trigger/multiple
tny.... :D
and btw great tutorial :wink:

User avatar
t3vY
CJ Worshipper
CJ Worshipper
Posts: 362
Joined: January 15th, 2006, 1:57 pm
Location: zamušani

Post by t3vY » October 30th, 2006, 4:07 pm

i need one more thing.... this is my teleport file...

main()
{

entTransporter = getentarray("enter","targetname");
if(isdefined(entTransporter))
{
for(lp=0;lp<entTransporter.size;lp=lp+1)
entTransporter[lp] thread Transporter();
}


}


Transporter()
{
while(true)
{
self waittill("trigger",other);
entTarget = getent(self.target, "targetname");

wait(0.10);
other setorigin(entTarget.origin);
other setplayerangles(entTarget.angles);
printlnbold ("^4W^7el^9l ^4d^7on^9e ^4y^7o^9u ^4h^7av^9e ^4f^7inishe^9d ^4t^7h^9e ^4m^7a^9p^4!");
wait(0.10);
}
}


i want that only one person ll see this message:
printlnbold ("^4W^7el^9l ^4d^7on^9e ^4y^7o^9u ^4h^7av^9e ^4f^7inishe^9d ^4t^7h^9e ^4m^7a^9p^4!");
i tried "user printlnbold" but its not working...please help

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » October 30th, 2006, 6:27 pm

the userinprint didnt work because you didnt state it in the trigger

self waittill("trigger",user);
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]

User avatar
t3vY
CJ Worshipper
CJ Worshipper
Posts: 362
Joined: January 15th, 2006, 1:57 pm
Location: zamušani

Post by t3vY » October 30th, 2006, 8:20 pm

this is my .gsc now but its not working:


main()
{

entTransporter = getentarray("enter","targetname");
if(isdefined(entTransporter))
{
for(lp=0;lp<entTransporter.size;lp=lp+1)
entTransporter[lp] thread Transporter();
}


}


Transporter()
{
while(true)
{
self waittill("trigger",user);
entTarget = getent(self.target, "targetname");

wait(0.10);
other setorigin(entTarget.origin);
other setplayerangles(entTarget.angles);
userprintlnbold ("^4W^7el^9l ^4d^7on^9e ^4y^7o^9u ^4h^7av^9e ^4f^7inishe^9d ^4t^7h^9e ^4m^7a^9p^4!");
wait(0.10);
}
}

help?? :roll:

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » October 30th, 2006, 9:57 pm

t3vY wrote:this is my .gsc now but its not working:

Code: Select all

Transporter()
{
while(true)
{
self waittill("trigger",user);
entTarget = getent(self.target, "targetname");

wait(0.10);
other setorigin(entTarget.origin);
other setplayerangles(entTarget.angles);
userprintlnbold ("^4W^7el^9l ^4d^7on^9e ^4y^7o^9u ^4h^7av^9e ^4f^7inishe^9d ^4t^7h^9e ^4m^7a^9p^4!");
wait(0.10);
}
}
help?? :roll:

Code: Select all

Transporter()
{
while(true)
{
self waittill("trigger",user);
entTarget = getent(self.target, "targetname");

wait(0.10);
user setorigin(entTarget.origin);
user setplayerangles(entTarget.angles);
user iprintlnbold ("^4W^7el^9l ^4d^7on^9e ^4y^7o^9u ^4h^7av^9e ^4f^7inishe^9d ^4t^7h^9e ^4m^7a^9p^4!");
wait(0.10);
}
}
Image
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

User avatar
t3vY
CJ Worshipper
CJ Worshipper
Posts: 362
Joined: January 15th, 2006, 1:57 pm
Location: zamušani

Post by t3vY » October 30th, 2006, 10:22 pm

Tnx Drofder & Nightmare :** :P

Post Reply

Who is online

Users browsing this forum: No registered users and 43 guests