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

Using a variable from another script right?

broken avatar :(
Created 7 years ago
by Big-Beautiful
0 Members and 1 Guest are viewing this topic.
1,157 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 25 May 2015
Last active: 5 years ago
Posts
31
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Personal Quote
i hate mei
Signature
Must be kept sacred, heavenly eggs
Mustn’t be desecrated with egg bootlegs
×
Big-Beautiful's Groups
Big-Beautiful's Contact & Social Linksfortress-of-branitude
On my map, I'm using the ugx timed gameplay script and i've found the variable for its minutes. I wanted to make a script that would start another function when the 1 minute mark is reached. When I test the map, nothing happens on the 1 minute mark. Can someone help me troubleshoot my problem? this is my code so far:
Code Snippet
Plaintext
#using scripts\zm\ugxmods_timedgp;
#using scripts\custom\shootable_perk;

function chungainit()
{
//These are the starting varibles for the perk times
    level.shoot_quick_revive = 0;
    level.shoot_juggernog = 0;
    level.shoot_sleight_of_hand = 0;
    level.shoot_doubletap2 = 0;
    level.shoot_dead_shot = 0;
    level.shoot_electric_cherry = 0;
    level.shoot_widows_wine = 0;
    level.shoot_additional_primary_weapon = 0;

     thread chungapoints();
    // thread chunga();
}

function chungapoints()
{
level waittill(level.tgTimerTime.minutes == 1);
level.shoot_dead_shot++;
IPrintLnBold("DEAD SHOT HAS BEEN UNLOCKED");
thread shootable_perk::shootable_perk_dead();
}

I've also put thread shoot_time::chungainit(); in my map's gsc but the script still doesn't work.
Marked as best answer by Big-Beautiful 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
for a waittill to work it needs to be triggered by a notify. If the script doesn't send one it wont work. Also you need to use a string for a notify.

Instead try this:

Code Snippet
Plaintext
function chungapoints()
{
while( level.tgTimerTime.minutes < 1 )
                        {
                               wait 1;
                        }
level.shoot_dead_shot++;
IPrintLnBold("DEAD SHOT HAS BEEN UNLOCKED");
thread shootable_perk::shootable_perk_dead();
}

Last Edit: October 30, 2016, 11:44:03 am by BluntStuffy

 
Loading ...