My game_ui problem, OR: How do I use if, then, else statements in Hammer?

Ok so I’m making a Trade map for TF2 and the only way I found of restricting weapons, in a certain area, was to use game_ui.
The way I activate the game_ui(s) at the moment, is using a trigger_multiple directly on top of spawn. Now I read that, in multiplayer, I need to use one game_ui for each player… So i added 32 game_ui’s to my map, hoping that by some miracle, they would self configure and know which player to assign too… No such luck (:downs:), when the first player joins the game, all the game_ui’s attach to him… Leaving none for the following players.

So my question is: How do I make the game_ui’s assign to a specific player, in a server where people will constantly be joining and leaving with no rounds to reset the game_ui’s. Then only solution I could think of, was to use if, then, else statements, to assign the next free game_ui to a joining player, but I have no idea how to do that in Hammer… So if anyone know how to do that OR have another way to trigger the game_ui’s (One that is notvoluntarily :P), I would be very, very thankfulll! :slight_smile:

You could assign them based on spawnpoints? As in, have a trigger for each spawnpoint, and teleport the player out of the spawnpoint to the real spawnroom after the game_ui is assigned? I’ve never used game_ui before, but it seems like it could work…

The game_ui’s will attach themselves to whichever one triggers the event. You cannot do this through hammer, you will need to use code.

Same problem, I need a way to assign them to a specific player :slight_smile:

[editline]3rd November 2010[/editline]

And how do I use code in my map? :confused:


“…for TF2”


Edit: oh you were replying to the comment above you.

Good point.

Ok then, this is impossible.

Rework it so the idea is more streamlines and maybe, at the same time, learn that hammer is not the same as unreal.

Jeez why dont you tell him to go and learn the unreal editor instead… how small do you want to have this forum?

I want people to understand that hammer is an editor that is designed to be easy to use at the expense of advanced features.

Personally i would prefer this forum to be small but those few people know what they are on about, than large and be full of idiots.

Personally I don’t like the Unreal editor and have there fore not used it much :slight_smile: (only tried once or twice, completed the standard ut2003 tutorial)

On-topic: So does anyone have any other ideas, of how to remove (or disable) players’ weapons when they join the map?

If the entity is available in tf2, trigger_weaponstrip over the spawn area. It’s a brush entity.

Yeah I tried that, but nope; it’s not available in Team Fortress 2 :frowning:


There isn’t a solution.

If you just want to make it so no one can hurt anone else, you could always set it up so there are seperate areas for each team.

Ok…final consensus time.

What you are attempting is impossible for source without hard coding. So basically it is impossible. You do not have scripting or advanced properties (like kismet) at your disposal. Either move to a different engine, or simplify your ideas.

He said that he’s making a trade map for TF2. Making that on another engine is more impossible…

Not really…in fact it would be easier to make a new game, than to try and edit stuff that is hardcoded in source.

I won’t give up until Gaben confirms that it’s impossible :q: