Page 2 of 3

Posted: July 20th, 2007, 3:44 pm
by Luke
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.

Posted: July 20th, 2007, 5:57 pm
by Coontang
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?

Posted: July 20th, 2007, 6:25 pm
by Luke
Post the script

Posted: July 20th, 2007, 6:29 pm
by Coontang
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.

Posted: July 20th, 2007, 7:07 pm
by Luke

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.

Posted: July 20th, 2007, 7:15 pm
by Coontang
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?

Posted: July 20th, 2007, 7:43 pm
by Coontang
How can i have it so when i step in a certain place it shows some text?

Posted: July 20th, 2007, 10:06 pm
by waywaaaard
text to the user or text like position saved?

Posted: July 20th, 2007, 10:29 pm
by Coontang
the the user so it appears in the middle of the screen when i enter a certain part of my map.

Posted: July 20th, 2007, 11:46 pm
by waywaaaard
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

Posted: July 20th, 2007, 11:49 pm
by Coontang
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?

Posted: July 20th, 2007, 11:51 pm
by waywaaaard
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

Posted: July 20th, 2007, 11:58 pm
by Nightmare
I am always willing to make tutorials, just ask. :D

Posted: July 21st, 2007, 11:04 am
by Coontang
ok thanks :P if i run into any problems il give you a shout. :)

Posted: July 21st, 2007, 11:02 pm
by Coontang
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?