Please or Register to create posts and topics.

Facing the player.

Page 1 of 2Next

In hammer, does anyone know how to change the angle of an object so it is always facing the player no mater where the player is? I didn't think it was possible, but I'm trying to make a boss fight, and I was studying the bossfight from the campaign and wheatly did that. I want to do this so the boss I'm making doesn't look up or down to look at the player, but just to rotate along the z-axis.

Try parenting it to a func_tank entity. Give it a pitch rate and range of 0 to prevent it from moving up and down, a yaw range of 360, and the yaw rate will determine how fast it can turn. The output OnFire will tell you that it's facing straight towards the player.

Note that you will have to add in an extra KeyValue without smartedit: "bullet 0". I still don't fully understand why, but it's necessary.

Falsi sumus crusto!

Ok, thank you, however. how do you get the func_tank to face the player. Now that I know that is what I need to use, I have tested around to try to figure it out, and I have looked for tutorials and explanations online. Unfortunately, I am not finding anything. Does anyone know how to get the func tank to follow the player?

Send an input to the func_tank as "SetTargetEntity", with parameter !player. No, that exclamation isn't a typo, remember to include that as well!

Image

Yes, that was one of the things I tested. Unfortunately, it didn't work.

Then send it an Activate input.

Falsi sumus crusto!

My first thought when you said "active input" was an input that wasn't deactivated. I was using a logic auto for the input, so that couldn't be the problem. So I tried putting a trigger_multiple around and having it output "on touching". That sounds like it would be active. But that isn't working either. Sorry, I've only been using hammer for a couple months, so while I understand a lot about it, I don't get some of the finer details. What do you mean by "active input"?

And if it is one of the things I think it means, then I tried that too. I am thankful for the help so far though.

Sorry, what I mean is that the input itself is named Activate.

As in, place a logic_auto. Then add an output: OnMapSpawn > [func_tank] > Activate > [no parameter] > 0.00 > No. :)

Falsi sumus crusto!

Yea, that worked. Lol, I feel a little dumb now for misreading your post and not thinking of that myself. Thanks a lot for all the help.

Page 1 of 2Next