New to mapping, couple questions

Avatar
Pringles
6 Posts
Posted Sep 11, 2008
This is my first post here, so hi everyone. Anyway, I'm making a map that's a bit of a departure from the normal setting of Portal, and I've found that the player in Portal is just too strong. After much Googling, I have not come up with only half solutions. I could modify the player entity to have less health, but I cannot find out how to do that. I could modify the Dedicated Console Variable for the NPC's damage, but I don't know how to do that either. I suppose it would also work to decrease the rate at which damage is recovered. Anyone care to shed any light on this?

Additionally, and less importantly, it seems that some sounds have not carried over from HL2- I can find them in the sound list, and set an ambient_generic to play them, and they work, but the NPCs that are suppose to make the sound won't. What gives?

Advertisement
Registered users don’t see ads! Register now!
Avatar
reepblue
894 Posts
Posted Sep 12, 2008
Replied 7 hours later
If you want to change the settings of portal, you have to make a mod. If you make a trigger_hurt, it will work but the damage will recover. So it is useless.
Avatar
ultradude25
63 Posts
Posted Sep 12, 2008
Replied 3 hours later
Use this command to stop health regenerating:

sv_regeneration_wait_time 7200

Means you have to not get hurt for 2 hours to regenerate health.
You also have to have sv_cheats set to 1.

Avatar
Pringles
6 Posts
Posted Sep 12, 2008
Replied 6 hours later
Thanks for the help. For the 2 hr regeneration one, (that may be just slightly too long, i was thinking around 1 hr 55 mins) is there a way to get that command to run whenever the map is loaded?
Avatar
dvlstx
183 Posts
Posted Sep 12, 2008
Replied 2 hours later
Yea. use a point_clientcommand entity, and give it the input from a logic_auto:
OnMapLoad
clientcommand name here
Command
sv_cheats 1
0
0.00
-------AND-------
OnMapLoad
clientcommand name here
Command
sv_regeneration_wait_time 7200
0.05
-------AND!!-----
OnMapLoadclientcommand name here
Command
sv_cheats 0
0.10

BUT! This will be a permenant change UNLESS! you give the same string of commands there, but changing a few key things.
1)change sv_regeneration_wait_time 7200 to whatever it normally is
2)changing the logic_auto to a logic_relay to output these commands BEFORE the map is finished. ideally, you would follow these all with the fadeout command and then dissconect. You must make it CLEAR that if the player wishes to exit early, then they must reset these BY THEMSELVES. lest we get a bunch of angry german portal players running around youtube :wink:

Hope I didn't mess up anything! I didn't actually test this, just using experience.

Avatar
nightfire
27 Posts
Posted Sep 12, 2008
Replied 1 hour later
I read somewhere that if you place the player inside a trigger hurt that is set to zero that it will prevent the player's health from regenerating while they are in the trigger.

Please tell me if I am wrong.

Avatar
Pringles
6 Posts
Posted Sep 12, 2008
Replied 14 minutes later
It seems that sv_regeneration_wait_time doesn't do anything. I tried using it (with sv_cheats set to both 0 and 1, just to be sure) and it didn't change anything. However, I was able to modify a variable that controls how much damage the NPC does to the player, so using the point_clientcommand with a logic_auto works! And whats more, if you load another map, then it goes back to it's default value automatically! Thanks a bunch!
Avatar
dvlstx
183 Posts
Posted Sep 12, 2008
Replied 1 hour later
Well, having it automatically reset will make this easier! Just make sure that if you have more than one map you put one in every... map.

And glad I could help. +1:cake: for finding the variables!

Avatar
appunxintator
142 Posts
Posted Sep 12, 2008
Replied 41 minutes later
correct me if i'm wrong, but couldn't sv_regeneration_wait_time be set to -1, which is "never" in hammer speak?

also, 8 replies (including mine) without a mod response? must be some kind of record.

Avatar
Pringles
6 Posts
Posted Sep 13, 2008
Replied 3 hours later
Ok now back to the other problem. It seems as though a lot of audio from HL2 is unusable in portal, most notably the soundscapes and npc sounds. Is there any way to get this into a Portal map, aside from creating an entirely new mod?
Avatar
Ricotez
738 Posts
Posted Sep 13, 2008
Replied 3 hours later
well, you need the sounds.manifest file from HL2, but the problem is you must include it with your map. You cannot 'zip' it into the map file, that's not yet supported, and if you include it externally, the file will be used by the entire game, resulting in issues when playing other maps. But they're working on a method to allow for inclusion of manifest file in map files.
Avatar
Pringles
6 Posts
Posted Sep 14, 2008
Replied 1 day later
Neat stuff. So who are "they" and is there any indication when they'll have it working?
Advertisement
Registered users don’t see ads! Register now!
Avatar
NocturnalGhost
200 Posts
Posted Sep 15, 2008
Replied 9 hours later
"They" means Valve's SDK department. Apparently the code has already been written, but the ETA for inclusion is "unknown".

Slightly more info here.