|
Post by fidchell on May 13, 2011 1:47:39 GMT
I heard this was a good place to ask about SourceSDK, so here I am. I hope I can finally have my questions answered. The Steam forums are worthless. I'm trying to have it where a point_viewcontrol entity takes over the player's view for an intro in my map. It goes like this: he focuses on a combine soldier walking over to an interface prop and typing on it. I then want the view to move over to a nearby screen on the left, however, it goes back to where the info_target (the camera follows the info_target) is originally spawned on the map. When the player is supposed to look at the screen, I try to set the info_target's new parent AS the screen, but I put the screen's name in the "parameter override" and it doesn't work? Second problem: Sethealth... I'm trying to get the squad leader of my team some more health since his life is vital to the mission. I've tried using a trigger right at spawn to set his health to a higher variable. Upon attacking him, he dies with the same amount of shots as always and I can't figure out what I'm doing wrong. Here's a screen: Thank you for your time.
|
|
|
Post by Zeph on May 13, 2011 10:45:06 GMT
Parenting keeps it's offset. Chaining the parent doesn't change the position of the child unless the parent moves, and then with the same offset. You'll likely need to make a func_tracktrain and path_tracks which the info_target is parented too, so that it can travel, with the train, to the screen to look at. Or if you want an instant change, simple use a second info_target, and switch which target the camera uses. EDIT: SetParent will keep the offset. SetParentAttachment will teleport the entity to the parent's origin.
What entity is your squad member? a player or NPC? what game is this for? singleplayer HL2? or multiplayer HL:DM/TF2? You may want to use a logic_auto using "onmapspawn" rather than a trigger at the start to do initializations.
|
|
|
Post by fidchell on May 13, 2011 19:06:06 GMT
Thanks for replying. Looks like we're at a good start here. It's a pain in the arse, but I suppose a tracktrain would make sense, but I think I'll try your other suggestion, what with the SetParent and SetParentAttachment inputs. That sounds like it'd work. As for the squad member, he is an NPC_Combine_S, and yes this is singleplayer HL2. EDIT: Argh! I'm trying to use a logic_auto like you said but it still isn't working. I've pretty much got the same settings down except for the output of course. (yes I have put global state to something so that it will fire)
|
|
|
Post by Zeph on May 13, 2011 21:06:38 GMT
I believe "Set Health" set's current heath value, but doesn't affect maximum health. Therefore setting it to 500, only takes it up to the miximum cap, 100. You can try the "console command": sk_combine_guard_health 1 -> A Combine Elite Soldier's spawn health or adding a keyvalue (via smartedit = off) for "health" or "maxhealth" to 500. these are just guesses.
|
|
|
Post by fidchell on May 13, 2011 22:42:34 GMT
I believe "Set Health" set's current heath value, but doesn't affect maximum health. Therefore setting it to 500, only takes it up to the miximum cap, 100. You can try the "console command": sk_combine_guard_health 1 -> A Combine Elite Soldier's spawn health or adding a keyvalue (via smartedit = off) for "health" or "maxhealth" to 500. these are just guesses. Man, when I think something is really going to work, it just never does. Yeah, I've tried adding both the health and maxhealth keyvalues and setting them to 500, but it doesn't help. Damn, I don't know what's wrong... I even tried the console command in-game and that doesn't even work. Here's the map if you want to take a quick look at what I'm doing. He's at the end of the corridor right next to the door and button. www.megaupload.com/?d=OA01AKOE
|
|
|
Post by Zeph on May 13, 2011 22:58:12 GMT
You could just make him self-heal over time.
Parent a Trigger_Hurt to him. Create a filter_Name, set it to filter to him. Add the filter to the trigger_hurt. Set the value to a negative damage (ie, heal).
He should constantly heal up, so needs a lot of damage in a short space of time to kill.
|
|
|
Post by fidchell on May 13, 2011 23:22:20 GMT
Could you add that to my map for me? I'm trying and following your instructions carefully but I can't seem to get it working.
|
|
|
Post by Zeph on May 13, 2011 23:46:20 GMT
I did it another way. LogicTimer: min refire: 2 max refire: 5 use random time: yes OnTimer -> combineelite -> set health -> 100
randomly heals him to full. He did die by himself. can tweak refire times to make it easier/harder.
EDIT:
oh and your map has serious optimisation issues. No func_Details? Box skybox? Needs sorting before you go further.
|
|
|
Post by fidchell on May 14, 2011 0:18:56 GMT
Yea, I don't know much about optimization just yet. ^^; I thought every basic brush you see is a func_detail? Well, at least it says it is when I Ctrl+T. And how do you suggest I change the skybox exactly..? EDIT: The logic timer works. Thanks a bunch. Also, I understand with the func_details. Pretty much applied it to most of the brushes now. Another question though: The squad leader runs over to a scripted sequence and I wish for him to remain in a certain pose until I get near him, but instead he gets to the location of the scripted sequence and then runs off back into battle. How do I keep him on the spot??
|
|
|
Post by Zeph on May 14, 2011 10:17:27 GMT
Not really played with AI, i'm sure there's a command for it somewhere... Try the inputs for the NPC: StartScripting StopScripting Enter/exit scripting state, where NPCs ignore a variety of stimulus that would make them break out of their scripts.
And no, not everything should be func_detail.
Imagine a house, with lots of rooms. All the interior walls should be world geometry, but everything inside them should be func_detail. If you were to hide all func_Detail's it's like running around an empty house with empty rooms. This means that each room is made up of one simple rectangular visleaf. The bad way to do it would be to make all the house func_Detail. This means that everything is rendered at once, which is bad. The other way would be to make all interior walls func_details, but then everything inside the house is rendered at once. TLDR: If it blocks visibility, world geom. If its complex (cylinder, sphere, clipped, vertex edited, etc), func_Detail.
|
|
|
Post by fidchell on May 14, 2011 13:26:47 GMT
Alright, I tried StartScripted but it doesn't help. I'll send you the updated VMF. The scripts are right next to the restroom area. www.megaupload.com/?d=MXHAZMN0There's no script he's sticking to in the beginning...so I don't know why he keeps running back. And thanks for the info on func_detail. I converted most of the brushes back to world.
|
|
|
Post by Zeph on May 14, 2011 19:40:05 GMT
I've just spent the last few hours compeltely optimising your map. You'll notice the texturing uses a LOT more NoDraw on not seen brush faces. Basically every brush, i change all sides to nodraw, and then texture the visible sides. Faces compeltly hidden by Func_Details may also be made NoDraw, as they are never seen. I've Func_Detailed your map well, including stairs, bits of detail, some walls, some lips/ledges/overhangs, etc. Use the VisGroup Manager to turn func_Details visble or not, to see the difference. When made invisible, notice there are no gaps to the outside void. I've re-done a lot of brush work, including nearly all of your flooring. Why they were so big and why they were split up so much i dont understand. Careful with clipping, ONLY select the brushes you want to cut, else you'll cut all of the ones selected. And i hope you don't use carve... Why use three brushes when you can use just one? Keep this in mind all times. I've given you a REAL skybox. See how it's done, tightly wrapping the map. Keep this up as you expand. I may have missed a few textures or changed some about. Sorry for this, i tried to keep it the same. Feel free to change some back, just remember: If it's not seen, it's NoDraw! I've tried to not touch any entities at all. Enjoy, i spent a lot of time on it. I hope you take time to look around and think "why did he do that?" and work out why. Any questions, do ask. Give me a break and i'll have a loot at ur entities again. Tip: Alt+P, fix them! www.mediafire.com/?w5b0rxcaxtxocx8
|
|
|
Post by fidchell on May 15, 2011 1:46:30 GMT
Wow I didn't think you'd actually do this for me. It looks so much better! Sorry if my crappyness offended you. I'm really pretty new at Hammer. But thanks, I see now what you really mean. If you could find out the whole scripted_sequence issue I'd appreciate that as well. Also, as you can see, when he gets to the door of the building there's a trigger on the other side. I want it to detect when the player and squad leader rushes in, then the door should close behind you and the light should go out.
|
|