| Author |
Topic: hiding a trigger error |
| ukdjaj |
 |
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
|
Category: CoD2 Scripting Posted: Saturday, Aug. 14, 2010 02:09 pm |
 |
right i have this script, works fine but i tell the trigger to hide but it doesn't? any ideas why it isnt working?
Code: main()
{
thread part1();
thread part2();
thread part3();
thread part4();
}
part1()
{
plank1 = getent("plank1","targetname");
trig1 = getent("trig_p1_d","targetname");
trig = getent("trig_use","targetname");
trig hide();
while(1)
{
trig1 waittill ("trigger");
plank1 hide();
plank1 notsolid();
wait 10;
trig show();
trig waittill ("trigger");
plank1 solid();
plank1 show();
trig hide();
}
}
part2()
{
plank2 = getent("plank2","targetname");
trig2 = getent("trig_p2_d","targetname");
trig = getent("trig_use","targetname");
trig hide();
while(1)
{
trig2 waittill ("trigger");
plank2 hide();
plank2 notsolid();
wait 10;
trig show();
trig waittill ("trigger");
plank2 solid();
plank2 show();
trig hide();
}
}
part3()
{
plank3 = getent("plank3","targetname");
trig3 = getent("trig_p3_d","targetname");
trig = getent("trig_use","targetname");
trig hide();
while(1)
{
trig3 waittill ("trigger");
plank3 hide();
plank3 notsolid();
wait 10;
trig show();
trig waittill ("trigger");
plank3 solid();
plank3 show();
trig hide();
}
}
part4()
{
plank4 = getent("plank4","targetname");
trig4 = getent("trig_p4_d","targetname");
trig = getent("trig_use","targetname");
trig hide();
while(1)
{
trig4 waittill ("trigger");
plank4 hide();
plank4 notsolid();
wait 10;
trig show();
trig waittill ("trigger");
plank4 solid();
plank4 show();
trig hide();
thread part1();
}
} |
 |
|
|
| Tristan4592 |
General Member Since: Apr 26, 2007 Posts: 235 Last: Nov 11, 2010 [view latest posts] |
|
|
 |
|
|
| -CoDMapper |
 |
General Member Since: Nov 29, 2009 Posts: 83 Last: Oct 23, 2011 [view latest posts] |
|
|
 |
|
|
| ukdjaj |
 |
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
|
|
| ukdjaj |
 |
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
|
Category: CoD2 Scripting Posted: Saturday, Aug. 14, 2010 03:57 pm |
 |
Um.. i put "disable_trigger" and "enable_trigger", it didn't work. so i thought ah.. its because i haven't defined "trigger" so i replaced it with "trig" and i still get a unknown function error, anyone?
Code: main()
{
thread part1();
thread part2();
thread part3();
thread part4();
}
part1()
{
plank1 = getent("plank1","targetname");
trig1 = getent("trig_p1_d","targetname");
trig = getent("trig_use","targetname");
disable_trig();
while(1)
{
trig1 waittill ("trigger");
plank1 hide();
plank1 notsolid();
wait 10;
enable_trig();
trig waittill ("trigger");
plank1 solid();
plank1 show();
disable_trig();
}
}
part2()
{
plank2 = getent("plank2","targetname");
trig2 = getent("trig_p2_d","targetname");
trig = getent("trig_use","targetname");
disable_trig();
while(1)
{
trig2 waittill ("trigger");
plank2 hide();
plank2 notsolid();
wait 10;
enable_trig();
trig waittill ("trigger");
plank2 solid();
plank2 show();
disable_trig();
}
}
part3()
{
plank3 = getent("plank3","targetname");
trig3 = getent("trig_p3_d","targetname");
trig = getent("trig_use","targetname");
disable_trig();
while(1)
{
trig3 waittill ("trigger");
plank3 hide();
plank3 notsolid();
wait 10;
enable_trig();
trig waittill ("trigger");
plank3 solid();
plank3 show();
disable_trig();
}
}
part4()
{
plank4 = getent("plank4","targetname");
trig4 = getent("trig_p4_d","targetname");
trig = getent("trig_use","targetname");
disable_trig();
while(1)
{
trig4 waittill ("trigger");
plank4 hide();
plank4 notsolid();
wait 10;
enable_trig();
trig waittill ("trigger");
plank4 solid();
plank4 show();
disable_trig();
thread part1();
}
} |
 |
|
|
| -CoDMapper |
 |
General Member Since: Nov 29, 2009 Posts: 83 Last: Oct 23, 2011 [view latest posts] |
|
|
 |
|
|
| ukdjaj |
 |
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
|
|
| ukdjaj |
 |
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
|
Category: CoD2 Scripting Posted: Saturday, Aug. 14, 2010 05:19 pm |
 |
no still comes up with unknown function error i only used it once so i know it wasnt anything else, are you sure this is a cod2 command?
edited on Aug. 14, 2010 01:20 pm by ukdjaj
Code:
main()
{
thread part1();
thread part2();
thread part3();
thread part4();
}
part1()
{
plank1 = getent("plank1","targetname");
trig1 = getent("trig_p1_d","targetname");
trig = getent("trig_use","targetname");
trig disable_trigger();
while(1)
{
trig1 waittill ("trigger");
plank1 hide();
plank1 notsolid();
wait 10;
trig waittill ("trigger");
plank1 solid();
plank1 show();
}
}
part2()
{
plank2 = getent("plank2","targetname");
trig2 = getent("trig_p2_d","targetname");
trig = getent("trig_use","targetname");
while(1)
{
trig2 waittill ("trigger");
plank2 hide();
plank2 notsolid();
wait 10;
trig waittill ("trigger");
plank2 solid();
plank2 show();
}
}
part3()
{
plank3 = getent("plank3","targetname");
trig3 = getent("trig_p3_d","targetname");
trig = getent("trig_use","targetname");
while(1)
{
trig3 waittill ("trigger");
plank3 hide();
plank3 notsolid();
wait 10;
trig waittill ("trigger");
plank3 solid();
plank3 show();
}
}
part4()
{
plank4 = getent("plank4","targetname");
trig4 = getent("trig_p4_d","targetname");
trig = getent("trig_use","targetname");
while(1)
{
trig4 waittill ("trigger");
plank4 hide();
plank4 notsolid();
wait 10;
trig waittill ("trigger");
plank4 solid();
plank4 show();
thread part1();
}
} |
 |
|
|
| 3st0nian |
 |
General Member Since: Jan 14, 2008 Posts: 291 Last: Dec 4, 2017 [view latest posts] |
|
|
 |
|
|
| ukdjaj |
 |
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
|
|
|
|
mp_TempleCall of Duty: Mods: Multiplayer (624.12Kb)
|