Texture question

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

Moderator: Core Staff

darkpheonixz4x
CJ Newbie
CJ Newbie
Posts: 51
Joined: July 2nd, 2012, 11:15 am

Texture question

Post by darkpheonixz4x » September 4th, 2012, 11:11 am

How do you make a part of a brush or a whole brush that allows you to go through it? It's very common in deathrun and I thought i would add that for my map. I also want to know how you can script to make it go through after a trigger. Thanks :)

darkpheonixz4x

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Texture question

Post by Rezil » September 4th, 2012, 11:18 am

In radiant by right clicking on the selected brush and setting it to 'non-coliding'. If you want it to be a bit more flexible you have to create a brushmodel and call 'notsolid()' on it in code.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

darkpheonixz4x
CJ Newbie
CJ Newbie
Posts: 51
Joined: July 2nd, 2012, 11:15 am

Re: Texture question

Post by darkpheonixz4x » September 4th, 2012, 11:23 am

Thank you,

Lets say i make the brushmodel with targetname brush1.
To make it non-colliding with the script, it would be brush1 notsolid;

Is that right?

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Texture question

Post by Rezil » September 4th, 2012, 11:29 am

Code: Select all

getEnt("brush1","targetname") notsolid();
This should work wherever you decide to place it in your .gsc file.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

darkpheonixz4x
CJ Newbie
CJ Newbie
Posts: 51
Joined: July 2nd, 2012, 11:15 am

Re: Texture question

Post by darkpheonixz4x » September 4th, 2012, 12:18 pm

Okay here is my script for my trap.

Code: Select all

main()
{
 thread platform_hollow();
}

 platform_hollow()
{
 trig = getEnt("trig_trap2","targetname");
 {
  trig waittill ("trigger");
 }
}
My brush that I want to get hollow after the trigger is trap2_plat1. Where do i add it? If i had it right after trig = getEnt... wouldn't it always be hollow?

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Texture question

Post by Rezil » September 4th, 2012, 12:30 pm

Code: Select all

main()
{
        thread platform_hollow();
}
 
platform_hollow()
{
        trig = getEnt("trig_trap2","targetname");
        {
                trig waittill ("trigger");
                getEnt("brush1","targetname") notsolid();
        }
}
The brush will be set to 'not solid' only after the player has triggered the 'trig' entity.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

darkpheonixz4x
CJ Newbie
CJ Newbie
Posts: 51
Joined: July 2nd, 2012, 11:15 am

Re: Texture question

Post by darkpheonixz4x » September 4th, 2012, 12:52 pm

Thank you for this.

I tried this, but i get Undefined is not an object. The error is on line 10 and i have rechecked a million times that the targetnames are the same. Any ideas??

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

Re: Texture question

Post by Drofder2004 » September 4th, 2012, 1:00 pm

Open your map in radiant and check the spelling of your entity key and value.
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

darkpheonixz4x
CJ Newbie
CJ Newbie
Posts: 51
Joined: July 2nd, 2012, 11:15 am

Re: Texture question

Post by darkpheonixz4x » September 5th, 2012, 7:24 am

Thanks, but the original trigger doesn't work itself. The map runs fine, no errors but the triggers don't work as well as the hintstring doesn't show. Only this one doesn't work. Any ideas of what to do?

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Texture question

Post by Rezil » September 5th, 2012, 12:07 pm

How do you create your trigger?
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

darkpheonixz4x
CJ Newbie
CJ Newbie
Posts: 51
Joined: July 2nd, 2012, 11:15 am

Re: Texture question

Post by darkpheonixz4x » September 5th, 2012, 12:43 pm

Made a trigger brush, right click < Trigger_use. Enter its key/values.

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Texture question

Post by Rezil » September 5th, 2012, 6:12 pm

Hm, does it give a script error or does the trigger disappear when you play the map(still visible in radiant though)?
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

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

Re: Texture question

Post by Drofder2004 » September 5th, 2012, 8:35 pm

Post screenshots of the entity window and the brush selected.
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

darkpheonixz4x
CJ Newbie
CJ Newbie
Posts: 51
Joined: July 2nd, 2012, 11:15 am

Re: Texture question

Post by darkpheonixz4x » September 6th, 2012, 5:22 am

Okay here is the screenshot and the script i made for it.

Code: Select all

trap_1()
{
	bounce = getEnt( "trap1_bounce" , "targetname" );
	trig = getEnt( "decision_trap1_trig" , "targetname" );

	while( isDefined( bounce ) && isDefined( trig ) )
	{
		trig waittill( "trigger" , player );

		if( isDefined( player ) && isPlayer( player ) )
			player iPrintLn( "You triggered decision_trap1_trig and activated trap1_bounce" );

		bounce rotatePitch( -90 , 1 , 0 , 0 );

		bounce waittill( "rotatedone" );

		wait( 5 );

		bounce rotatePitch( 90 , 5 , 0 , 0 );
	}
in main(), I put thread trap_1();

And the screenshot is attached.
You do not have the required permissions to view the files attached to this post.

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

Re: Texture question

Post by Drofder2004 » September 6th, 2012, 3:07 pm

Change

Code: Select all

while( isDefined( bounce ) && isDefined( trig ) )
To

Code: Select all

while(1)
At this current moment, we are not going to see the errors because you will bypass them with the above code.
Removing checks for "defines" will flag errors for undefined entities.
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