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

Add weapon to box after trigger

broken avatar :(
Created 7 years ago
by jeffrey
0 Members and 1 Guest are viewing this topic.
1,372 views
broken avatar :(
×
broken avatar :(
Location: nlNoord-Brabant
Date Registered: 22 November 2015
Last active: 7 months ago
Posts
48
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Why are u reading this? Its a waste of time.
Signature
k.
×
jeffrey's Groups
jeffrey's Contact & Social Linksjeffrey909jeffrey909google is my m8
I tried to add a weapon after someone used a trigger_use but it won't work for some reason. I have set the weapon to false in the dlc3_code file.

nazi_zombie_mapname.gsc:
Code Snippet
Plaintext
button()
{
button_Trigger = GetEnt("button", "targetname");
button_Trigger waittill("trigger");

button_Trigger delete();

thread maps\dlc3_code::include_weapons("zombie_thundergun", true);
}
Last Edit: April 23, 2017, 04:33:26 pm by jeffrey
Marked as best answer by jeffrey 7 years ago
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
Set the weapon back to true in dlc3_code, and then do this for the trigger:
Code Snippet
Plaintext
button()
{
level.included_spec_weap = false;
button_Trigger = GetEnt("button", "targetname");
button_Trigger waittill("trigger");

button_Trigger delete();

level.included_spec_weap = true;
}



Then in _zombiemode_weapons, in both the  treasure_chest_ChooseRandomWeapon()  and  treasure_chest_ChooseWeightedRandomWeapon()  functions, under this:
Code Snippet
Plaintext
		if( player has_weapon_or_upgrade( keys[i] ) )
{
continue;
}

Add this, and change the WEAPON_NAME to the name of the weapon-file:
Code Snippet
Plaintext
		if( keys[i] == "WEAPON_NAME" && !level.included_spec_weap )
{
continue;
}

 
Loading ...