Page 2 of 2

Re: Problem with Bashable door...

Posted: April 11th, 2010, 8:29 pm
by Drofder2004
Ok, on your map, you should need 5 things!
1 - Door (targetname - door)
2 - front trigger_damage (targetname - front_trig)
3 - back trigger_damage (targetname - back_trig)
4 - front trigger_hurt (targetname - front_kill)
5 - back trigger_hurt (targetname - back_kill)

Code: Select all

main()
{
   // get all entities
   door = getent("door", "targetname");
   fr_kill = getent("front_kill", "targetname");
   fr_trig = getent("front_trig", "targetname");
   bk_kill = getent("back_kill", "targetname");
   bk_trig = getent("back_trig","targetname");

   // turn off kill triggers for now.
   fr_kill thread maps\mp\_utility::triggerOff();
   bk_kill thread maps\mp\_utility::triggerOff();

   // start trigger check threads
   fr_trig thread trigFront(door, bk_kill);
   bk_trig thread trigBack(door, fr_kill);
}

trigFront(door, kill)
{ 
   // Tell this function to stop when notified
   level endon("kill_front");

   // Wait for damage
   self waittill("damage");

   // Stop the other function
   level notify("kill_back");

   // Rotate door
   door rotatepitch (90, .5, .5, 0);
   wait 0.2;

   // turn on the kill trigger
   kill thread maps\mp\_utility::triggerOn();
   wait 0.8;

   // turn off the kill trigger
   kill thread maps\mp\_utility::triggerOff();
}

trigBack(door, kill)
{
   level endon("kill_doors");
   level endon("kill_back");

   self waittill("damage");
   level notify("kill_front");
   door rotatepitch (-90, .5, .5, 0);
   wait 0.2;
   kill thread maps\mp\_utility::triggerOn();
   wait 0.8;
   kill thread maps\mp\_utility::triggerOff();
   level notify("kill_doors");
}

Re: Problem with Bashable door...

Posted: April 11th, 2010, 11:33 pm
by Uzumakibro93
^^

Thank you, but guess what:

Code: Select all

******* script runtime error *******
undefined is not an object: (file 'maps\mp\doors.gsc', line 12)
   bk_kill thread maps\mp\_utility::triggerOff();

           *
called from:
(file 'maps\mp\temple.gsc', line 6)
 maps\mp\doors::main();

 *
called from:
(file 'maps\mp\temple.gsc', line 1)
main()


Ugh...

Re: Problem with Bashable door...

Posted: April 12th, 2010, 12:10 am
by Uzumakibro93
Sorry for the double post, but I found the prob. My other mapper edited the entire map as "targetname" "door", not just the door! XD.

So could I just send the map to you via email or xfire or something for you to correctly map it? Thank you, Kyle Mulliger.

Re: Problem with Bashable door...

Posted: April 12th, 2010, 2:42 am
by Drofder2004
You have simply got badly named entities.

Open your radiant.
Click Edit < Entity Info

Now go through each of your entities and make sure they are all named correctly.

I do not have CoDRadiant installed for CoD1 (neither the game).

Re: Problem with Bashable door...

Posted: April 12th, 2010, 5:03 am
by Uzumakibro93
Alright, I realize that. That is what my last post is about :P. But what type of entity should the door be, then?

Re: Problem with Bashable door...

Posted: April 12th, 2010, 11:11 am
by Drofder2004
Door = Script_brushmodel (if made out of brushes)
script_model (if the door is an xmodel).