Welcome, Guest. Please login or register.

Author Topic: Assign entity to individual players  (Read 2811 times)

Offline Orange

  • Elder surfman of the states
  • Elder Statesman
    of the Surf
  • *****
  • Posts: 1,640
  • Elder statessurf of the man
    • View Profile
Assign entity to individual players
« on: August 05, 2012, 01:13:51 PM »
I want to make one last map, and it's gonna be a combat map. I will be integrating all of the ideas I had that never made it to Hammer to make it as big and complete as possible. One of those ideas is this:



Each player gets assigned a mechanical moving "pole" that will be moving along a rectangular line on the floor, with a reward of some sort in the middle of that barrier. As soon as the player walks through the trigger that encloses the area, the pole will start moving towards him, to block him from getting to the reward. No matter where the player walks, the pole will follow him to make sure the player will not get past it. The only way to turn off the pole and get past it is to pull a lever somewhere in the map. The player will have to surf to get there, and it will obviously be a difficult task to do so. When the player pulls the lever, only "his" pole will be turned off, and so only he will be able to walk past it and grab the reward. I will be enclosing this area in a building or something, so that the player cannot simply gather enough speed by surfing and fly past the pole.
There are a couple of concerns I have with this though. One being that I suck with entities, and not having seriously mapped for a year + makes this even worse. The other concerns:
  • Is it even possible to assign an entity to individual players? If not, you can stop reading from here;
  • The amount of poles in the game will be determined by the amount of players on the server. Can entities simply be spawned when a new player joins the game, and can it also be removed when a player leaves?
  • Can a pole only be solid to the player it is assigned to? I don't wanna end up with the possibility that one player can use his pole to block someone else who has turned off his own pole.
If there is a way to do this, I'm going to need someone to help me out with the entity work when I start working on them. I know there are some great entity geniuses here, and you will be credited in the map and on here/fagbanana!

Also, I'm not on a very powerful computer (shitty laptop), but Hammer runs surprisingly well with smooth camera view and without hangups. I think compiling will fuck my laptop up even more than it did with my more powerful pc though, so I'm gonna need a better compiler. I've heard some good words about vbct10, but I can't find a download link. Can anyone give me one?

I think the map will be called surf_DPRK. It will be North Korea themed, with large concrete structures and several North Korean communist ornaments. I might even ask someone to make me a model of the sculpture of the Dear Leader. \
You might think such an advanced mechanism with the poles doesn't fit in a map about the subordinated (?) North Korea, but this map will be futuristic. When you think of this, it will make sense because only North Korea will be stupid enough to develop such stupid and useless techniques to use as a barrier, instead of a force field or something. (Am I still making sense..?)
« Last Edit: August 05, 2012, 04:11:31 PM by Orange »
Surfing states of the elder men

Offline RazerSurf

  • Elder Statesman
    of the Surf
  • *****
  • Posts: 1,776
  • mapper of surfs
    • View Profile
Re: Assign entity to individual players
« Reply #1 on: August 05, 2012, 07:02:44 PM »
ORANGE YOU BEAUTIFUL THING! YES!

Offline Exither.

  • Modders
  • Full Member
  • *
  • Posts: 385
    • View Profile
Re: Assign entity to individual players
« Reply #2 on: August 05, 2012, 07:49:39 PM »
i would say there first two points are possible

not really sure about the third one :/

Offline Tioga060

  • America #1
  • Full Member
  • ***
  • Posts: 328
    • View Profile
Re: Assign entity to individual players
« Reply #3 on: August 05, 2012, 07:55:35 PM »
God damn poles, am I right germans?

Offline S.T.A.L.K.E.R.

  • The Sexiest Man "Alive"
  • SolidSurf Elite
  • Elder Statesman
    of the Surf
  • ******
  • Posts: 2,830
  • daddy is home :^)
    • View Profile
Re: Assign entity to individual players
« Reply #4 on: August 05, 2012, 08:06:24 PM »
God damn poles, am I right germans?
Pollocks? lel

Offline Orange

  • Elder surfman of the states
  • Elder Statesman
    of the Surf
  • *****
  • Posts: 1,640
  • Elder statessurf of the man
    • View Profile
Re: Assign entity to individual players
« Reply #5 on: August 05, 2012, 08:23:38 PM »
God damn poles, am I right germans?
What else should I call them? Sorry for not being American, but DUTCH.
Surfing states of the elder men

Offline Kompile

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Assign entity to individual players
« Reply #6 on: August 06, 2012, 05:24:45 PM »
Here's what I would do, it doesn't use poles or anything but it has the same effect. https://www.dropbox.com/s/7aw0tgxe9dui9iv/orange.vmf

Players have to press the button to gain access to the reward (sniper rifle). The button changes the players target name, and the door and triggers filter against it.

Offline Orange

  • Elder surfman of the states
  • Elder Statesman
    of the Surf
  • *****
  • Posts: 1,640
  • Elder statessurf of the man
    • View Profile
Re: Assign entity to individual players
« Reply #7 on: August 07, 2012, 05:12:43 AM »
Appreciate it, but I'm not looking for an alternative. I just want to know if this specific idea is doable in Hammer.
Surfing states of the elder men

Offline NexXT

  • Jr. Member
  • **
  • Posts: 89
  • I spy du du ru...
    • View Profile
Re: Assign entity to individual players
« Reply #8 on: August 11, 2012, 01:37:54 PM »
Your idea is possible and not to hard to make.
Im gonna tell you a version were players have no weapons (including knife) and one were they have, depending on what you need.
stripped:
Your players spawn stripped and fall into a knife while in freezetime. This knife will give them a targetname and spawn a pole which will be parented to them. After falling through the knife forced to pick it up, they will fall into a weapon stripper, which removes the knife. This all happens in the freezetime.
Then parent a func_phsybox which is clipped into a track surrounding the reward. Make shure that they are not solid(A trigger surounding the pole which is parented to the physbox will keep the players out) or the poles might block themselves. Thats already it, when he pulls the lever his physbox is killed. In this system later players can join, since the knifes at spawn cant be reached by other players. Make shure they are not reachable by other players or they will have 2 poles !!! Also, when a plaer leaves, his pole will have no effect on others . The pole wont be available to other players anymore though.
other:
In the other version you simply dont strip the knife, but they could kill themselves

If you didnt get what i said i can make you a prefab once im back from vacation or ill try to explain it better.

cheers \

[edit]
There is also a much more complicated way were triggers around the pole filtered to the player will trigger boosters to move the physbox. But in that version the poles get spawn every time the player enters the building so the boosters dont fuck up
« Last Edit: August 11, 2012, 01:45:47 PM by NexXT »

Offline Orange

  • Elder surfman of the states
  • Elder Statesman
    of the Surf
  • *****
  • Posts: 1,640
  • Elder statessurf of the man
    • View Profile
Re: Assign entity to individual players
« Reply #9 on: August 11, 2012, 01:42:44 PM »
Wow that sounds good! I'm not sure if I get the entire thing after reading only once, so I'll have to fool around with it a bit. If I really can't get it to work, I'll ask you again! Thanks man!
Surfing states of the elder men

Offline NexXT

  • Jr. Member
  • **
  • Posts: 89
  • I spy du du ru...
    • View Profile
Re: Assign entity to individual players
« Reply #10 on: August 11, 2012, 04:12:40 PM »
Shure thing >)