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

im having a glitch with my script where you don't need to shoot all 3 objects to get the easter egg complete. Sometimes its only 1 or 2 triggers you only need to shoot.
8 years ago
Replace this:
Code Snippet
Plaintext
player zm_equipment::give(equipment);

With this:
Code Snippet
Plaintext
players = GetPlayers();

for(i=0; i < players.size; i++)
{
    players[i] zm_equipment::give(equipment);
}

Thanks man but im currently having a glitch where sometimes the script bugs out and does not fully work and you only have to shoot 1 trigger and it gives you the Easter egg complete status. This is my code

Code Snippet
Plaintext
#using scripts\zm\_zm_weapons;
#using scripts\zm\_zm_weap_riotshield;
#using scripts\zm\_zm_equipment;

#using scripts\zm\craftables\_zm_craft_shield;

function init()
{
level.shootablesNeeded = 3;
level.shootablesCollected = 0;

level thread shootable_1();
level thread shootable_2();
level thread shootable_3();
}

function shootable_1()
{
    trig_1 = GetEnt("shootable_trig", "targetname");
model_1 = GetEnt("shootable_model", "targetname");

trig_1 SetHintString("");
trig_1 SetCursorHint("HINT_NOICON");

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

level.shootablesCollected++;

//IPrintLn("Trigger 1 Shot"); // Not Needed

thread shootables_done(player);

break;
}

trig_1 Delete();
model_1 Delete();
}

function shootable_2()
{
trig_2 = GetEnt("shootable_trig_2", "targetname");
model_2 = GetEnt("shootable_model_2", "targetname");

trig_2 SetHintString("");
trig_2 SetCursorHint("HINT_NOICON");

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

level.shootablesCollected++;

//IPrintLn("Trigger 2 Shot"); // Not Needed

thread shootables_done(player);

break;
}

trig_2 Delete();
model_2 Delete();
}

function shootable_3()
{
trig_3 = GetEnt("shootable_trig_3", "targetname");
model_3 = GetEnt("shootable_model_3", "targetname");

trig_3 SetHintString("");
trig_3 SetCursorHint("HINT_NOICON");

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

level.shootablesCollected++;

//IPrintLn("Trigger 3 Shot"); // Not Needed

thread shootables_done(player);

break;
}

//trig_3 Delete();
//model_3 Delete();
}

function shootables_done(player)
{
while(1)
{
self waittill(level.shootablesCollected >= level.shootablesNeeded);

if(level.shootablesCollected == level.shootablesNeeded)
{
// What ever code you want to execute once all shootables are collected
IPrintLn("Easter Egg Complete. Enjoy your new shield!");
equipment = GetWeapon("zod_riotshield");
players = GetPlayers();

for(i=0; i < players.size; i++)
{
    players[i] zm_equipment::give(equipment);
}
}

break;
}
}
8 years ago
Thanks man that worked ill give you some credit in my map description once its updated!

Double Post Merge: October 15, 2016, 12:30:44 am
The script works but after testing it on multiplayer it gives the shield to only 1 player and not all players. Is theirs a way to script it to all players or all 4?

Double Post Merge: October 15, 2016, 12:31:42 am
holly fuck i was baked when I wrote that
8 years ago
it works with raygun but not zombie shield probably because its a equipment
8 years ago
I want to give the zombie shield weapon instead of a perk how do you do that?
8 years ago
Go to your map gsc file under your map's scripts folder and than under function main add
Code Snippet
Plaintext
thread init_power();
than copy and paste this to the bottom of your gsc script
Code Snippet
Plaintext
function init_power()
{
    level flag::wait_till("power_on");
    level util::set_lighting_state(3);
}

Change the lighting state number to the lighting state of the lights on mode. (Note: Some people are having a glitch where the script lighting state number does not match with the radiant editor lighting sate numbers for some reason for example lighting state 3 in the script is lighting state 2 in radiant. I recomend you play around with the lighting state number in
Code Snippet
Plaintext
level util::set_lighting_state(statenumberhere)

Big thanks to Author for teaching me on discord!
8 years ago
Can somebody make a video on this? Best way to learn is by watching a video of someone else doing it and showing you where everything is
8 years ago
Loading ...