Page 1 of 1

entity angels problem

Posted: August 13th, 2011, 2:38 pm
by Moustache
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.

Re: 1 sound and 1 fx question

Posted: August 15th, 2011, 7:51 pm
by Rezil
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.

Re: entity angels problem

Posted: August 16th, 2011, 11:29 am
by Moustache
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) ?

Re: entity angels problem

Posted: August 16th, 2011, 6:00 pm
by SoMac
KillerSam wrote:
Moustache wrote:How is it possible that the angels are (0,0,0) ?
Good question.


Image
:lol: :lol:

Re: entity angels problem

Posted: August 16th, 2011, 9:54 pm
by IzNoGoD
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)

Re: entity angels problem

Posted: August 16th, 2011, 9:55 pm
by Rezil
Check if the entity has a set 'angle' value in Radiant.

Re: entity angels problem

Posted: August 16th, 2011, 11:06 pm
by Drofder2004
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).

Re: entity angels problem

Posted: August 17th, 2011, 9:19 pm
by Moustache
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.