Posts
2,790
Respect
351Add +1
Forum Rank
King of the Zombies
Primary Group
Community Daedra
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!Sounds like it isn't precached to me.
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. | |
Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |
it must be preached as im precaching it when my perks are registered and the default weapon (if you pass a undefined var in the set weapon it defaults to this one) is precached during pre_init of my perk system
Jugg set_perk_weapon call
set_perk_weapon function
Default weapon init
Edit: ive also tried precaching the weapon name directly (not passed as a var)
Edit 2: i also thought if it wasnt precached you couldnt give from console in game but i guess you learn something new every day
Is that pre init function called before load.gsc and isnt threaded/ wait before it?
If so, that is probably why.
I think he means like this
I don't know much about script but I think you have to precache them
its called in _zombiemode just moved to below _load call in _zombiemode and the bottle still isnt givenSpoiler: click to open...[close]
Edit: also none of my pre_init functiosn are threaded / have a wait before them
Yes, like that. However, it shouldn't matter if you use a literal string or a variable as long as the variable is defined and is a string(maybe it isn't defined?).
You should only precache weapons/models once. Also, the second call is AFTER _load, not before(where it should be.
the second call was me moving it there just to check but i moved it back above _load (the first image)
Edit: the reason i have 2 precaches is just incase the weapon passed in maps\wardog\perks\_wardog_perks_util::set_perk_weapon is not the default bottle (set and precached in maps\wardog\perks\_wardog_perks::pre_init)
Ah, okay.
precacheItem should precache the model by itself. All your doing there is precaching the model itself, which would only be useful if you wanted to spawn the model via script but don't have a weapon with the model precached elsewhere.
Edit: honestly, the only way i'm going to be able to figure this out at this rate is if i had a copy of whatever map your using to test these perks. I could then run developer and developer_script and see if it is indeed not being preached or if the variable isn't defined.
Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. | |
Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. | |
BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
You really should only use one weapon file. Your taking up a lot of weapon files that way.
For bottles just make sure you Precache the weapon file and add the models and weapon file to a csv your including in the mod (and checked while building mod). Most use the mod.csv. Missing one of those causes the can give in console works but not via script thing. I forget which one off hand. As a matter of fact, usually if you give on console, after that the script will give then for that game. Unless I misunderstood what you said.
Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. | |
Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. | |
BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
Oh, I saw the one comment and all the precaches above and thought you were using more, my bad.
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. | |
Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. | |
BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |