Please or Register to create posts and topics.

Launch console commands?

PreviousPage 2 of 3Next

A related question: Is it possible to intercept when a player uses the +Use button? Similar to how game_ui allows us to intercept fire1 and fire2?

Thanks again!

Parent a func_button to the player, SetParentAttachmentMaintainOffset it just in front of the "eyes," lock it to stop intercepting +use.

Falsi sumus crusto!

Thanks again!

I'm having a bit of trouble with parenting to the player. I thought the parent should be "!player" but apparently that doesn't work. The button works, but it doesn't follow the player. How do I do this? Also, how do I solve this for multiplayer?

In coop you can refer to each player by red and blue. In order to attach something to them use for example a logic_auto with similar outputs to these:

- OnMapSpawn > [func_button_name_here] > SetParent > red
- OnMapSpawn > [func_button_name_here] > SetParentattachmentMaintainOffset > eyes

Same for the blue player.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Thank's for the quick reply!

I tried using a trigger to parent my func_button to red but that didn't work. Neither to blue.
I get this error in console: "Entity func_button(pl1_button) has bad parent blue". I'm guessing it's a syntax error?

Oh perhaps I forgot to add the exclamation mark before the "red"? :D

!red

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Yeah, well I tried with the exclamation mark, but the error was the fact that I didn't realize that I couldn't use !red and !blue while testing the map as single player :) For now I parented it to !player and it works.

However, I'm having trouble with the attachment part. When Using SetParentAttachment to "eyes" the button hovers "in" the eyes and the player get stuck in it. When using SetParentAttachmentMaintainOffset to "eyes", the button hovers a bit above the player instead.

In neither case is it usable.

Does this have to do with where I place the brush entity in Hammer?

I don't think it has to do with where you placed the entity in hammer, but more with the place the player was in the moment the output was fired. Try to keep the player stuck or something while the attachment is being fixed in order to discard this possibility ;)

However, in order to find a better attachment point for the players, you can use the model viewer and load whatever player model, then go to the "attachment" tab and check their names and locations easily in the model.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

It seems that "eyes" is the best attachment point.

The problem remains, though. I found that by moving the button's Origin point I could get it a bit away from the player, so I won't get stuck. However, if I move to quickly, or if I jump, the button doesn't move quick enough so I get temporarily stuck until the button catches up.

And still, it's no longer usable.

I really appreciate that you try to help me though! :) Thanks!

Oh, and this is by using SetParentAttachment. If I use SetParentAttachmentMaintainOffset, the button ends up at a distance equal to the distance between the button and the info_player_start in Hammer.

PreviousPage 2 of 3Next