Alternatives to regular pickups (help)

Discussion in 'Mapping Questions & Discussion' started by Mystic Monkey, Nov 22, 2017.

  1. Mystic Monkey

    Mystic Monkey L4: Comfortable Member

    Messages:
    169
    Positive Ratings:
    17
    Instead of usual health and ammo pickups, for my themed map I want to have an alternative and more competitive way to get these usual pickups.
    To sum it up, I made these func_breakables where I want OnBreak the !activator to directly receive the healthkit or ammopack. (Preferably to use it whenever they're full health or ammo or not.)

    Methods I tried so far are:
    • I'm familiar with "BleedPlayer", a rather obscure yet useful input thats not mentioned on TF2 or VDC wiki commands or input pages. I tested to see if there were other obscure inputs like GivePlayer or HealPlayer etc. None of them work.
    • I tried Give and Use as an input with the parameter of item_healthkit_large. Doesn't work.
    • Using a point_servercommand for the breakable to Command > give item_healthkit_full, but given the map needs sv_allow_point_servercommand on always which I do not know how to automatically do that, as well as I am aware how risky these things are, I am reluctant to use this, especially given I do not know if I can make it specifically give to the !activator.
    • I tried game_player_equip, Ithink that only works with weapons, that or just doesn't work.
    • As an alternative, I tried a point_hurt with a negative value to heal. While a negative value to heal works with trigger_hurt, it merely cause 2hp damage when done so with point_hurt. I find it stupid it works for the trigger but not for the point. (I guess thats why it's called "pointless".) Plus I do not know if I can make an alternative for ammo this way.
    • I know how to make a soundscript. Is something similar possible to get my desired outcome?
    I'm very close to just giving up and use TF2s default pick ups because no matter what I try I can't seem to get the desired outcome.
     
  2. henke37

    aa henke37

    Messages:
    1,832
    Positive Ratings:
    420
    Did you try entity templates for the healthkit entities?
     
  3. Mystic Monkey

    Mystic Monkey L4: Comfortable Member

    Messages:
    169
    Positive Ratings:
    17
    I think I already tried that.

    I set up a point_template for the func_breakable in order for it to respawn after 10 seconds, as per usual respawn time for pickups.

    When I tried making another point_entity for a named healthkit I couldn't get the healthkit to spawn where the !activator was. As far I'm aware the trigger has to target the point_template in order to ForceSpawn it, but I can't get what is forcespawned to spawn at a non-fixed location such as the player.
     
    Last edited: Nov 22, 2017
  4. Lampenpam

    aa Lampenpam

    Messages:
    993
    Positive Ratings:
    328
    You can give player hp by giving it the Addoutput input with these parameters: health x
    replace health with what ever you want. if you set it to 900, the player will have 900 hp and it will tick down like regular overheal.
     
    • Thanks Thanks x 1
  5. Mystic Monkey

    Mystic Monkey L4: Comfortable Member

    Messages:
    169
    Positive Ratings:
    17
    I did not know that.
    Is it possible to give players merely their maximum health without overheal?

    Plus, what I have in mind is func_breakables that replace medkits. I can probably remove ignition from burning players and other conditons, but wouldn't heavies need their sandviches and snacks replenished with medkits?
     
  6. Izotope

    aa Izotope Never releases maps

    Messages:
    592
    Positive Ratings:
    539
    Yes, the SetHealth input should do that.
    Use 500 as value, it automatically caps at the max health for each class.
    So it would look like this: OnTrigger | !activator | SetHealth | 500
     
    • Thanks Thanks x 1
  7. Yabayabayaba

    Yabayabayaba L5: Dapper Member

    Messages:
    240
    Positive Ratings:
    66
    I believe that inputs that hurt players such as the hurt and a fore mentioned bleed, can heal players when set to a negative value. Idk if this works for all commands, so testing is necessary. This could be used to heal players over a few seconds instead of instantly, allowing them to get killed if they do something stupid
     
  8. Mystic Monkey

    Mystic Monkey L4: Comfortable Member

    Messages:
    169
    Positive Ratings:
    17
    That does work much more efficiently than my previous attempts. I guess the reason why I didn't try it before was because I figured it only affected entity objects.
    The only problem I have is that it doesn't do all the functions medkits usually do such as give heavies something to eat.
    I do not know if there is also a SetAmmo variant either.

    But this is still the most I could get from my previous attempts, so thank you. I'm sure I could use TF_cond to remove Bleed and Afterburn from players as well.

    It works for trigger_hurt, so if you wanted an area that heals you over time then thats possible.

    However, for some reaosn, it does not work for point_hurt. When I tried it I set the damage to -500 but instead of healing it hurts me for 2hp.
     
  9. Yabayabayaba

    Yabayabayaba L5: Dapper Member

    Messages:
    240
    Positive Ratings:
    66
    Have you tried it with !activator commands placed directly on the player, this would allow you to select the person to heal.
     
  10. Mystic Monkey

    Mystic Monkey L4: Comfortable Member

    Messages:
    169
    Positive Ratings:
    17
    Yes I tried it. Unless you mean trigger_hurt in which case that would require a gigantic brush to cover the whole map.

    It healing just doesn't work on point_hurt, I did say it was somewhat pointless, but Izotope did pointed out how to use SetHealth for me and Lampenpam AddOutput with health is also useful for overhealing so perhaps thats why point_hurt doesn't heal.
     
  11. Mystic Monkey

    Mystic Monkey L4: Comfortable Member

    Messages:
    169
    Positive Ratings:
    17
    Process with these things so far:

    func_breakable Health box​
    • Restores health: Thanks to SetHealth output.
    • Noises: HealthKit.Touch for !activator and spawn_item.wav for it's 10 second respawn.
    • Heals bleeding: I tried a negative value for BleedPlayer and AddOutput removecond 25. Doesn't work.
    • Heals afterburn: As far as I'm aware, theres no "BurnPlayer" to experiment with and doubt removecond 22 would work either.
    • Give full-health heavies something to eat: I think thats the least likely acomplishment I could pull off with this.
    I tried using filter_tf_condition to stop afterburn and bleed, but I think this filter is only used for recognising players with certain conditions, unlike trigger_remove_tf_player_condition which can only be used for a specific brushed area.

    func_breakable Ammo box​
    • Restores ammo: No such thing as "SetAmmo" nor do I know if there is an Addoutput for it.
    • Restores metal: Same as above
    • Noises: AmmoPack.Touch for !activator and spawn_item.wav for it's 10 second respawn. (Pretty much false advertising. All the sounds but none the ammo.)
     
    Last edited: Nov 23, 2017
  12. Yabayabayaba

    Yabayabayaba L5: Dapper Member

    Messages:
    240
    Positive Ratings:
    66
    try spawning a template containing a non respawnable med and ammo kit at !activator. This should accomplish everything both do, but if the player health/ammo is full, it would leave behind a floating health kit. perhaps if you made it despawn after a few seconds this would work
     
  13. Mystic Monkey

    Mystic Monkey L4: Comfortable Member

    Messages:
    169
    Positive Ratings:
    17
    I think I tried something similar but I couldn't get the point_template to spawn the healthkit at the !activators co-ordination. As far as I am aware point_template is useful for resetting the state of certain things, like how I get my func_breakables to "unbreak" after 10 seconds.

    OnBreak the func_breakables ForceSpawn their point_templates which are address to themselves.

    Though I haven't tried putting !activator in the parameters of an output addressed to a point_template... would that work?
     
  14. Izotope

    aa Izotope Never releases maps

    Messages:
    592
    Positive Ratings:
    539
    There's an ExtinguishPlayer input you can use, but it plays a sound for you.

    No
     
  15. Dr. Orange

    Dr. Orange L6: Sharp Member

    Messages:
    356
    Positive Ratings:
    267
    Env_entity_maker does have an input called ForceSpawnAtEntityOrigin that spawns its referenced point_template at the specified entity origin. I'm not sure if you have tried that or not, or if it even works, but it might be what you are looking for.
     
  16. Mystic Monkey

    Mystic Monkey L4: Comfortable Member

    Messages:
    169
    Positive Ratings:
    17
    There are loads of inputs I'm not familiar. Is there a list I can find them all?

    As far as I'm aware, it is used for speed, direction, variance and other activities, but there is know key for where exactly it should spawn to begin with.
     
  17. Izotope

    aa Izotope Never releases maps

    Messages:
    592
    Positive Ratings:
    539
    You can name yourself with ent_fire !self addoutput "targetname monkey" and then do "ent_fire monkey " and then use arrow keys to browse the list of possible inputs to use to see what inputs are available. That's how I found out about lots of inputs.

    Also you can parent a env_entity_maker to players, it will spawn the contents of its associated point_template.
     
    • Thanks Thanks x 1
  18. Dr. Orange

    Dr. Orange L6: Sharp Member

    Messages:
    356
    Positive Ratings:
    267
    Env_entity_maker spawns the entities specified in the point_template at its own origin by default. This allows you to spawn multiple instances of one point_template. The ForceSpawnAtEntityOrigin input spawns the template at the entity specified in the input's parameter field. For instance, the output of the func_breakable would look something like this: OnBreak, name of env_entitymaker, ForceSpawnAtEntityOrigin, !activator
     
    • Thanks Thanks x 1
  19. Mystic Monkey

    Mystic Monkey L4: Comfortable Member

    Messages:
    169
    Positive Ratings:
    17
    How exactly do you set this up?

    I tried this and it didn't quite work.

    The func_breakable: OnBreak, hlth_mkr 1, ForceSpawnAtEntity, !activator

    The env_entity_maker (hlth_mkr 1) has is "Point_template To Spawn" with point_template (hlth_spwnr 1) with a nearby item_healthkit_full (health 1) as one of it's templates.

    However the healthkit doesn't move when the func_breakable breaks.

    ---edit---
    So I "sort of" figured it out. I think the reason why it didn't work is because I needed to set some flags on. Problem is I dunno which flags are needed and still haven't got desired results.

    Now I got the healthkit doing the slenderman thing whenever the func_breakable breaks. a healthkit is spawned but directly behind you a foot away.

    And I being a fool and missing something?
     
    Last edited: Nov 23, 2017
  20. Mystic Monkey

    Mystic Monkey L4: Comfortable Member

    Messages:
    169
    Positive Ratings:
    17
    I finally figured out how to do it in the end.

    I did set up the point_template and the env_entity_maker correctly.
    What I didn't know is that the point_template and the healthkit had to be sharing the same space. I had some help on the SDK discussions on it.

    Thanks to all who have helped me.
     
    • Like Like x 3