Teleporters and Tilted Views

Discussion in 'Mapping Questions & Discussion' started by Digaag Wa Riz, Mar 9, 2013.

  1. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    84
    Hello all, I have a problem and a question.

    I want to use a mobile teleporter (and they can be parented to dynamic entities) that is parented to a flag. The flag is the same as the regular capture-the-flag flag and the entrance stays in one place. The problem I have is that when someone is holding the flag and someone else uses the teleporter, the teleported player's view is tilted in the direction the teleporter exit was facing. This screws with movement as well.

    What I want to know is how can I correct the tilted camera angle?

    I don't know if I can use AddOutput to reorient the teleporter exit so that it stays facing directly upward constantly or there is some other way to fix the player's view.

    Note: Please give me something other than: "This is a stupid idea; just get rid of it". I'd really like to make this work.
     
  2. nightwatch

    aa nightwatch

    Messages:
    640
    Positive Ratings:
    446
    Make two teleporters, one oriented correctly for when a player has the Intel and one for when it's on the ground. Then parent both of them to the flag and change the teleporter destination each time it is picked up or dropped.
     
  3. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    84
    I'm sorry I should have mentioned this before. They are obj_teleporter entities as in the one engineers build. The problem is the teleporter moves EXACTLY as the flag moves. So if the player model flinches, the flag will move ever so slightly and reorient the teleporter as well. And the models are always moving.
     
  4. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    84
    If there is a way to disable an obj_teleporter without destroying I'd do that as well so that the teleporter can not be used while someone is carrying the flag.

    Ideally I'd like the teleporter to still be active even while a player is carrying the flag and for the exit to always be facing upward.

    Is there any way to prevent an entity from rotating vertically?
     
    Last edited: Mar 9, 2013
  5. Dr. Spud

    aa Dr. Spud Grossly Incandescent

    Messages:
    878
    Positive Ratings:
    800
    This is going to be very difficult to do in Hammer.

    You might be able to have the teleporter exit off somewhere else in the map in a blank room, and have a point_teleport parented to the flag. Then when they exit the teleporter into the blank room, you immediately teleport them to the point_teleport.
     
  6. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    84
    I found an entity called phys_keepupright. It does exactly what I need I just don't know how to use it. I want to make the teleporter exit able to move up, down, sideways, but I want it to constantly face upwards. Anyone know how to use phys_keepupright? Portal mappers might know...
     
  7. Dr. Spud

    aa Dr. Spud Grossly Incandescent

    Messages:
    878
    Positive Ratings:
    800
    I don't think phys_keepupright is going to work here. Even if you could give it a reference to the player who last used the teleporter (which I'm not sure is possible... maybe?), I can't find any evidence that the entity will work with players.
     
  8. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    84
    I'm not trying to use it on the player I'm trying to use it on the teleporter exit. If the teleporter exit is always facing upwards (as it should be) then the player should have no problem. I don't think phys_keepupright works on obj_teleporter or prop_dynamic. I think it only works with prop_physics but prop_physics can't be parented to anything.
     
  9. WhyNott

    WhyNott L1: Registered

    Messages:
    27
    Positive Ratings:
    1
    Have you tryed using SetTeam output on teleporter to set it on 0 or 1? This should make the tele nonfuncional for as long as you want. Just make sure to set the team back as it should be when you are done(2=Red 3=Blue). I'm not sure through.
     
  10. LeSwordfish

    aa LeSwordfish semi-trained quasi-professional

    Messages:
    4,105
    Positive Ratings:
    6,003
    A possibility might be using some other entity to attach the teleporter to the flag's position, without changing it's angle. What about logic_measure_movement?
     
  11. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    84
    Didn't work. I don't think 0 or 1 are valid parameters because a teleporter can not belong to no team. Even if I set the team to the opposite of the only team that was allowed to use it spies could still use it.
     
  12. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    84
    The problem is that the flag model attaches to the back of the model of the player who picked it up, so whenever the model's back moves, so does the flag and, by extension, the teleporter. I don't think it's possible to keep a static orientation on an object that is parented to a flag.
     
  13. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    84
    Does any one know how to fix the tilted camera angle that the player gets when he uses a lopsided teleporter? That's the only problem I have. That's the reason I want the teleporter to stay facing directly upwards.
     
  14. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,527
    I believe the issue is a result of the roll value being non-zero, because a player normally only has control over pitch and yaw. You could try using AddOutput to force the player entity's angles to 0 0 0. But I'm not sure how to reliably target only the player being teleported, and not anyone else, since as far as I know obj_teleporter doesn't provide any outputs for such.
     
  15. LeSwordfish

    aa LeSwordfish semi-trained quasi-professional

    Messages:
    4,105
    Positive Ratings:
    6,003
    If you were to teleport the player through a intermediary room, could you name them as they passed through the room? Then, IDK, de-name them the next time they spawn? Or a set time after passing through the room?
     
  16. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,527
    Yes, but the problem with that is you wouldn't have the full effect of the obj_teleporter. If you had a fake one on the destination player you would need to rig up all the particle effects manually and it would be difficult to make it look like real.