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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - battleduck

Thanks for the suggestion, I'll give it a try later on today. Cheers
7 years ago
Code Snippet
Plaintext
function switch_2()
{
radius_trig = GetEnt("radius_trig2", "targetname");
        switch_trig = GetEnt("switch_trig2", "targetname");
switch_trig SetHintString("Press and hold &&1 to connect Auxillary Power.");
switch_trig SetCursorHint("HINT_NOICON");
timer = 10;

radius_trig waittill("trigger", player);
switch_trig waittill("trigger", player);
if (timer > 0)
{
wait .5;
switch_trig setHintString("Connection in progress...");
wait timer;
}

switch_trig setHintString("Connection Re-established!");

level.switchesCompleted++;

        DO OTHER STUFF....
}


I have the above code... how would I check that the player is still within the trigger radius whilst the 10sec timer runs down.

I want the player to have to stay within the radius for the duration of the timer, and if they leave the radius, then the timer resets to 10.

Any help appreciated. Cheers
7 years ago
Thanks a lot buddy. I'll give a go when I get home from work tonight. Much appreciated.

Double Post Merge: November 09, 2016, 09:45:20 am
It works! awesome, thanks a lot dude.
7 years ago
How would i go about checking for the weapon?

I've tried a few things like trying to define current weapon = player GetCurrentWeapon
and desired weapon = "raygun" and then maybe an if statement to check if current weapon and desired weapon match.

Then if they match maybe I'd need a while loop to tell the trigger to wait till current and desired weapon match??

I'm not sure how to go about it
7 years ago
Hi, i'm trying to work out how to script a trigger_damage that only triggers when damaged by a particular weapon (eg. raygun or gravity spikes)
Is there a way to check for what weapon inflicted the damage on the trigger, or do I need to do something like wait for the trigger to trigger, and then check which weapon the player had at the time?
7 years ago
Loading ...