Garry's Mod

Garry's Mod

Zombie/NPC Invasion+
(bees) 2016 年 1 月 21 日 下午 1:44
BUG: Proficiency and squad name overridden
When spawning combine and metropolice npcs by putting in their Id npc_combine_s (rather than using the dropdown box, mines a ♥♥♥♥♥♥♥♥♥♥♥), npc squad names are left (or overridden) by the default overwatch squad name, and their proficieny remains average (checked using npcs tools). I'll try it with other forms of combine npcs like the using metropolice pack or something and see if its just the generic npc_combine_s ID that has problems.
< >
正在显示第 1 - 15 条,共 28 条留言
(bees) 2016 年 1 月 21 日 下午 1:47 
Yea so using the drop down box to select another form of npc_combine_s (used williwakers arc mercs) didn't fix the problem. Npc proficiency stayed the same, and they remained squadless.
moomoohk  [开发者] 2016 年 1 月 21 日 下午 2:55 
Damn. I'll have a look.
unknown 2016 年 1 月 21 日 下午 5:00 
I just looked at your implementation moomoohk and it appears that mistakes were made. Why are you attempting to pull the
squad_name
var from
npc_info
which results in a null pointer when the data you want is in
spawn_list_entry

Sorry for the formatting... steam isn't exactly github markup and certainly isn't designed for code snippets.... :/

By changing the array called to from the former to the later within my offline instance the squad system acts as expected as the actual Squad Name is assigned rather than Null.
最后由 unknown 编辑于; 2016 年 1 月 21 日 下午 5:18
moomoohk  [开发者] 2016 年 1 月 22 日 上午 3:19 
Yeah, you're 100% correct. I was half asleep when I worked on it last night. Updating now.
(bees) 2016 年 1 月 22 日 上午 3:50 
Bad news,
still nothing

lua/autorun/server/init.lua:358: bad argument #2 to 'SetKeyValue' (string expected, got nil)

Third times the charm :p
moomoohk  [开发者] 2016 年 1 月 22 日 上午 4:19 
Eugh. This next update should do it.
I should stop writing code past midnight.
(bees) 2016 年 1 月 22 日 上午 4:42 
Fixed, nicely done!
(bees) 2016 年 1 月 22 日 上午 5:08 
Also, regarding the problem of spawnflag 256 not working, maybe have a gander at the code for the npc tool silverlan made, i know the spawnflag works when used with the npc creator from that, maybe it can provide some insight?
moomoohk  [开发者] 2016 年 1 月 23 日 上午 8:24 
I just pushed an update that fixed a bunch of issues with the spawnflag code. I didn't look at your issue specifically but see if it's resolved now.
(bees) 2016 年 1 月 23 日 下午 6:05 
Negative, the 256 spawnflag still doesn't work. The others do though, such as 8 (drop healthkit)
Also, whenever i restart the map it sets the spawnflags back to default by unchecking overide spawnflags, just a minor inconvenience though.
moomoohk  [开发者] 2016 年 1 月 23 日 下午 10:59 
Also, whenever i restart the map it sets the spawnflags back to default by unchecking overide spawnflags, just a minor inconvenience though.

You mean it resets the flags in the profile itself?

Was it a one time thing or does it happen consistently?
(bees) 2016 年 1 月 23 日 下午 11:05 
Consistently, whenever I change maps the overide spawn flags unchecks itself.
(bees) 2016 年 1 月 23 日 下午 11:06 
Oh, it might just be a ui bug, because the actual zinv text file still says the spawn flag is 256.
moomoohk  [开发者] 2016 年 1 月 24 日 上午 2:58 
Are you sure you're up to date? I fixed all the issues I could find with the UI a few updates ago.
(bees) 2016 年 1 月 24 日 上午 3:43 
I'm all up to date, and I tested it without addons. I was wrong, its not ui.

To test it I set spawn flags for combine to 8, so they drop health vials.
I killed one to make sure, then quit the map and reloaded. Opened zinv and it said the spawn flags where all default, and the npc's no longer dropped vials, so its resetting me every time.
< >
正在显示第 1 - 15 条,共 28 条留言
每页显示数: 1530 50