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 - AlecKeaneDUB

Could not find label 'main' in script 'animscripts/traverse/jump_up_96'

Thats the error i get after adding that traverse to my map. I guess i could delete it, but i shouldnt have to. This traverse is needed in my map unless anyone knows of an alternative. I've tried doing multiple full recompiles(map itself aswell as the patch) and rebuilding the mod. Anyone know what i should/can do?

Thanks
9 years ago
Is your game updated? Did you install the mod .exe correctly?
9 years ago
So, everything else works fine on that, except the gun giving ammo part?
Edit: I looked up and bare with me, Im not good scripter, but you can try adding at start undefined and then defining it at the function itself like:
Code Snippet
Plaintext
look_in_trash()
{
player = undefined;
cost = 500;
trash_trig = getent( "trash_trig" , "targetname" );
trash_trig usetriggerrequirelookat();
trash_trig setCursorHint("HINT_NOICON");
trash_trig sethintstring( "Press &&1 to search trash [Cost: "+cost+"]" );
current_gun = undefined;
rand = randomintrange( 1, 10 );

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

if(level.has_key == false && player.score >= cost && isDefined(level.key_in_trash))
{
player iprintln( "Searching..." );
player maps\_zombiemode_score::minus_to_player_score( cost );
wait 2;
player iprintlnbold( "You found a key!" );
level.has_key = true;
trash_trig delete();
}
else if(player.score >= cost && !isDefined(level.key_in_trash) && rand == 1) // 10% chance of getting this
{
                        current_gun = player getcurrentweapon();
player iprintln( "Searching..." );
player maps\_zombiemode_score::minus_to_player_score( cost );
wait 2;
player iprintlnbold( "Weapon Refill!" );
player GiveMaxAmmo( current_gun );
trash_trig delete();
}
else if(player.score >= cost && !isDefined(level.key_in_trash) && rand != 1) // 90% chance of getting this
{
player iprintln( "Searching..." );
player maps\_zombiemode_score::minus_to_player_score( cost );
wait 2;
player iprintlnbold( "No luck." );
trash_trig delete();
}
else if(player.score < cost)
{
player maps\_zombiemode_perks::play_no_money_perk_dialog();
wait 0.1;
continue;
}
}
}

Works for me, I have done something similar, dont quote me on that though  :-X
Hmm...not sure why having it undefined to begin with would make a difference, but i'll give it a try :) Btw yes everything else does work
9 years ago
No. You have to figure out which player you want to run the code on. If the code only runs after a player uses a trigger, you can use:

Code Snippet
Plaintext
<trig> waittill("trigger", player);

Depends on whats inside the for() loop. If you filter the players out by using an if condition then the code will only run for that player. However if you have a trigger(see above) you don't and shouldn't do this. The player variable in the waittill above will automatically get the player that used the trigger for you.

Otherwise if you just have an for() loop with the max ammo code inside then yes, it would just give the ammo to all players.

I'm confused about what you mean by adding the waittill( "trigger" , player ); function...because the player already has to use a trigger to search the location, so wouldnt adding another waittill( "trigger" , player ); make them have to hit it twice? I'm probably just stupid, but anyway here's the code i have:
Code Snippet
Plaintext
look_in_trash()
{
player = undefined;
cost = 500;
trash_trig = getent( "trash_trig" , "targetname" );
trash_trig usetriggerrequirelookat();
trash_trig setCursorHint("HINT_NOICON");
trash_trig sethintstring( "Press &&1 to search trash [Cost: "+cost+"]" );
current_gun = player getcurrentweapon();
rand = randomintrange( 1, 10 );

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

if(level.has_key == false && player.score >= cost && isDefined(level.key_in_trash))
{
player iprintln( "Searching..." );
player maps\_zombiemode_score::minus_to_player_score( cost );
wait 2;
player iprintlnbold( "You found a key!" );
level.has_key = true;
trash_trig delete();
}
else if(player.score >= cost && !isDefined(level.key_in_trash) && rand == 1) // 10% chance of getting this
{
player iprintln( "Searching..." );
player maps\_zombiemode_score::minus_to_player_score( cost );
wait 2;
player iprintlnbold( "Weapon Refill!" );
player GiveMaxAmmo( current_gun );
trash_trig delete();
}
else if(player.score >= cost && !isDefined(level.key_in_trash) && rand != 1) // 90% chance of getting this
{
player iprintln( "Searching..." );
player maps\_zombiemode_score::minus_to_player_score( cost );
wait 2;
player iprintlnbold( "No luck." );
trash_trig delete();
}
else if(player.score < cost)
{
player maps\_zombiemode_perks::play_no_money_perk_dialog();
wait 0.1;
continue;
}
}
}
9 years ago
Not in WaW MP, no
Thats what i thought...wasnt entirely sure though
9 years ago
Not possible, those are set through engine/weaponfile. Well, its possible, but it would be involve all weaponfiles to be duplicated with new stats and when player has perk, it would give those rather than old ones. I dont think there is DVAR for ADS and grenade thing, so yeah.
Isnt there a perk in multiplayer that allows you to ADS faster? Which would mean that there's a dvar for ADS speed. Perhaps thats only in other CODs though...
9 years ago
Code Snippet
Plaintext
player = undefined;

This is why. Your setting the player variable to undefined, AKA it doesn't exist.
So i would take out the player so its just "GiveMaxAmmo( current_gun );"? I wouldnt do the for() loop and give it to players[ i ] because wont that give it to every player? And that isnt what i want
9 years ago
I have things in my map that you can search (kind of like dig sites) and each one has a 10% chance of giving you a weapon refill (max ammo for the weapon you are holding). Now this is the part i have for the max ammo:
Code Snippet
Plaintext
player = undefined;
current_gun = player getcurrentweapon();
player GiveMaxAmmo( current_gun );
Now i dont just have those thrown together in my actual script, they are in the correct places. But why doesnt this work? I'm curious about what im missing or why the game wont read this. Does anyone know what i could use instead?
9 years ago
I remember seeing a thread or something about this but I couldnt find it so I'll just post this again. How would I go about having lights that are off to start with, but then turn on when the power is activated or some other event happens? This would really give my map a better effect so I was wondering if anyone knows how to do this.

Thanks
9 years ago
well thunder happens always after lighting. so this was the lightning
That was good. So good you even get +1 from me
9 years ago
This looks amazing...but you just stole the hell out of MZSlayer's thunder

Double Post Merge: June 14, 2015, 10:44:38 pm
Very great work! Better than that one who is on W.I.P. for years and still doesn't look like Town... :troll:

+1 for you buddy
Hey.....you just wait for him to finish it
9 years ago
If you dont even want to spend time fixing your scripts why would we want to? Sounds a bit weird  to me, the way you put it there...
lol yea the way he wrote that wasnt really ideal was it lol

"I cant be assed, so can one of you mugs do it for me, what evs ill be back to pick up my completed homework" lol  :troll:

I just knew that I'm not good enough at scripting to fix this and I didnt want to admit it :\ I honestly looked at it for a really long time but i still suck so I had no idea where to even look for the problem, so I just said that I didnt have the time to look through it. I didnt mean for it to make me sound like an asshole, so my bad for that
9 years ago
I played this map on co-op, and I know you said you had to pick up the first part in the spawn room, before you can pick up the second one, and the second one before the third. But when we played it even after we placed the first part, we couldn't pick up the second part, or the third one. On solo, it worked fine though.
Yes thats exactly the problem I want fixed. And like daedra said, the problem of having to pick up and add parts in order is because of the triple while loop. That I can fix but I cant find the issue with co-op :\
9 years ago
I released my map (The Outpost - Challenge Map) like a month ago and I've gotten feedback about a major bug in this script that keeps you from completing the easteregg/beating the map when playing Co-op. It works great on solo but i dont know what the problem is on Co-op and I really dont have time to look through every bit of my code to try and test things until i fix it. So any scripters, if you can please help me out I'd really appreciate it

I have not personally played my map on co-op, but people say that you cant pickup certain parts or something? I'm not entirely sure but you can play the map with a friend or two yourself or you can check the comments on the map's thread:
http://ugx-mods.com/forum/index.php?topic=6733.0

Here's my entire buildables script: (I know its probably very poorly written and sloppy but this was my first large script)
Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_hud_util;

Precache_buildables()
{
PrecacheModel( "zombie_sumpf_zipcage_switch" );
PrecacheModel( "zombie_sumpf_zipcage_box" );
PrecacheModel( "zombie_modular_wires_single" );
}

main()
{
players = get_players();
for(i=0;i<players.size;i++)
{
players[i].hasAPart = false;
players[i].hasSwitch = false;
players[i].hasWires = false;
players[i].hasBox = false;
}

level.buildTime = 2.5;
level.buildCompleted = false;
level.switchAdded = false;
level.wiresAdded = false;
level.boxAdded = false;

thread init_parts();
thread init_work_bench();
thread init_end_trigger();
}

init_parts(part)
{
//sets up the switch part and trigger
switch_part = getent("switch_part","targetname");
switch_trig = getent("switch_trig","targetname");

switch_trig SetCursorHint("HINT_NOICON");
switch_trig UseTriggerRequireLookAt();
switch_trig SetHintString("Press &&1 To Pick Up Switch");

//sets up the wires part and trigger
wires_part = getent("wires_part","targetname");
wires_trig = getent("wires_trig","targetname");

wires_trig SetCursorHint("HINT_NOICON");
wires_trig UseTriggerRequireLookAt();
wires_trig SetHintString("Press &&1 To Pick Up Wires");

//sets up the box part and trigger
box_part = getent("box_part","targetname");
box_trig = getent("box_trig","targetname");

box_trig SetCursorHint("HINT_NOICON");
box_trig UseTriggerRequireLookAt();
box_trig SetHintString("Press &&1 To Pick Up Electrical Box");

while(isDefined(wires_trig))
{
players = get_players(); // Get all player entities
for(i=0;i<players.size;i++)
{
wires_trig waittill("trigger",player);

if(!players[i] maps\_laststand::player_is_in_laststand() && !players[i].being_revived)
{
if(players[i].hasAPart == true)
{
players[i] iprintln( "You are already carrying a part" );
}

else
{
players[i] iprintln( "You picked up the wires" );
players[i].hasAPart = true;
players[i].hasWires = true;

wires_trig delete();
wires_part delete();
}
}
}
wait 0.05;
}

while(isDefined(switch_trig))
{
players = get_players(); // Get all player entities
for(i=0;i<players.size;i++)
{
switch_trig waittill("trigger",player);

if(!players[i] maps\_laststand::player_is_in_laststand() && !players[i].being_revived)
{
if(players[i].hasAPart == true)
{
players[i] iprintln( "You are already carrying a part" );
}

else
{
players[i] iprintln( "You picked up the switch" );
players[i].hasAPart = true;
players[i].hasSwitch = true;

switch_trig delete();
switch_part delete();
}
}
}
wait 0.05;
}

while(isDefined(box_trig))
{
players = get_players(); // Get all player entities
for(i=0;i<players.size;i++)
{
box_trig waittill("trigger",player);

if(!players[i] maps\_laststand::player_is_in_laststand() && !players[i].being_revived)
{
if(players[i].hasAPart == true)
{
players[i] iprintln( "You are already carrying a part" );
}

else
{
players[i] iprintln( "You picked up the electric box" );
players[i].hasAPart = true;
players[i].hasBox = true;

box_trig delete();
box_part delete();
}
}
}
wait 0.05;
}
}

init_work_bench()
{
bench_trig = getent("add_part_trig","targetname");

bench_trig SetCursorHint("HINT_NOICON");
bench_trig UseTriggerRequireLookAt();
bench_trig SetHintString("Press &&1 To Replace Part");

while(level.buildCompleted == false)
{
players = get_players();
for(i=0;i<players.size;i++)
{
bench_trig waittill("trigger",player);

if(players[i].hasAPart == true && players[i].hasSwitch == true && level.switchAdded == false)
{
players[i] thread do_knuckle_crack();

players[i] iprintln( "Replacing switch..." );
wait(level.buildTime);
players[i] iprintln( "A new switch has been added!" );
level notify( "buildable_complete" );

players[i].hasAPart = false;
players[i].hasSwitch = false;
level.switchAdded = true;
wait 0.1;
continue;
}

if(players[i].hasAPart == true && players[i].hasWires == true && level.wiresAdded == false)
{
players[i] thread do_knuckle_crack();

players[i] iprintln( "Replacing wires..." );
wait(level.buildTime);
players[i] iprintln( "Some new wires have been added!" );
level notify( "buildable_complete" );

players[i].hasAPart = false;
players[i].hasWires = false;
level.wiresAdded = true;
wait 0.1;
continue;
}

if(players[i].hasAPart == true && players[i].hasBox == true && level.boxAdded == false)
{
players[i] thread do_knuckle_crack();

players[i] iprintln( "Replacing electrical box..." );
wait(level.buildTime);
players[i] iprintln( "A new electrical box has been added!" );
level notify( "buildable_complete" );

players[i].hasAPart = false;
players[i].hasbox = false;
level.boxAdded = true;
wait 0.1;
continue;
}

if(players[i].hasAPart == false)
{
players[i] iprintln( "You don't have a part..." );
}
}

if(level.switchAdded == true && level.wiresAdded == true && level.boxAdded == true)
{
bench_trig delete();
level.buildCompleted = true;
level notify( "all_parts_added" );
wait 0.2;
iprintlnbold( "All parts fixed" );
}
}
}

do_knuckle_crack()
{
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");

gun = self GetCurrentWeapon();
self GiveWeapon( "zombie_knuckle_crack" );
self SwitchToWeapon( "zombie_knuckle_crack" );
self waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete", "buildable_complete" );

self EnableOffhandWeapons();
self EnableWeaponCycling();
self TakeWeapon( "zombie_knuckle_crack" );
self SwitchToWeapon( gun );

self AllowLean(true);
self AllowAds(true);
self AllowSprint(true);
self AllowProne(true);
self AllowMelee(true);
self notify("knuckle_crack_done");
}

init_end_trigger()
{
end_game = getent("end_game","targetname");
end_game SetCursorHint("HINT_NOICON");
end_game UseTriggerRequireLookAt();
end_game SetHintString("This switch seems to be broken...");

self waittill( "all_parts_added" );

end_game SetHintString("You need a source of energy...");
thread init_shoot_trig();

}

init_shoot_trig()
{
shoot_trig = getent("shoot_trig","targetname");
requiredWeapon = "zombie_thompson_upgraded";

while(1)
{
shoot_trig waittill("trigger", player);
weapon = player getcurrentweapon();

if(requiredWeapon == "zombie_thomspon_upgraded" || weapon==requiredWeapon)
{
shoot_trig delete();
thread init_end_game();
wait 0.1;
break;
}
}
}

init_end_game()
{
level notify ( "energy_shot" );
wait 0.5;
maps\nazi_zombie_114cabin::end_game();
}
9 years ago
Can you fix the buildable part glitch? You state you need to pick up in order but that doesn't work. If there is a known glitch on this map then why not fix it so everyone can enjoy the map?
I'm working on fixing the buildables glitch. I assure you, the buildables work 100% if playing solo but there's something wrong with Co-op play and I will have this fixed soon. I'm very sorry to everyone for the inconvenience
9 years ago
Loading ...