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

Turning a Perk Machine off

broken avatar :(
Created 12 years ago
by nabaro
0 Members and 1 Guest are viewing this topic.
1,666 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 22 January 2014
Last active: 2 months ago
Posts
143
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
nabaro's Groups
nabaro's Contact & Social Linksgamerblast11chelseafan122099nabaro
These are the lines that I use to turn it off:

Code Snippet
Plaintext
jug_trig = getEnt("specialty_armorvest", "script_noteworthy");
jug_trig disable_trigger();
jug_machine = getEnt("vending_jug", "targetname");
jug_machine setmodel("zombie_vending_jugg");

The trigger correctly disables, but the machine does not change its model back to its "off" state. Why is that so? Thanks in advance!
broken avatar :(
×
broken avatar :(
Constants and Variables
Location: us
Date Registered: 18 August 2013
Last active: 2 years ago
Posts
889
Respect
Forum Rank
The Decider
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
The Worst Secret Agent Ever
Signature
×
MAK911's Groups
Box Mappers Elite
Box Mappers Elite
Banned Elite
Banned Elite
MAK911's Contact & Social Linksmkramrtmkramrt
I believe you did set the model, but, since you didn't delete the last one, they stacked together. You need to add a delete (zombie_vending_jugg_on).
Last Edit: April 20, 2014, 01:35:31 am by MAK911
Marked as best answer by nabaro 12 years ago
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
Signature
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Change
jug_machine = getEnt("vending_jug", "targetname");
To
Jugg_Machine = getentarray("vending_jugg", "targetname");
Edit: if done this way
for( i = 0; i < Jugg_Machine.size; i++ )
Jugg_Machine setmodel("zombie_vending_jugg");

This is from the _zombemode_perks file. So basically you just needed 1 more 'g'. But You can try GetEnt (May or may not work). However this is what it was in the script to turn it on.
You also have the sound and fx that play but dont remember how to turn them off/disable them.
Last Edit: April 20, 2014, 01:46:01 am by PROxFTW

 
Loading ...