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

Problem with Bashable door...

Post by Uzumakibro93 » April 8th, 2010, 12:07 am

Hi there, everyone from CoDJumpers! It's Uzumakibro here, with yet another problem. I have a large map I'm making and keep trying to add a bashable door, but problems keep arising. The images of the triggers are as follows:

Image

Image

Image

Image

Image


The GSC's are as follows:
//{FROM Temple.gsc}
main()
{

maps\mp\_load::main();
maps\mp\tele::main();
maps\mp\doors::main();

game["allies"] = "american";
game["axis"] = "german";

game["american_soldiertype"] = "airborne";
game["american_soldiervariation"] = "normal";
game["german_soldiertype"] = "german_waffen";
game["german_soldiervariation"] = "normal";

game["attackers"] = "allies";
game["defenders"] = "axis";

}
and
//{FROM doors.gsc}
main()
{
thread door_front();
thread door_back();
}
door_front()
{
trig = getent("door_front","targetname");
trig1 = getent ("door_front","targetname");
block = getent ("door","targetname");
kill = getent ("door_kill_front","targetname");
while (1)
{
kill thread maps\mp\_utility::triggerOff();
trig waittill ("damage", idamage);
{
block rotatepitch (90, .5, .5, 0);
wait (.5);
kill thread maps\mp\_utility::triggerOn();
block waittill ("movedone");
kill thread maps\mp\_utility::triggerOff();
trig thread maps\mp\_utility::triggerOff();
trig1 thread maps\mp\_utility::triggerOff();
}
}
}
door_back()
{
trig = getent("door_back","targetname");
trig1 = getent ("door_front","targetname");
block = getent ("door","targetname");
kill = getent ("door_kill_back","targetname");
while (1)
{
kill thread maps\mp\_utility::triggerOff();
trig waittill ("damage");
{
block rotatepitch (-90, .5, .5, 0);
kill thread maps\mp\_utility::triggerOn();
block waittill ("movedone");
kill thread maps\mp\_utility::triggerOff();
trig thread maps\mp\_utility::triggerOff();
trig1 thread maps\mp\_utility::triggerOff();
}
}
}

I have another gsc for teleporters, but it's not important or pertinent.
The map can be downloaded if you will help, but I'm expecting you to keep it to yourself. XD. 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 8th, 2010, 1:56 am

Test the basics one at a time. Do nto create an entire section of scripted features and espect them all to work first time, it never happens...

trig = getent("door_front","targetname");
trig1 = getent ("door_front","targetname");

Same trig twice?
---

block rotatepitch (-90, .5, .5, 0);
block waittill ("movedone");

block never moves, it only rotates...
block waittill ("rotatedone");

---

You also seem to have added too many brackets. You do not open brackets after issuing a waittill function, this function is a seperate action, Only use { } to open functions, if, while, for and switch (I think that is all).

---

Remove all flags on you damage triggers and check if they work with gun fire first. Add the lfags later...
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 8th, 2010, 11:37 pm

Hmm...I could try that, but I got the script from viewtopic.php?f=18&t=5221

It was a bashable falling door tutorial by Lethal323. I read through it and noticed the extra brackets, but left them there because they wouldn't mess with the script compilation. I guess I'll go through and figure out what EXACTLY is the error via iprintln functions and etc, but it's not recognizing the "damage" part...I don't know exactly what is the problem with that, should I replace the "damage" with something else?
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 8th, 2010, 11:56 pm

My honest opinion is that, the script in front of you is poorly written, if you still are failing, let us know and I will have a go at making it better.
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 9th, 2010, 9:35 pm

Thank you. I'm testing it now, by the way, with edited script. It now has edited in iprintln's and waits to debug. Hopefully it's nothing too hard to fix, but I will tell you if the problem arises that I need a new script. Thank you, Kyle Mulliger (aka Uzumakibro93)

P.S. Script is as follows:

Code: Select all

main()
{
	thread door_front();
	thread door_back();
}

door_front()
{
	trig = getent("door_front","targetname");
	iprintln("Trig is defined as door_front");
	wait .25;
	trig1 = getent ("door_front","targetname");
	iprintln("Trig1 is defined as door_front");
	wait .25;
	block = getent ("door","targetname");
	iprintln("Block is defined as door");
	wait .25;
	kill = getent ("door_kill_front","targetname");
	iprintln("Kill is defined as door_kill_front");
	wait .25;
	while (1)
	{
		iprintln("while 1 kill calling thread triggeroff #1");
		wait .25;
		kill thread maps\mp\_utility::triggerOff();
		iprintln("while 1 trig waiting until ''damage, idamage'' #3");
		wait .25;
		trig waittill ("damage", idamage);
		iprintln("while 1 block rotating pitch #4");
		wait .25;
		block rotatepitch (90, .5, .5, 0);
		iprintln("while 1 wating .5 #5");
		wait .25;
		wait (.5);
		iprintln("while 1 kill calling thread triggeron #6");
		wait .25;
		kill thread maps\mp\_utility::triggerOn();
		iprintln("while 1 block waiting until ''movedone'' #7");
		wait .25;
		block waittill ("movedone");
		iprintln("while 1 kill calling thread triggeroff #8");
		wait .25;
		kill thread maps\mp\_utility::triggerOff();
		iprintln("while 1 trig calling thread triggeroff #9");
		wait .25;
		trig thread maps\mp\_utility::triggerOff();
		iprintln("while 1 trig 1 calling thread triggeroff #10");
		wait .25;
		trig1 thread maps\mp\_utility::triggerOff();
		iprintln("while 1 ending #11");
		wait .25;
	}
}

door_back()
{
	trig = getent("door_back","targetname");
	iprintln("Trig defined as door_back");
	wait .25;
	trig1 = getent ("door_front","targetname");
	iprintln("Trig1 defined as door_front");
	wait .25;
	block = getent ("door","targetname");
	iprintln("Block defined as door");
	wait .25;
	kill = getent ("door_kill_back","targetname");
	iprintln("Kill defined as door_kill_back");
	wait .25;
	while (1)
	{
		kill thread maps\mp\_utility::triggerOff();
		iprintln("#1");
		wait .25;
		trig waittill ("damage");
		iprintln("#2");
		wait .25;
		block rotatepitch (-90, .5, .5, 0);
		iprintln("#3");
		wait .25;
		kill thread maps\mp\_utility::triggerOn();
		iprintln("#4");
		wait .25;
		block waittill ("movedone");
		iprintln("#5");
		wait .25;
		kill thread maps\mp\_utility::triggerOff();
		iprintln("#6");
		wait .25;
		trig thread maps\mp\_utility::triggerOff();
		iprintln("#7");
		wait .25;
		trig1 thread maps\mp\_utility::triggerOff();
		iprintln("#8");
		wait .25;
	}
}
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 9th, 2010, 9:57 pm

Edited more now it's

Code: Select all

main()
{
   thread door_front();
   wait 10;
   thread door_back();
}

door_front()
{
   trig = getent("door_front","targetname");
   iprintln("Trig is defined as door_front");
   wait 1;
   trig1 = getent ("door_front","targetname");
   iprintln("Trig1 is defined as door_front");
   wait 1;
   block = getent ("door","targetname");
   iprintln("Block is defined as door");
   wait 1;
   kill = getent ("door_kill_front","targetname");
   iprintln("Kill is defined as door_kill_front");
   wait 1;
   while (1)
   {
      iprintln("while 1 kill calling thread triggeroff #1");
      wait 1;
      kill thread maps\mp\_utility::triggerOff();
      iprintln("while 1 trig waiting until ''damage, idamage'' #3");
      wait 1;
      trig waittill ("damage");
      iprintln("while 1 block rotating pitch #4");
      wait 1;
      block rotatepitch (90, .5, .5, 0);
      iprintln("while 1 wating .5 #5");
      wait 1;
      wait (.5);
      iprintln("while 1 kill calling thread triggeron #6");
      wait 1;
      kill thread maps\mp\_utility::triggerOn();
      iprintln("while 1 block waiting until ''movedone'' #7");
      wait 1;
      block waittill ("movedone");
      iprintln("while 1 kill calling thread triggeroff #8");
      wait 1;
      kill thread maps\mp\_utility::triggerOff();
      iprintln("while 1 trig calling thread triggeroff #9");
      wait 1;
      trig thread maps\mp\_utility::triggerOff();
      iprintln("while 1 trig 1 calling thread triggeroff #10");
      wait 1;
      trig1 thread maps\mp\_utility::triggerOff();
      iprintln("while 1 ending #11");
      wait 1;
   }
}

door_back()
{
   triga = getent("door_back","targetname");
   iprintln("Trig defined as door_back");
   wait 1;
   trig1a = getent ("door_front","targetname");
   iprintln("Trig1 defined as door_front");
   wait 1;
   blocka = getent ("door","targetname");
   iprintln("Block defined as door");
   wait 1;
   killa = getent ("door_kill_back","targetname");
   iprintln("Kill defined as door_kill_back");
   wait 1;
   while (1)
   {
      killa thread maps\mp\_utility::triggerOff();
      iprintln("a1");
      wait 1;
      triga waittill ("damage");
      iprintln("a2");
      wait 1;
      blocka rotatepitch (-90, .5, .5, 0);
      iprintln("a3");
      wait 1;
      killa thread maps\mp\_utility::triggerOn();
      iprintln("a4");
      wait 1;
      blocka waittill ("movedone");
      iprintln("a5");
      wait 1;
      killa thread maps\mp\_utility::triggerOff();
      iprintln("a6");
      wait 1;
      triga thread maps\mp\_utility::triggerOff();
      iprintln("a7");
      wait 1;
      trig1a thread maps\mp\_utility::triggerOff();
      iprintln("a8");
      wait 1;
   }
}


