Posts
30
Respect
Forum Rank
Legless Crawler
Primary Group
Member
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!You don't need to include anything extra in your GSC file to deduct points, assuming the rest of your code works (buyable max ammo function) try the following instead:
Make sure you also have the following at the top of your GSC file:
If that doesn't work because of the structure of your mod, use the Tom FastFile Extractor to get a copy of _zombiemode_score.gsc from common_zombie_patch.ff and use that GSC file in your mod, the same way you'd use others.
Double Post Merge: December 06, 2023, 10:24:19 am
thank you very much!it works, I replaced the line with the one you wrote,(player cards \ _zombie mode_score::minus_to_player_score (trigger1cost)
I'll even record a video guide for buying the maximum amount of ammunition for the BO1
but how do I made that there is some kind of sound when buying?I buy ammunition, but at this time there is no sound, silence
You can add the following to introduce sound to your buy function:
This plays predone sounds in the game's soundalias at the position of self.origin, exactly the way Treyarch does it if you look at their source files, you can customise which origin it plays at but in this code it plays from self's origin. You can also customise the sound that's played by editing your own soundalias in your mod, using purchase and no_purchase as a base and replacing it with something else (make sure to edit the custom sound to work in-engine if you go this route).
I added this code, or rather replaced it, but it resulted in bad syntax(Image removed from quote.)
That was example code, please only replace your trigger PlayLocalSound lines with:
Have a look at Treyarch's source files for more info, you might be missing some things, you could also use:
or:
or:
Assuming the soundalias name is valid, such as purchase and no_purchase.
That was example code, please only replace your trigger PlayLocalSound lines with:
Have a look at Treyarch's source files for more info, you might be missing some things, you could also use:
or:
or:
Assuming the soundalias name is valid, such as purchase and no_purchase.
I don't understand, where should I look?you're talking about Treyarch, which Treyarch source files are you talking about?
Double Post Merge: December 06, 2023, 05:04:11 pm
that's it, I did it, I added two lines-play_sound_at_pos( "purchase", player.origin ); and play_sound_at_pos( "no_purchase", player.origin );
I don't understand what the treyarch source files had to do with it