Problem with Bashable door...

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

Moderator: Core Staff

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

Re: Problem with Bashable door...

Post by Drofder2004 » April 11th, 2010, 8:29 pm

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");
}
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
Uzumakibro93
CJ Newbie
CJ Newbie
Posts: 61
Joined: April 6th, 2010, 11:56 pm
PSN ID: uzumakibro93
Location: Simpsonville, South Carolina
Contact:

Re: Problem with Bashable door...

Post by Uzumakibro93 » April 11th, 2010, 11:33 pm

^^

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...
Image

I've worked until I have been driven insane. And then I kept working. The only thing I need to know is, exactly who are those people talking to me in my head? And why do they want me to kill you?

User avatar
Uzumakibro93
CJ Newbie
CJ Newbie
Posts: 61
Joined: April 6th, 2010, 11:56 pm
PSN ID: uzumakibro93
Location: Simpsonville, South Carolina
Contact:

Re: Problem with Bashable door...

Post by Uzumakibro93 » April 12th, 2010, 12:10 am

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.
Image

I've worked until I have been driven insane. And then I kept working. The only thing I need to know is, exactly who are those people talking to me in my head? And why do they want me to kill you?

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

Re: Problem with Bashable door...

Post by Drofder2004 » April 12th, 2010, 2:42 am

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).
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
Uzumakibro93
CJ Newbie
CJ Newbie
Posts: 61
Joined: April 6th, 2010, 11:56 pm
PSN ID: uzumakibro93
Location: Simpsonville, South Carolina
Contact:

Re: Problem with Bashable door...

Post by Uzumakibro93 » April 12th, 2010, 5:03 am

Alright, I realize that. That is what my last post is about :P. But what type of entity should the door be, then?
Image

I've worked until I have been driven insane. And then I kept working. The only thing I need to know is, exactly who are those people talking to me in my head? And why do they want me to kill you?

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

Re: Problem with Bashable door...

Post by Drofder2004 » April 12th, 2010, 11:11 am

Door = Script_brushmodel (if made out of brushes)
script_model (if the door is an xmodel).
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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest