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

testing script need help

broken avatar :(
Created 11 years ago
by lordkurt6
0 Members and 1 Guest are viewing this topic.
1,953 views
broken avatar :(
×
broken avatar :(
Location: usUsa
Date Registered: 21 July 2013
Last active: 2 years ago
Posts
53
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
lordkurt6's Groups
lordkurt6's Contact & Social LinkstehfeedzPryZeWaRVii
right here my script been making btw its only for testing only just wanna see what I can make atm soon I go the trigger and hit f on keyboard nofink happeds not sure why as still all new to scripting im bad at spelling as well bcuz of learning disabitsy lol and baseic I just adding in stuff see if it go with what im making like I said this is just testing so script in ur eyes be like wtf (;

Code Snippet
Plaintext
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;

init()
{
players = get_players();

climb = GetEntArray("climbto","targetname");
array_thread(climb, ::climbto1);
}
}

climbto1()
{
// player = undefined;

self usetriggerrequirelookat();
self setCursorHint("HINT_NOICON");
self sethintstring( "Press and hold &&1 to climb up" );

while(1)
{
self waittill( "trigger" , player );

self GiveWeapon("zombie_knuckle_crack");

self.cloak_timer = 1;
self.is_cloaked = true;
while(1){
if(self GetCurrentWeapon() == "zombie_knuckle_crack" && self.is_using_datapad == false && self.is_cloaked == false && self.cloak_timer > 0.100){
self do_knuckle_crack();
self SetViewModel("viewmodel_hands_cloth");
self.ignoreme = true;
self.is_cloaked = true;
} else if(self GetCurrentWeapon() == "zombie_knuckle_crack" && self.is_using_datapad == false && self.is_cloaked == true) {
self do_knuckle_crack();
self SetViewModel("viewmodel_hands_cloth");
self.ignoreme = false;
self.is_cloaked = true;
} else if(self GetCurrentWeapon() == "zombie_knuckle_crack" && self.is_using_datapad == false && self.is_cloaked == true && self.cloak_timer <= 0.100){
self do_knuckle_crack();
self iPrintLnBold("Insufficent energy");
}
if(self.is_cloaked == true && self.cloak_timer < 0) {
self.cloak_timer = 0;
self iPrintLnBold("No energy");
self SetViewModel("viewmodel_hands_cloth");
self.ignoreme = false;
self.is_cloaked = true;
} else if(self.is_cloaked == true) {
self.cloak_timer -= 0.010;
} else if(self.cloak_timer < 0) {
self.cloak_timer = 0;
} else if(self.cloak_timer < 1){
self.cloak_timer += 0.001;

}
//self SetWeaponAmmoClip("zombie_knuckle_crack",self.cloak_timer*1000);
//self iPrintLn(self.cloak_timer);
wait(0.5);

}
}
}

do_knuckle_crack()
{
self.is_using_datapad = true;
self waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete" );
self DisableOffhandWeapons();
self DisableWeaponCycling();

self AllowLean( false );
self AllowAds( false );
self AllowSprint( false );
//self AllowProne( false );
self AllowMelee( false );
/*
if ( self GetStance() == "prone" )
{
self SetStance( "crouch" );
}*/
self ForceViewmodelAnimation("data_glove_cloak","reload");
wait(0.85);
self EnableOffhandWeapons();
self EnableWeaponCycling();

self AllowLean( true );
self AllowAds( true );
self AllowSprint( true );
//self AllowProne( true );
self AllowMelee( true );
primaries = self GetWeaponsListPrimaries();
self SwitchToWeapon(primaries[0]);
self waittill_any( "fake_death", "death", "player_downed", "weapon_change" );
self.is_using_datapad = false;
}
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Well for starters your not using self correctly. Self refers to whatever scriptable entity(Player, trigger, struct, AI, etc) you call that function with. So for the second function self is climb[0], climb[1], climb[2], etc, not a player...

And your not declaring what each subvar for each player is either, or atleast not within the same script. You need to declare it somewhere before init() is called for else add a isdefined(ent.subvar) to each if statement to make sure its defined when it loops and then define it in another script somewhere.

Honestly if you would follow SparkyMcSparks tutorial(http://ugx-mods.com/forum/index.php?topic=2891.0) on how to debug your maps scripts then you could figure some of this out on your own... not being an ass, its just the truth.

(SparkyMcSparks FTW!)
Last Edit: January 16, 2015, 11:35:13 am by daedra descent
broken avatar :(
×
broken avatar :(
Location: usUsa
Date Registered: 21 July 2013
Last active: 2 years ago
Posts
53
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
lordkurt6's Groups
lordkurt6's Contact & Social LinkstehfeedzPryZeWaRVii
don't worry I done what I needed to do thanks for the help now need help what the line code to make player jump higher

Double Post Merge: January 16, 2015, 01:26:52 pm
like how can make play jump higher
Last Edit: January 16, 2015, 01:26:52 pm by lordkurt6

 
Loading ...