Need help with rotating script.

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

Moderator: Core Staff

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » July 20th, 2007, 3:44 pm

I only know a way to do it if they all do the same thing. Maybe Drofder can help, as I don't know if/how you can make an array with things doing differen't things.
Watch this before posting a question: http://www.albinoblacksheep.com/flash/posting.php

User avatar
Coontang
CJ G0D!
CJ G0D!
Posts: 1797
Joined: March 4th, 2007, 3:48 pm
Location: Painting by numbers

Post by Coontang » July 20th, 2007, 5:57 pm

ok i copied and pasted the script I had from vent() bit down into the same gsc below it. When i try my map the first trigger works fine but the second , the hand appears but the vent wont move. any ideas?
Image
JDogg: 'I have a video of me pissing, wanna see?'

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » July 20th, 2007, 6:25 pm

Post the script
Watch this before posting a question: http://www.albinoblacksheep.com/flash/posting.php

User avatar
Coontang
CJ G0D!
CJ G0D!
Posts: 1797
Joined: March 4th, 2007, 3:48 pm
Location: Painting by numbers

Post by Coontang » July 20th, 2007, 6:29 pm

Full:

Code: Select all

main() 
{ 
maps\mp\_load::main(); 
thread vent(); 
} 

vent() 
{ 
vent = getent ("vent","targetname"); 
vent_trig = getent ("vent_trig","targetname"); 

while (1.5) 
{ 
vent_trig waittill ("trigger"); 
vent rotateto ((0, 0, 170), 1.5); //this will rotate 170 degrees on the y axis in 1.5 second 
} 
} 

vents() 
{ 
vents = getent ("vents","targetname"); 
vents_trig = getent ("vents_trig","targetname"); 

while (1.5) 
{ 
vents_trig waittill ("trigger"); 
vents rotateto ((0, 0, 90), 1.5); //this will rotate 90 degrees on the y axis in 1.5 second 
} 
} 

as you can tell vents is the second vent.
Image
JDogg: 'I have a video of me pissing, wanna see?'

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » July 20th, 2007, 7:07 pm

Code: Select all

main()
{
maps\mp\_load::main();
thread vent();
thread vents();
}

vent()
{
vent = getent ("vent","targetname");
vent_trig = getent ("vent_trig","targetname");

while(1)
{
vent_trig waittill ("trigger");
vent rotateto ((0, 0, 170), 1.5); //this will rotate 170 degrees on the z axis in 1.5 second
}
}

vents()
{
vents = getent ("vents","targetname");
vents_trig = getent ("vents_trig","targetname");

while(1)
{
vents_trig waittill ("trigger");
vents rotateto ((0, 0, 90), 1.5); //this will rotate 90 degrees on the z axis in 1.5 second
}
} 
Try that, vents wasn't threaded, and you put while(1.5) for some reason, that should be while(1) which means while true, that is a loop.
Watch this before posting a question: http://www.albinoblacksheep.com/flash/posting.php

User avatar
Coontang
CJ G0D!
CJ G0D!
Posts: 1797
Joined: March 4th, 2007, 3:48 pm
Location: Painting by numbers

Post by Coontang » July 20th, 2007, 7:15 pm

lol i thought that was time it took to rotate.

edit:

ill try this and see how it works. thanks for help :p if i want to add anything else do i need to add a 'thread' at top?
Image
JDogg: 'I have a video of me pissing, wanna see?'

User avatar
Coontang
CJ G0D!
CJ G0D!
Posts: 1797
Joined: March 4th, 2007, 3:48 pm
Location: Painting by numbers

Post by Coontang » July 20th, 2007, 7:43 pm

How can i have it so when i step in a certain place it shows some text?
Image
JDogg: 'I have a video of me pissing, wanna see?'

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Post by waywaaaard » July 20th, 2007, 10:06 pm

text to the user or text like position saved?
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
Coontang
CJ G0D!
CJ G0D!
Posts: 1797
Joined: March 4th, 2007, 3:48 pm
Location: Painting by numbers

Post by Coontang » July 20th, 2007, 10:29 pm

the the user so it appears in the middle of the screen when i enter a certain part of my map.
Image
JDogg: 'I have a video of me pissing, wanna see?'

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Post by waywaaaard » July 20th, 2007, 11:46 pm

when for that u need to use a variable to get the user who enabled the trigger

Code: Select all

yourtrigger waittill ("trigger",user);
user iprintlnbold ("Your text");
u should use that example
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
Coontang
CJ G0D!
CJ G0D!
Posts: 1797
Joined: March 4th, 2007, 3:48 pm
Location: Painting by numbers

Post by Coontang » July 20th, 2007, 11:49 pm

hey night mare solved me this a while agom now its all working. Ok no for the next thing, i want a locked door, with a use_touch trigger so when i press use it does a 'locked door' sound. How could i do this?
Image
JDogg: 'I have a video of me pissing, wanna see?'

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Post by waywaaaard » July 20th, 2007, 11:51 pm

http://codjumper.com/forums/viewtopic.php?t=4774

have a look at this - nightmare made this tutorial for me and it works 100% for cod2
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

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

Post by Nightmare » July 20th, 2007, 11:58 pm

I am always willing to make tutorials, just ask. :D
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
Coontang
CJ G0D!
CJ G0D!
Posts: 1797
Joined: March 4th, 2007, 3:48 pm
Location: Painting by numbers

Post by Coontang » July 21st, 2007, 11:04 am

ok thanks :P if i run into any problems il give you a shout. :)
Image
JDogg: 'I have a video of me pissing, wanna see?'

User avatar
Coontang
CJ G0D!
CJ G0D!
Posts: 1797
Joined: March 4th, 2007, 3:48 pm
Location: Painting by numbers

Post by Coontang » July 21st, 2007, 11:02 pm

could you make a tutorial or something for some water feature, like a fountain (because my map contains like a little park thing)

EDIT:
Lev!athan wrote:http://codjumper.com/forums/viewtopic.php?t=4774

have a look at this - nightmare made this tutorial for me and it works 100% for cod2

Im up to the part where you set the values in the csv and im totally lost :/ how do i do this?
Image
JDogg: 'I have a video of me pissing, wanna see?'

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests