Forum posts

Posted 16 years ago2008-06-24 02:15:39 UTC
in Holding weapons improperly Post #251799
He inherits all of the base animations of NPCs simply by being one. An anim exists for him shooting a gun, and even if it didn't, an attachment does. If you view him in model viewer, he has a hand attachment coded into his .qc that allows him to hold a gun (or anything else with attachments). BUT, instead of holding it properly, he spins it backwards, for reasons unknown.
Posted 16 years ago2008-06-23 16:12:29 UTC
in Holding weapons improperly Post #251785
Ran into a strange issue when working with hammer...I've spawned a pistol and an NPC_Breen. When I set off the pistol to attach to breen's hand, he holds it backwards, like he's going to shoot himself in the armpit. I can't for the life of me figure out how to fix this, or even why it happens to begin with (when I test in model viewer, everything works fine.) Any ideas?
Posted 16 years ago2008-05-23 17:41:08 UTC
in Targeting system Post #250343
...actually, that made perfect sense. uhm...let's uh...see if it works.

be back.

(thanks!)
Posted 16 years ago2008-05-23 15:58:31 UTC
in Targeting system Post #250336
Currently working on an experiment into giving HL2 an auto-targeting system. As it stands, I've got my player locked into a game_ui as soon as the test map loads, freezing him in place. I want to map PressedLeft and PressedRight to cycle up and cycle down, respectively, through available targets.

The theoretical method is this:

I create an enemy (example, npc_zombie). I parent an info_target to my npc, giving them corresponding names (zombie1, target1). Now, as soon as the zombie can SEE the player, I shoot a command to the target (fireuser1, onuser1) to tell the target to add itself to a list of all currently available targets. The player would press either A or D (default mapping) to cycle up or down through the targets, and his Z-axis rotation would be turned accordingly to point him directly at his chosen target.

Where this all breaks down is after I attach the targets. I haven't been able to find any entity that would behave as a list, nor have I been able to find a way to calculate the proper orientation for the player and force them towards it.

I realize that I could probably do all this with some source code modifications, but I wanted to see if it was possible to do based purely on entities. So far...no good. However, if anyone has any insights, I'd love to hear them and further along my experiment. Thanks.

(PS. The info_targets could probably be eliminated, too, but I like the idea of having the player oriented with the dead-center of the zombie, which is where I would spawn my targets.)