UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

[BO1] Getting array of wallbuys in a specified zone

broken avatar :(
Created 10 years ago
by Deleted User
0 Members and 1 Guest are viewing this topic.
1,966 views
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
For a gamemode im trying to make (LockedOut credit for idea goes to truenightmare) i need to get all weapons in the currently opened zones

What im trying to do doesnt seem to work, well when i try to get wallbuys for the spawn zone i get a array of all wallbuys on Kino even the Grandebag in the PaP room

anyone got anyidea why i might be getting this issue?

Code im using to get wallbuys
Code Snippet
Plaintext
// wallbuys = get_wallbuys_for_zone(player get_current_zone());

get_wallbuys_for_zone(zone_name)
{
if(!maps\_zombiemode_zone_manager::zone_is_enabled(zone_name))
return [];

wallbuys = GetEntArray("weapon_upgrade", "targetname");
result = [];

for(i = 0; i < wallbuys.size; i++)
{
if(wallbuys[i] maps\_zombiemode_zone_manager::entity_in_zone(zone_name))
result[result.size] = wallbuys[i];
}
return result;
}

from what i can see all weapons on Kino seem to be touching all zone volumes in the map, thats how entity_in_zone() works it checks to see if <entity> IsTouching(<zone_volume>) returns true but if i remeber correctly from WaW mapping zones are made to be the size of the room so why would the MP40 (in Speed Cola's zone) be touching the spawn rooms zone (i was expecting to only get M14 and Olympia)
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 5 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
Signature
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
Maybe you can do something similar to what they do in check_point_in_active_zone() in _zombiemode_utility: create a script_origin, but some units in front of the weapon, and check if it's touching the zone. Maybe some zones are bigger than they should.
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Maybe you can do something similar to what they do in check_point_in_active_zone() in _zombiemode_utility: create a script_origin, but some units in front of the weapon, and check if it's touching the zone. Maybe some zones are bigger than they should.

thats pretty much what ive done but instead of using a script_origin im using the wallbuy's trigger (which should not be inside the wall it should be a few units infront of the wallbuy or touching the wall) and instead of checking active zone im checking a zone im passing in (but hey il give it shot and see if script_origins change anything at all)

EDIT: omg using script origins actualy worked i dont see how but im not arguing with it thanks Soy-Yo what you said worked :P

 
Loading ...