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

Getting Price From A Wallbuy

broken avatar :(
Created 5 years ago
by zw443
0 Members and 1 Guest are viewing this topic.
891 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 27 January 2018
Last active: 5 years ago
Posts
1
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
My Contact & Social Links
More
×
zw443's Groups
zw443's Contact & Social LinksYesYesYesYesYesYesYesYesYes
Ok, so I'm trying to add a function that scans the map for any wallbuys within a radius from an origin, and check if price is acceptable. Here is the function is so far;
Code Snippet
php
function get_wallbuys(orig, radius, price)
{
    weps = getentarray("weapon_upgrade", "targetname");
    wep = arraygetclosest(orig, weps, radius);
/*
    cost = wep.zombie_cost
    if (cost > price) return false;
    else if (cost <= price) return wep;
*/
}
I don't think zombie_cost is part of the entity (I edited a wallbuy prefab via text editor, no cost/price listed). I also saw a function by treyarch named load_weapon_spec_from_table. But I have no idea how to work with it. Any help would be apreciated.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 7 May 2017
Last active: 4 years ago
Posts
4
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
My Contact & Social Links
More
×
cdub7304's Groups
cdub7304's Contact & Social LinksChris Wardcdub7304ScoldingPenny2wizord82Chris Ward
Not sure about the function you made, I'm not good with scripting yet. I do know that the line load_wepon_specs_from_table, Istanbul referring to your wepons.csv. (a table with all weapons info (ie. weapon name, cost, in the box or not, is a wounder weapon, spawn a wallbuy,ect....)) it is located in share/raw/gamedata/weapons/zm/zm_levelcommon_weapons.csv, and that is were you should, theoretically, be able to delete weapons from map, change wallbuy cost, and add or remove from the box. However so you don't effect all maps or mess with the original, you should copy it and paste it in a folder in user maps like: usemaps/gamedata/weapons/zm/zm_levelcommon_weapons.csv. and from there you can edit the csv file and only effect the map you are working on. also you need stringtable::gamedata/weapons/zm/zm_levelcommon_weapons.csv line added at the bottom of your map's zone file. That is what all the tutorials say but it hasn't worked for me yet. Good Luck 

 
Loading ...