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

Script Help Check if Statements

HOT
broken avatar :(
Created 10 years ago
by pashan
0 Members and 1 Guest are viewing this topic.
6,989 views
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 3 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
Signature
×
pashan's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Thanks for the help guys imma credit all of you  on my next map thank you  :)

Post Merge: April 01, 2014, 12:49:12 am
Whats wrong with this script

Code Snippet
Plaintext
ray_steps()
{
// Setting Up Triggers
trigger_one = getent("s_one", "targetname");
trigger_one sethintstring(" Press and hold &&1 for Ray Gun ");
trigger_one setCursorHInt( "HINT_NOICON" );
trigger_two = getent("s_two", "targetname");
trigger_two sethintstring("");
trigger_two setCursorHInt( "HINT_NOICON" );
trigger_three = getent("s_three", "targetname");
trigger_three sethintstring("");
trigger_three setCursorHInt( "HINT_NOICON" );
trigger_four = getent("s_four", "targetname");
trigger_four sethintstring("");
trigger_four setCursorHInt( "HINT_NOICON" );
trigger_five = getent("s_five", "targetname");
trigger_five sethintstring(" Press and hold &&1 for Ray Gun ");
trigger_five setCursorHInt( "HINT_NOICON" );

// Hiding|Disabling Triggers
trigger_two Hide();
trigger_two disable_trigger();
trigger_three Hide();
trigger_three disable_trigger();
trigger_four Hide();
trigger_four disable_trigger();
trigger_five Hide();
trigger_five disable_trigger();

// Trigger One
trigger_one waittill("trigger", player);
iprintln("Trying To get the Ray Gun, Shoot Sam for the Ray Gun");
trigger_one delete();

// Enable Trigger Two
trigger_two Show();
trigger_two enable_trigger();

// Trigger Two
trigger_two waittill("trigger", player);
iprintln("Its in the Box next Phd");
trigger_two delete();

// Enable Trigger Three
trigger_three Show();
trigger_three enable_trigger();

// Trigger Three
trigger_three waittill("trigger", player);
iprintln("Ha Ha, Not here, Ill give it to you if you if you shoot that female, she is sitting on the couch");
trigger_three delete();

// Enable Trigger Four
trigger_four Show();
trigger_four enable_trigger();

// Trigger Four
trigger_four waittill("trigger", player);
iprintln("Good Job, Go get the Ray Gun its in the filing cabinate.");
trigger_four delete();

// Enable Trigger Five
trigger_five Show();
trigger_five enable_trigger();

// Trigger Five
trigger_five waittill("trigger", player);
iprintln("Here ya go - Pashan");
{
current_weapon = players getCurrentWeapon();
weapon_list = players GetWeaponsListPrimaries();

if(isdefined(current_weapon) && weapon_list.size > 1)
{
players TakeWeapon( current_weapon );
}

players GiveWeapon( "ray_gun" );
players SwitchToWeapon( "ray_gun" )
}

trigger_five delete();



}

getting bad syntax

}
Last Edit: April 01, 2014, 12:49:42 am by pashan
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.

dosn't sethintstring make if so when your near the trigger it will display a little message

then thing i want is a message to show up after i use the trigger (like an objective thing on the top left corner)
If you are creating objectives use the objective functions which can be found here:

http://www.zeroy.com/script/ (look under objective)

Specifically: "objective_add()", "objective_delete()", and "objective_state()"

If you just want to print something the way an objective would outside of an objective context you can use the function:

Code Snippet
Plaintext
iprintln("Text");

Do not apply this function to all players if you are using a trigger though. When my friend presses a trigger in the game, almost always I don't need to see it as I wasn't the person who pressed it. For this you can use something such as:

Code Snippet
Plaintext
trigger waittill("trigger", player);
player iprintln("You just pressed that button");

 
Loading ...