I figured out that I am getting the problem from:

trig waittill ("damage");
and
trig waittill ("damage", idamage);


Any ideas? Thanks, 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 9th, 2010, 11:33 pm

The second code you posted is not using "idamage"?

Are you receiving an error ,or are you just going by the last message you see?

Have you recompiled and removed the flags, so that you may shoot the triggers?
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 10th, 2010, 1:34 am

The last thing I see is

Code: Select all

iprintln("while 1 trig waiting until ''damage, idamage'' #3");
It is where the error is said to occur, but, looking at the script, it is obvious that the actual error is occurring in the line following it, which is the Damage code.


I deleted the idamage because I was not sure if it needed to be there at all...

As for removing the tags and recompiling, I will go try that now.

EDIT I am seeing an error. I just wanted to be clear about that.

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
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 10th, 2010, 6:55 am

Yeah, I am nowhere near fixing it. And only one person has helped me so far, if you actually looked. It was Drofder the whole way. So the problem is that the damage is not defined...Any ideas? Or possibly the idamage is not defined... Either way...
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 10th, 2010, 1:52 pm

When loading the map, are you using "/develoepr 1"
If not, please do so and post the exact error.

When it freezes at this point, have you tried to cause damage to the door?

Also, I have noticed you have added the "key" and "value" dmg and 100.
This means you will need to cause 100 damage for the trigger to be triggered.

Remove this value, and recompile without it.
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 10th, 2010, 5:18 pm

Okay, but just to ask, have you actually read through the tutorial that I posted the link to? It was made by a frequent visitor to these boards, and you actually commented on it twice. I will go try the map out again with no dmg value. And by the way, I am a modder, I use "+set developer 1" 24/7. I have even helped other clans out with odd errors they were getting that I noticed with this on. The error is as follows:

Code: Select all

******* script runtime error *******
undefined is not an object: (file 'maps\mp\doors.gsc', line 27)
  iprintln("5a");

  *
called from:
(file 'maps\mp\doors.gsc', line 23)
 wait 5;//20

That was compiled with nothing checked on the door and there is no "dmg" on the door.
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 11th, 2010, 4:49 pm

*bump*

So I think I'm just going to remove the door unless I can make it work.
Or I may remove the kill tags and just thread the bashable door...
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 11th, 2010, 5:15 pm

Try this script, but also answer the following questions!

Code: Select all

main()
{
   thread door_front();
   thread door_back();
}

door_front()
{
   front = getent("door_front","targetname");
   back = getent ("door_back","targetname");
   door = getent ("door","targetname");
   kill = getent ("door_kill_front","targetname");

   while (1)
   {
      kill thread maps\mp\_utility::triggerOff();
      front waittill ("damage");
      door rotatepitch (90, .5, .5, 0);
      kill thread maps\mp\_utility::triggerOn();
      door waittill ("rotatedone"); // was movedone
      
      front thread maps\mp\_utility::triggerOff(); 
      back thread maps\mp\_utility::triggerOff();
   }
}

door_back()
{
   back = getent("door_back","targetname");
   front = getent ("door_front","targetname");
   door = getent ("door","targetname");
   kill = getent ("door_kill_back","targetname");

   while (1)
   {
      kill thread maps\mp\_utility::triggerOff();
      back waittill ("damage");
      door rotatepitch (-90, .5, .5, 0);
      kill thread maps\mp\_utility::triggerOn();
      door waittill ("rotatedone"); // was movedone
      
      back thread maps\mp\_utility::triggerOff();
      front thread maps\mp\_utility::triggerOff();
   }
}
- You are turning the front and back door triggers off, but you never turn them back on.
[Also note, that you never actually turn triggers off, you only move them. So if you call the trigger off twice, you would be required to call it back on twice]

What are we trying to accomplish here?
If the door is bashed, do you want it to stay open?
If we are going to make it so the door stays open, we do not need most of this script and can simplify it all.
Tell me bascially what youwant to happen and stages, from the perspective of the player.
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, 6:12 pm

Based on the script, if you bash the door, it falls the opposite direction and kills anyone within a certain distance from it. I did not script this, but took the exact script from the TUTORIAL which, supposedly, worked already. I should have just scripted it myself, but I have never done mechanics in a map with scripts...It appears to be simple enough, but the release date for the map is supposed to be the 15 or so, so I am in a bit of a rush. So I have no idea why it turns off twice, etc. From the perspective of the player, if he bashes the door, it falls down and stays down, but if there was a player behind it, it falls and kills them and stays down.
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 11th, 2010, 8:07 pm

So, let me get this correct, you want the door to simply fall and kill someone if they are there?
Should be easy enough.

Will post a new script in a moment.
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 33 guests