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

trigger

broken avatar :(
Created 11 years ago
by KDXDARK
0 Members and 1 Guest are viewing this topic.
3,525 views
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 2 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
KDXDARK's Contact & Social Links
how i do to delete the hand of the trigger?
broken avatar :(
×
broken avatar :(
Location: de
Date Registered: 6 August 2012
Last active: 4 years ago
Posts
277
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Scripter Elite
My Groups
More
×
YaPh1l's Groups
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
YaPh1l's Contact & Social Links
Code Snippet
Plaintext
trigger SetCursorHint("HINT_NOICON");

- Phil.
broken avatar :(
×
broken avatar :(
Location: be
Date Registered: 17 August 2013
Last active: 3 years ago
Posts
369
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
Web & Software Developer and Designer
Signature
"Deleted code is debugged code." - Jeff Sickel
"Mathematicians stand on each others' shoulders and computer scientists stand on each others' toes." - Richard Hamming
×
JR-Imagine's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Give your trigger these kvps:
"targetname", "triggerdel"
(you can have anything you want as long as you edit the script)

And add this at the bottom of your mapname.gsc:
Code Snippet
Plaintext
triggerdel()
{
trig = getEnt("triggerdel","targetname");
trig SetCursorHint("HINT_NOICON");
}

Add this:
Code Snippet
Plaintext
thread triggerdel();
After this:
Code Snippet
Plaintext
maps\_zombiemode::main();

Edit: YaPh1l, was faster but incomplete. :)
Last Edit: October 29, 2013, 02:26:44 pm by JR-Imagine
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 2 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
KDXDARK's Contact & Social Links
dont work:

this is the fuction what i use:

Code Snippet
Plaintext
dark_trig = GetEntArray("para_eggtrig","targetname");
array_thread(dark_trig,::para_egg);


para_egg()
{
player = undefined;
dark_trig = GetEntArray("para_eggtrig","targetname");
dark_trig SetCursorHint("HINT_NOICON");
        self waittill ("trigger",player);
player playsound( "laugh_child" );
}
Last Edit: October 29, 2013, 02:31:59 pm by KDXDARK
broken avatar :(
×
broken avatar :(
Location: be
Date Registered: 17 August 2013
Last active: 3 years ago
Posts
369
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
Web & Software Developer and Designer
×
JR-Imagine's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Try this:
Code Snippet
Plaintext
dark_trig = GetEntArray("para_eggtrig","targetname");
dark_trig SetCursorHint("HINT_NOICON");
array_thread(dark_trig,::para_egg);


para_egg()
{
    player = undefined;
        self waittill ("trigger",player);
    player playsound( "laugh_child" );
}

Also, I guess you want the trigger to go away once used? If so, use this:
Code Snippet
Plaintext
dark_trig = GetEntArray("para_eggtrig","targetname");
dark_trig SetCursorHint("HINT_NOICON");
array_thread(dark_trig,::para_egg);


para_egg()
{
    player = undefined;
        self waittill ("trigger",player);
    player playsound( "laugh_child" );
   dark_trig Delete();
}
Last Edit: October 29, 2013, 02:35:59 pm by JR-Imagine
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 2 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
KDXDARK's Contact & Social Links
Try this:
Code Snippet
Plaintext
dark_trig = GetEntArray("para_eggtrig","targetname");
dark_trig SetCursorHint("HINT_NOICON");
array_thread(dark_trig,::para_egg);


para_egg()
{
    player = undefined;
        self waittill ("trigger",player);
    player playsound( "laugh_child" );
}

Also, I guess you want the trigger to go away once used? If so, use this:
Code Snippet
Plaintext
dark_trig = GetEntArray("para_eggtrig","targetname");
dark_trig SetCursorHint("HINT_NOICON");
array_thread(dark_trig,::para_egg);


para_egg()
{
    player = undefined;
        self waittill ("trigger",player);
    player playsound( "laugh_child" );
   dark_trig Delete();
}
nop it dont work
broken avatar :(
×
broken avatar :(
Location: be
Date Registered: 17 August 2013
Last active: 3 years ago
Posts
369
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
Web & Software Developer and Designer
×
JR-Imagine's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
nop it dont work
LOL, now I feel dumb:
Code Snippet
Plaintext
para_egg()
{
dark_trig = GetEntArray("para_eggtrig","targetname");
dark_trig SetCursorHint("HINT_NOICON");
array_thread(dark_trig,::para_egg);

    player = undefined;
        self waittill ("trigger",player);
    player playsound( "laugh_child" );
   dark_trig Delete();
}
I didn't even see you didn't include the triggers in the function. xD
Last Edit: October 29, 2013, 02:40:55 pm by JR-Imagine
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 2 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
KDXDARK's Contact & Social Links
LOL, now I feel dumb:
Code Snippet
Plaintext
para_egg()
{
dark_trig = GetEntArray("para_eggtrig","targetname");
dark_trig SetCursorHint("HINT_NOICON");
array_thread(dark_trig,::para_egg);

    player = undefined;
        self waittill ("trigger",player);
    player playsound( "laugh_child" );
   dark_trig Delete();
}
I didn't even see you didn't include the triggers in the function. xD

dont work :(
broken avatar :(
×
broken avatar :(
Location: be
Date Registered: 17 August 2013
Last active: 3 years ago
Posts
369
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
Web & Software Developer and Designer
×
JR-Imagine's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
dont work :(
Hmm... Are you sure that function is being threaded? KVPs are correct?

Also, I don't see what the use for this is:
Code Snippet
Plaintext
array_thread(dark_trig,::para_egg);

This should work perfectly, if not, I'll test it out myself.
Code Snippet
Plaintext
para_egg()
{
dark_trig = GetEntArray("para_eggtrig","targetname");
dark_trig SetCursorHint("HINT_NOICON");

    dark_trig waittill ("trigger");
    dark_trig Delete();
    players = get_players();
    for( i = 0; i < players.size; i++ )
        players[i] playsound("laugh_child");
}
I checked Paragalor's tut and there where some other issues with your code I fixed.
Last Edit: October 29, 2013, 03:15:49 pm by JR-Imagine
broken avatar :(
×
broken avatar :(
Former UGX Lead Asset Creator
Location: ca
Date Registered: 17 August 2012
Last active: 5 years ago
Posts
1,932
Respect
Forum Rank
Zombie Destroyer
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Eh?
Signature

(Click to enter portfolio)
×
SajeOne's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
If your calling that function with an array thread dark_trig must be defined before the call. Define it outside the new function above the array thread. Then reference it as self inside the function.
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 2 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
KDXDARK's Contact & Social Links
I checked Paragalor's tut and there where some other issues with your code I fixed.

i test the paragalor tut and it dont work, but i remember a script what i use a long time ago in a map, so i do a combination of both scripts triying to delet the hand :)

Post Merge: October 30, 2013, 08:23:37 pm
so i test the script by jr-imagine and it dont work, and sajeone so something like this i need do self = dark_trig; ?
Last Edit: October 30, 2013, 08:23:37 pm by KDXDARK

 
Loading ...