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 only works 1 out of 4 times

HOT
broken avatar :(
Created 9 years ago
by Dust
0 Members and 1 Guest are viewing this topic.
5,914 views
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 9 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
SetCanDamage works just fine with the nuke model. Its probably your code(which developer probably would have pointed out).

Working test code:

Spoiler: click to open...
Code Snippet
Plaintext
example()
{
flag_wait("all_players_connected");

org = getEntArray("model_spawn", "targetname");

if(!isDefined(org))
assertMsg("Ent not defined!");

for(i=0;i<org.size;i++)
{
get_players()[0].test = 5;

org[i] setModel("zombie_bomb");
org[i] setCanDamage(true);
org[i] waittill("damage", health, player);

iprintln(player.test);
org[i] delete();
}
iprintln("all shot");
}

Of noteworthy:

-You can shoot through gaps or holes in a model and it won't count as "damage".
-Knifing doesn't seem to work.
-Zombies can potentially hit the nuke if they attack the player without a proper check like:

Code Snippet
Plaintext
if(isPlayer(player))
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 5 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
Donate to me if you enjoy my work. https://www.paypal.me/thezombiekilla6
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
SetCanDamage works just fine with the nuke model. Its probably your code(which developer probably would have pointed out).

Working test code:

Spoiler: click to open...
Code Snippet
Plaintext
example()
{
flag_wait("all_players_connected");

org = getEntArray("model_spawn", "targetname");

if(!isDefined(org))
assertMsg("Ent not defined!");

for(i=0;i<org.size;i++)
{
get_players()[0].test = 5;

org[i] setModel("zombie_bomb");
org[i] setCanDamage(true);
org[i] waittill("damage", health, player);

iprintln(player.test);
org[i] delete();
}
iprintln("all shot");
}

Of noteworthy:

-You can shoot through gaps or holes in a model and it won't count as "damage".
-Knifing doesn't seem to work.
-Zombies can potentially hit the nuke if they attack the player without a proper check like:

Code Snippet
Plaintext
if(isPlayer(player))

Earlier I said that it works fine with the nuke model, it does NOT work with the other powerups. Some thinks its to do with the model themselves. And its fine about knifing doesnt work and zombies can hit the nuke. Its off the map where no one can get to it.
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 5 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
You can use this temporarily to check your ents. Stay below 900 and you won't have Gspawn issues unless you spawn stuff a lot or in a loop by mistake where you'll get it no matter what then...

http://www.mediafire.com/download/4ficc4cars8cgm3/_mc_debug.rar

Originally from codmod, that I modified to show during ads in a hud

That is a good script. Thanks for that. I have 504 ents so I should be fine to add the trigger_damages and stuff. Will try that then

 
Loading ...