entity angels problem

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

Moderator: Core Staff

Post Reply
Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

entity angels problem

Post by Moustache » August 13th, 2011, 2:38 pm

EDIT: Question 1 and 2 are solved (the answers are in the next post).

3. I do have a new problem now :oops:
I have made an escalator with different angels.

For example: the entity escalator_1_1 is turned on the x axis for 30 degree. So the angels should not be (0,0,0).

As a test I made this script:

Code: Select all

	test = getent( "escalator_1_1", "targetname" );
	
	if( isDefined( test ) )
		IPrintLnBold( "test ^2is defined" );
	else
		IPrintLnBold( "^1FAIL" );

	if( isDefined( test.angles ) )
		IPrintLnBold( "test.angles ^2is defined = " + test.angles ); // the output is: test.angles [color=#00FF00]is defined = (0,0,0)[/color]
	else
		IPrintLnBold( "^1FAIL test.angles" );
	
How is it possible that the angels are (0,0,0) ?





SOLVED:
I have a few questions related to my deathrun map I am working on :)
Hopefully anyone can help me.

1. How can you make a sound that you only hear till a certain distance?

I have this in my csv:
burning_jet_engine,,burn/jet_engine.wav,0.7,0.75,,0.95,1.05,100,250,music,,,,,,,,,,,,,,,,50,100,0.55
En this in the script:

Code: Select all

	object[1] playSound( "burning_jet_engine" );
	IPrintLnBold( "object playSound( burning_jet_engine )" );
I see the IPrintLnBold and I hear the sound. But I hear it in the entire map, is there a way to fix this?

2. How can you make an fx always visible from any distance?
Because now I have made a flame fx with a light effect in it. The light is visible from any distance only the flames aren't. The fire element in the fx is a Billboard Sprite.
Last edited by Moustache on August 16th, 2011, 11:50 am, edited 3 times in total.

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: 1 sound and 1 fx question

Post by Rezil » August 15th, 2011, 7:51 pm

1. csv question:
name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,
masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage
So, your vaues to change would be dist_min and dist_max.
- Dist_min is the distance at which the sound will still play at max volume.
- Dist_max is the distance at which the sound will no longer be heard.

Graphically(sort of):
[sound origin]<--max volume-->dist_min<--sound fading the further you go-->dist_max<--sound no longer heard.

As for your problem, check if you are actually calling the sound on a valid entity(isDefined(ent)).

2. fx:

There is a cull distance input box somewhere in FXEd. I'm pretty sure it's on the very first tab. You could also have modified settings in CoD2/4.
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.

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: entity angels problem

Post by Moustache » August 16th, 2011, 11:29 am

Thank you for your reply :)

1. FIXED
There was indeed a problem in the csv file.
It works perfect like this:
burning_jet_engine,,burn/jet_engine.wav,0.75,0.8,,0.9,1,72,1600,auto,,,,,,,,,,,,,0.2
2. FIXED
In CoD4 it is called range. I thought that was the range of how far the fire would go but it was the visibility (max value on 0 is infinite).

3. I do have a new problem now :oops:
I have made an escalator with different angels.

For example: the entity escalator_1_1 is turned on the x axis for 30 degree. So the angels should not be (0,0,0).

As a test I made this script:

Code: Select all

	test = getent( "escalator_1_1", "targetname" );
	
	if( isDefined( test ) )
		IPrintLnBold( "test ^2is defined" );
	else
		IPrintLnBold( "^1FAIL" );

	if( isDefined( test.angles ) )
		IPrintLnBold( "test.angles ^2is defined = " + test.angles ); // the output is: test.angles [color=#00FF00]is defined = (0,0,0)[/color]
	else
		IPrintLnBold( "^1FAIL test.angles" );
	
How is it possible that the angels are (0,0,0) ?

User avatar
SoMac
CJ Worshipper
CJ Worshipper
Posts: 298
Joined: June 21st, 2011, 10:26 pm
PSN ID: Kronic_Krew
Location: Chicago, Illinois

Re: entity angels problem

Post by SoMac » August 16th, 2011, 6:00 pm

KillerSam wrote:
Moustache wrote:How is it possible that the angels are (0,0,0) ?
Good question.


Image
:lol: :lol:
Kevin
Cod Jumper <3
Favorite Old Sig
Image
For £1400 I would want a gaming rig, 3 monitors, a music system,
a luxury chair and a large desk... and some fucking change.-Drofder2004

IzNoGoD
CJ Worshipper
CJ Worshipper
Posts: 343
Joined: January 6th, 2009, 8:39 pm
Location: Netherlands/Holland

Re: entity angels problem

Post by IzNoGoD » August 16th, 2011, 9:54 pm

You have it rotated in radiant or by script?
Cause everything that is not defined in radiant (like the .angles/angels) is automatically set to zero. This is why on most maps all entities have origin (0,0,0)
LMGTFY!

Its not a glitch... Its the future!

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: entity angels problem

Post by Rezil » August 16th, 2011, 9:55 pm

Check if the entity has a set 'angle' value in Radiant.
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: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: entity angels problem

Post by Drofder2004 » August 16th, 2011, 11:06 pm

Most entities are "0" based.

Basically, their origins and angles are local to their current position.
So the angles of a model are alway (0,0,0) relative to themselves.

One way of looking at it, is a bearing of the entities forward, and NOT a bearing of 'north'.

If you are going to script the angles, the easiest thing to do is make the angles (0,0,0) in radiant and then when the map loads, change them. You may also be able to set the angles key/value and you may also need to use a origin brush (a small brush made of origin texture, placed somewhere on your model, and is also made to be part of the script_brushmodel).
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

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: entity angels problem

Post by Moustache » August 17th, 2011, 9:19 pm

Thank you guys for all the reply.
@KillerSam: Right click -> Set as Desktop Background. Thank you, I like it on my 47inch full hd screen :mrgreen:

After reading the comments I knew what I did wrong.
I first placed the object on the position I wanted it in the radiant. Also rotating it the way I wanted it. After that I added the angels, that was the problem. I should not rotate the object in radiant, only fill in the angels in the entity screen.

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests