faceangles


(mrfin) #1

Hello mapping types

ok - I need a bit of clarification with faceangles.

I understand the directions in my maps as far as 90, 45,360,315 etc. go. But I’m having an interesting time getting my mover to face the right direction when it is moving.

Seems I can have it pointed the right way when it is parked up, but then swivells round when activated or vice versa.

Have altered the “faceangles …” in the spawn script and am running out of variations to try - patience I have lots of… :angry: …or so I thought… :beer::cool:

btw…the mover is made of a set of brushed with a model2 key and another visible mover atachtotagged to the first.

Any help/ideas much appreciated :cool:


(Chruker) #2

Are you using a tank prefab?

Could you perhaps pack the map, or show us the script part which relates to the tank?


(mrfin) #3

Hi Chruker

I’ts not a tank prefab. It’s a custom mover made from a set of brushes put together in radient.

I have given the mover a model2 key so I can use a tag for the smoke and other entities

I have also made a duplicate visible mover and attachotagged it to the first with the model tag.

trouble I’m having is getting their orientation right…1 or the other will be the wrong way round!!

What do the 4 sets of figures in the faceangles script represent?
The lorry mover in the map is fine btw - works

I’ll gladly email you this effort if you like…it’s the “working” (will be) version with all details stripped out and is in early stages - mover paths arent completed, spawns not set up, obstacles etc… The script is also in a mess…presently.

I do have a 95% completed map for these entities to be pasted into though.

anyway…let me know if you want a look and I’ll post the bits to you.

Thanks


(Mean Mr. Mustard) #4

You need to orient your script_mover to face ‘east’(angle = 0) in your .map file You can then use the faceangles command in the .script file to point it in the correct direction in game. It appears that the angle key in the entity is over written if the mover is going along a path.


(mrfin) #5

ok Mr Mustard

I set the orientation of movers to 0 but how do I set the script faceangles

This line of script presently looks like this: faceangles 0 270 0 50

Thanks for help


(Chruker) #6

The syntax of the faceangles command is:

faceangles <pitch> <yaw> <roll> <duration|gototime> [accel|deccel]
The entity will face the given angles, taking 'duration' milliseconds to turn. If the GOTOTIME is given instead of a timed duration, the duration calculated from the last gotomarker command will be used instead. Use accel or deccel to make the turning non-linear.

So your script command will turn the entity to 270 degress, in 50 milliseconds.


(Chruker) #7

Note: When the entity is following the spline path, its orientation is handled by the spline system and you don’t need the faceangles command.

I’ll gladly look into it for you.


(mrfin) #8

excellent…thanks Chruker

I have the thing working - kind of… The mover (one that has the model2 key and is the ‘train’ entity in the script) starts off the wrong way round still.

The visible mover that is attached to it is the right way round though

It’s all still a mess…I will send you the necessary bits and bobs so you can have a good laugh :smiley:

remember …this is just the entity part of the whole map so it will seem a bit odd.

Axis spawn is nearest the train btw. Eventually there will be 4 spawn points that move between teams as movers pass targets - this is the plan anyhow

Will email you a folder called ‘that bloody train’…thanks for the help :cool:


(LaggingTom) #9

If it’s rotating the wrong way, make the number it’s opposite… I think that works. Like instead of “270” use “-270”


(Chruker) #10

I’ve been taking a look at your map, and there are a couple of problems. First of all, I can’t seem to replicate the error you have with the train starting of the wrong way round.

This is what it looks like, before I made any changes:

Besides the missing texture, the train text and the fact that the train appears to be at full health, it seem to point in the right direction. Even when its repaired, destroyed or escorted it still points in the direction.

Assuming that the train needs to be repaired before it can move. So it needs to have its health drained, which I do by changing the spawn function in train_construct. I’ve added a ‘wait 500’ and ‘kill tank’ to it.

The md3 you are using doesn’t contain any tags, which is why the entities you try to attach with ‘attachtotag train tag_train’ are moved to the center of the map. This is why the tug icon appeared there after the train has been repaired. Anyway, I replaced the md3 with a homemade one, that contains two tags - tag1 and tag2. Using this md3 as model2 I can attach the entities properly. You can download the md3 and corresponding tag file here:
http://junk.chruker.dk/files/mapping/enemy_territory/2tags.zip

After you have updated the script_mover entity to use this new md3, remember to change all of the ‘tag_train’ in the script to ‘tag1’

In this function:

trainb
{
	spawn
	{
	faceangles 0 270 0 50
	wait 100
	attachtotag train tag1
	}
}

You can remove the faceangles command, since it gets its orientation from the tag it attaches itself to.

In the map you need to change the origins of the trigger_multiple and trigger_objective_info brushes. At the moment they are not exactly deadcenter on the script_movers.

You also need to remove the solid and axis spawnflag of the trainb script_mover. Or else the train can’t be hurt (the brushes of trainb were protecting the train script_mover).

----- More notes are coming, I just need to take a break while I’m eating a snack. -----

Actually, I think that was it for now. :slight_smile:


(Lock Ness Monster) #11

hey i got osme questions im trying to make a working train that loops like the one in Subway, how can i get it to turn and look like its going up hill, down hill, and around corners, i know it deals with face angles, but how do u read those little buggers


(Chruker) #12

You should only use faceangles for very simple animations. What you want is to use the splinepath system. Have a look in the Level Designer Reference, for information about how to use that.

I just checked the subway map, and it too is only using the splinepath system.


(Lock Ness Monster) #13

well i did make a map that use the splines, but it wants to jump from spline to spline instead of move normal, do u or anyone know y, cause i read that thing and i dont know what to do now


(Malverik) #14

your speed may be too high

in this line: followspline 0 splnb0 125 wait length 304
the speed is 125, which i think is the speed of the truck in goldrush


(Lock Ness Monster) #15

its not, i got it at 100 to make sure, do i need spline_mains for it also?


(Lock Ness Monster) #16

its not, i got it at 100 to make sure, do i need spline_mains for it also?


(Malverik) #17

lol, you only need spline main!
spline control are used to make a curved line between 2 spline_main

see ldr http://www.planetquake.com/simland/ldr1_1/splinepaths.htm


(Lock Ness Monster) #18

then y does my train want to jump from point to point?, i got the speed at 100


(Chruker) #19

Are you using info_train_spline_main entities for your spline points?


(Lock Ness Monster) #20

yes