Ok so Im gonna try and be as descriptive as possible so this isnt one of those threads that gets ignored like most. So first let me list the gamemodes Im working with the links will be below. Thanks in advance and I hope you can help me out!
Zombie Escape
[url]https://github.com/samuelmaddock/zombie-escape[/url]
Zombie Survival
[url]https://github.com/JetBoom/zombiesurvival[/url]
[B][U]The Issues[/U][/B]
[B][U]The Collisions Issues[/U][/B]
On the [B]Zombie survival[/B] gamemode a file or function in the gamemode is causing some collision problems on Zombie Escape maps. [B]Zombie Survival[/B] has 2 modes. The standard survival mode and Zombie Escape which is in the same gamemode Zombie Survival dont confuse that with the stand alone Zombie Escape gamemode. Anyways the issue with the collisions is some props and and buttons have collisions when they shouldnt. An example for one of the problems Im having is on the map ze_potc_v3_4. There is a special weapon for the humans that has 3 models and a button to use the weapon. The models do not have collisions which is what should happen however the func_button does have collisions which causes the player to run into it causing shaky movement which gets them killed. However in the Zombie Escape gamemode which is the the stand alone gamemode the collision problems I stated are void. Now I believe what fixes the collisions is eithier the sh_collide.lua file in the modules/css directory or modules/pickup/sh_meta.lua Im not entirely sure because Im not the best with lua but I know alittle to understand those two files may play a role in helping me fix the issue. Another example would be on ze_LOTR_Minas_Tirith_v3_3 there are many items for both Humans and Zombies. Some of these items have the player go inside a model but when they try and get the item that cant because of the collisions for some reason players collide with the model when they shouldnt. This is in the Zombie Survival gamemode just like the above problem. The problem also persists with guard models that have collisions with players but shouldnt. This renders parts of the maps unplayable because we cant get past them. But like I said above I loaded the Zombie Escape gamemode and ran the map on Zombie Escape and the problems became void and everything worked fine.
[B][U]The Boss Issues[/U][/B]
So If youve played Zombie Escape in CSS then you know that some maps have bosses that players need to shoot a shitload to kill which is determined by the func_breable or func_physbox or whatever other entities are used to define their HP. Basically the issue for the bosses on Zombie Survival is some work some dont its odd but I dont know why it happens. On the Noxious Net forum a came across a thread that said a function in the init.lua file at line 2223 causes this problem apparently its the function:EntityTakeDamage.
Now for problems their honestly map specific so I will list them below rather than jamming them in this paragraph. Also like the collision issues all the boss problems become void when loading it in the Zombie Escape gamemode probably because of the files in the boss folder in the modules/boss directory.
[B][U]ze_shroomforest_v4[/U][/B]
Boss:Evil Butterfly (Yeah I Know It Sounds Retarded)
Issue: The boss takes damage and behaves like it should until the players defeat it and it breaks like it should. It dosent trigger the next part of the map which opens the escape route for the players so they can escape so the map thinks the players didnt beat the boss and nukes the shit out of them.
[B][U]ze_FFVII_Mako_Reactor_v5_3[/U][/B]
Boss: Well Theres 2 Ill Explain Below
Issue: Ok so like I said above theres 2 bosses because this map has multiple stages. The Stage 1 Boss takes damage from players fine and operates perfectly but then on Stage 2 the map presents a different boss and this one only takes damage from grenades or just explosives in general it wont take damage from players guns which is a HUGE disadvantage. I checked to see if it works correctly by spamming tons of nades at it and it does operate fine when defeated so the issue is it wont take damage from SWEPS.
Bump cmon really no one can help me?
I'm way too lazy to hunt down your maps, but here are some random guesses you could try
For shroom forest, try using the ent_fire command to see exactly what should be triggering the next part of the map. If you can fix it, do, If you can't, you might have to add map-specific code (probably in /data/ and not in the gamemode itself, preferably) to detect the boss being defeated to open the next part of the map.
With Mako Reactor, at a guess I would say that there's a minimum threshold to damage thing that you can set on func_breakables. The easy solution would be to just up the damage on player's weapons, if that's not an option, consider manually setting the damage threshold lower on map load (again, the code should probably be in /data/ and not the gamemode itself)
To add map modifying code, you'll need the entity's map creation ID, go look at the entity and use
[code]
lua_run print(Entity(1):GetEyeTrace().Entity:MapCreationID())
[/code]
in console to get the id, you can use [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/ents/GetMapCreatedEntity]ents.GetMapCreatedEntity[/url] and [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/Fire]Entity:Fire[/url] to trigger events on the map entity on [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/InitPostEntity]GM:InitPostEntity[/url].
If you put your code to modify a map in data/zmm/map_name.txt you can add to your gamemode
[code]
local fp = string.format("zmm/%s.txt",game.GetMap())
local f = file.Read(fp, "DATA")
if f ~= nil then --f will be nil if there is no file for this map
CompileString(f,fp)()
end
[/code]
to load any map-specific lua that needs to be loaded.
[QUOTE=Apickx;50831499]I'm way too lazy to hunt down your maps, but here are some random guesses you could try
For shroom forest, try using the ent_fire command to see exactly what should be triggering the next part of the map. If you can fix it, do, If you can't, you might have to add map-specific code (probably in /data/ and not in the gamemode itself, preferably) to detect the boss being defeated to open the next part of the map.
With Mako Reactor, at a guess I would say that there's a minimum threshold to damage thing that you can set on func_breakables. The easy solution would be to just up the damage on player's weapons, if that's not an option, consider manually setting the damage threshold lower on map load (again, the code should probably be in /data/ and not the gamemode itself)
To add map modifying code, you'll need the entity's map creation ID, go look at the entity and use
[code]
lua_run print(Entity(1):GetEyeTrace().Entity:MapCreationID())
[/code]
in console to get the id, you can use [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/ents/GetMapCreatedEntity]ents.GetMapCreatedEntity[/url] and [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/Fire]Entity:Fire[/url] to trigger events on the map entity on [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/InitPostEntity]GM:InitPostEntity[/url].
If you put your code to modify a map in data/zmm/map_name.txt you can add to your gamemode
[code]
local fp = string.format("zmm/%s.txt",game.GetMap())
local f = file.Read(fp, "DATA")
if f ~= nil then --f will be nil if there is no file for this map
CompileString(f,fp)()
end
[/code]
to load any map-specific lua that needs to be loaded.[/QUOTE]
Thanks alot man I could link you to the maps if needed also do you have any clue whats wrong when it comes to the collisions
[QUOTE=Braintwistah;50831670]Thanks a lot man I could link you to the maps if needed also do you have any clue whats wrong when it comes to the collisions[/QUOTE]
I think CSS has done collision differently from gmod ever since gmod moved to the orange box engine. I took a look at one of the files you listed, and it does seem like Zombie Escape fixes collisions manually, here's the code cleaned up a little
[code]
--[[
Collision code ripped from https://github.com/samuelmaddock/zombie-escape/blob/master/ZombieEscape/gamemode/modules/css/sh_collide.lua
]]
/*-------------------------------------------------
Collision Rules
-------------------------------------------------*/
local dontcollide = {
[COLLISION_GROUP_PLAYER_MOVEMENT] = COLLISION_GROUP_WEAPON,
[COLLISION_GROUP_PLAYER] = COLLISION_GROUP_PUSHAWAY,
[COLLISION_GROUP_PLAYER_MOVEMENT] = COLLISION_GROUP_PUSHAWAY,
}
local docollide = {
[COLLISION_GROUP_DEBRIS] = COLLISION_GROUP_PUSHAWAY
}
function GM:ShouldCollide( ent1, ent2 )
-- CS:S Collision Rules
local collisionGroup0 = ent1:GetCollisionGroup()
local collisionGroup1 = ent2:GetCollisionGroup()
if collisionGroup0 > collisionGroup1 then
collisionGroup0,collisionGroup1 = collisionGroup1,collisionGroup0
end
if dontcollide[collisionGroup0] == collisionGroup1 then
return false
elseif docollide[collisionGroup0] == collisionGroup1 then
return true
else
return self.BaseClass:ShouldCollide( ent1, ent2 )
end
end
hook.Add( "OnEntityCreated", "CSSCustomCollisions", function( ent )
ent:SetCustomCollisionCheck(true)
end )
[/code]
Yeah I noticed that file but couldnt figure out how to to add it to the zombie survival gamemode oh and I got the bosses from shroomforest to operate correctly thank you a buch for that but the mako boss issue still persists dont know where to start when it comes to fixing that one
[QUOTE=Braintwistah;50832016]Yeah I noticed that file but couldnt figure out how to to add it to the zombie survival gamemode oh and I got the bosses from shroomforest to operate correctly thank you a buch for that but the mako boss issue still persists dont know where to start when it comes to fixing that one[/QUOTE]
You just have to call "include()" on it, the /gamemode/init.lua file is automatically included by gmod, everything else must have include() called on it to be run. You could either
1.place that code in init.lua, or
2.in it's own .lua file and put a call in init.lua to include the separate file.
[QUOTE=Apickx;50832143]You just have to call "include()" on it, the /gamemode/init.lua file is automatically included by gmod, everything else must have include() called on it to be run. You could either
1.place that code in init.lua, or
2.in it's own .lua file and put a call in init.lua to include the separate file.[/QUOTE]
I tried doing both methods but the problem persists also I looked at sh_meta in the pickups modules folder and theirs collision code in their maybe thats also something that fixes the collisions
bump
bump part 2
bump part 3
bump part 4
Sorry, you need to Log In to post a reply to this thread.