Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!
Moderator: Core Staff
-
Jolt
- CJ Wannabe

- Posts: 5
- Joined: August 9th, 2007, 2:37 am
- Location: US & A
Post
by Jolt » August 10th, 2007, 6:25 am
My trig2 doesn't move why?
Code: Select all
door2()
{
block = getent("door2","targetname");
trig = getent ("door2_trig","targetname");
trig2 = getent ("door2_trig2","targetname");
while(1)
{
trig waittill ("trigger");
block moveZ (128,2,0.5,0.5);
trig2 moveZ (128,2,0.5,0.5);
wait(5);
block moveZ (-128,2,0.5,0.5);
trig2 moveZ (-128,2,0.5,0.5);
trig2 waittill ("movedone");
}
}
-
9mm
- CJ Donator

- Posts: 183
- Joined: February 14th, 2006, 10:57 pm
- Location: USA
Post
by 9mm » August 10th, 2007, 6:58 am
You cant directly move a trigger, you must move a script_brushmodel and have the trigger linked to it. So you are really moving a brush and the trigger is following it. You can just use the nodraw_notsolid if you want to make it seem like there is no brush there. For this to work you will have to make a brush in radiant and call it door2_trig2_brush(unless you change script) in addition to the trigger.
try this instead(did not test)
door2()
{
block = getent("door2","targetname");
trig = getent ("door2_trig","targetname");
trig2 = getent ("door2_trig2","targetname");
trig2_brush = getent ("door2_trig2_brush","targetname");
trig2 enablelinkto();
trig2 linkto(trig2_brush);
while(1)
{
trig waittill ("trigger");
block moveZ (128,2,0.5,0.5);
trig2_brush moveZ (128,2,0.5,0.5);
wait(5);
block moveZ (-128,2,0.5,0.5);
trig2_brush moveZ (-128,2,0.5,0.5);
block waittill ("movedone");
trig2_brush waittill ("movedone");
}
}
-
Jolt
- CJ Wannabe

- Posts: 5
- Joined: August 9th, 2007, 2:37 am
- Location: US & A
Post
by Jolt » August 10th, 2007, 8:02 am
Instead of creating a new brush, could I just use door2? Btw, there is something wrong I tested and it the trig2 didn't move.
Code: Select all
door2()
{
block = getent("door2","targetname");
trig = getent ("door2_trig","targetname");
trig2 = getent ("door2_trig2","targetname");
trig2 enablelinkto();
trig2 linkto(door2);
while(1)
{
trig waittill ("trigger");
block moveZ (128,2,0.5,0.5);
wait(5);
block moveZ (-128,2,0.5,0.5);
block waittill ("movedone");
}
}
-
9mm
- CJ Donator

- Posts: 183
- Joined: February 14th, 2006, 10:57 pm
- Location: USA
Post
by 9mm » August 10th, 2007, 9:01 am
Did you make the brush? If not that is why it did not work for you. Yes you can use the door and have the trigger follow if it you wanted. I take it this is to kill people so they dont get stuck or something?
your script was close
change
trig2 linkto(door2);
into
trig2 linkto(block);
You use the name you call in the script not radiant. Try this and let me know how it goes.
Edit: Thinking about this the script will work, but you are not going to get the results you want. I will explain tomorrow about other ways to do this.
-
Jolt
- CJ Wannabe

- Posts: 5
- Joined: August 9th, 2007, 2:37 am
- Location: US & A
Post
by Jolt » August 10th, 2007, 9:48 am
Ok, still didn't work, everything moves accept the trig_hurt. Here is what I'm doing, I've made a laser and put a hurt trigger inside it but I want the laser to move so I need the trigger to come with.
-
Drofder2004
- Core Staff

- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Post
by Drofder2004 » August 10th, 2007, 1:46 pm
Code: Select all
trig2 = getent("trig2","targetname);
In your map, spawn a "script_origin"
Right-click the 2D and select, script then origin.
Now, place this origin, in the center of your trigger.
Give the origin values of..
Key: Targetname
Value: trig2_org
Now in your script...
Code: Select all
main()
{
trig2 = getent("trig2","targetname");
trig2_org = getent("trig2_org","targetname");
trig2 enablelinkto();
trig2 linkto(trig2_org);
wait 0.05;
while(1)
{
// move the trig2_org
}
}
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
-
9mm
- CJ Donator

- Posts: 183
- Joined: February 14th, 2006, 10:57 pm
- Location: USA
Post
by 9mm » August 10th, 2007, 5:29 pm
o a laser? kind of strange to name a laser as block but ok. I would guess you put the trigger the same size as the laser. For it to kill you need to make the laser non colliding.
-
Jolt
- CJ Wannabe

- Posts: 5
- Joined: August 9th, 2007, 2:37 am
- Location: US & A
Post
by Jolt » August 10th, 2007, 10:22 pm
What does this do?
Code: Select all
trig2 = getent("trig2","targetname);
-
Lethal323
Post
by Lethal323 » August 10th, 2007, 11:09 pm
Jolt that tells it to find the entitie of what you named it in the map...
Where i says
That is what you named it in the map...
Where it says
that first part
is what the script refers to it as...
-
[SoE]_Zaitsev
- Core Staff

- Posts: 14220
- Joined: October 21st, 2004, 7:17 pm
- Location: Holland
-
Contact:
Post
by [SoE]_Zaitsev » August 10th, 2007, 11:52 pm
Lethal323 wrote:Doesnt matter...
I AM ANNOUNCING THIS AS MY FINAL POST RIGHT HERE...
I AM LEAVING
MAY BE BACK LIKE ONCE A MONTH TO POST AND SAY HI...
BUT THIS WILL BE MY FINAL POST!!!!!!!!!!!!!!!!!!!!!

matt101harris wrote:big cock was the first thing that came to my head lol
-
Lethal323
Post
by Lethal323 » August 11th, 2007, 1:40 am
[SoE]_Zaitsev wrote:Lethal323 wrote:Doesnt matter...
I AM ANNOUNCING THIS AS MY FINAL POST RIGHT HERE...
I AM LEAVING
MAY BE BACK LIKE ONCE A MONTH TO POST AND SAY HI...
BUT THIS WILL BE MY FINAL POST!!!!!!!!!!!!!!!!!!!!!
Anyways, I belive I foudn his problem when I took a look at his .map He had the trigger at a patch (cylinder) Which If I am correct I dont think those can move, Because I have a player clip that was a cylinder and when I tried to make it move I couldnt. But then I made it not a patch it worked... so...
-
Coontang
- CJ G0D!

- Posts: 1797
- Joined: March 4th, 2007, 3:48 pm
- Location: Painting by numbers
Post
by Coontang » August 11th, 2007, 11:11 pm
Lethal323 wrote:[SoE]_Zaitsev wrote:Lethal323 wrote:Doesnt matter...
I AM ANNOUNCING THIS AS MY FINAL POST RIGHT HERE...
I AM LEAVING
MAY BE BACK LIKE ONCE A MONTH TO POST AND SAY HI...
BUT THIS WILL BE MY FINAL POST!!!!!!!!!!!!!!!!!!!!!
Anyways, I belive I foudn his problem when I took a look at his .map He had the trigger at a patch (cylinder) Which If I am correct I dont think those can move, Because I have a player clip that was a cylinder and when I tried to make it move I couldnt. But then I made it not a patch it worked... so...
wow a long long.....day.
JDogg: 'I have a video of me pissing, wanna see?'
-
Cpt.Cool
- CJ Worshipper

- Posts: 204
- Joined: May 31st, 2007, 2:27 am
-
Contact:
Post
by Cpt.Cool » August 31st, 2007, 2:30 pm
jimbojetuk wrote:Lethal323 wrote:[SoE]_Zaitsev wrote:
Anyways, I belive I foudn his problem when I took a look at his .map He had the trigger at a patch (cylinder) Which If I am correct I dont think those can move, Because I have a player clip that was a cylinder and when I tried to make it move I couldnt. But then I made it not a patch it worked... so...
wow a long long.....day.
you can say that again
YaNo wrote:I use Cool as my UO compiler

Try it, it works!
Users browsing this forum: Bing [Bot] and 1 guest