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

Powerup problem

broken avatar :(
Created 12 years ago
by KDXDARK
0 Members and 1 Guest are viewing this topic.
2,462 views
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 24 hours ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
so i create a custom powerup script and i dont know why it dont give me the weapon

here is the script

Code Snippet
Plaintext
	add_zombie_powerup( "god_ray", 		"weapon_usa_ray_gun",					&"" );

Code Snippet
Plaintext
					case "god_ray":
players[i] thread god_ray_powerup( self );
break;

Code Snippet
Plaintext
god_ray_powerup( drop_item, player_won )
{
players = get_players();
i = player_won;
players[i] TakeAllWeapons();
players[i] playsound( "god_power");
players[i] giveWeapon("ray_gun2");
players[i] SwitchToWeapon( "ray_gun2" );
}

also i try using "self" but it dont work :/
Marked as best answer by KDXDARK 12 years ago
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
None of the code that you posted helps any because their not giving the full context of the script itself.

However for this,

Code Snippet
Plaintext
god_ray_powerup( drop_item, player_won )
{
players = get_players();
i = player_won;
players[i] TakeAllWeapons();
players[i] playsound( "god_power");
players[i] giveWeapon("ray_gun2");
players[i] SwitchToWeapon( "ray_gun2" );
}

self should probably be used... i mean it works but you need to define the player by passing the number through when you could just use self which would be more efficient. also the function argument "drop_weapon" isn't used, so it should probably be removed.
Last Edit: April 02, 2014, 09:00:00 pm by daedra descent
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 24 hours ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
well now it give me the weapon but it dont play the sound :/
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
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
well now it give me the weapon but it dont play the sound :/

Maybe you need to define the sound origin like:

Code Snippet
Plaintext
playsound( "god_power", self.origin);

does that work?
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 24 hours ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
well the problem was in the .csv but thanks daedra +1 :D
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 8 January 2014
Last active: 8 years ago
Posts
840
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Embers are the new lens flares
×
chromastone10's Groups
Mapper Has released one or more maps to the UGX-Mods community.
chromastone10's Contact & Social Linkschromastone1chromastone10chromastone10
well the problem was in the .csv but thanks daedra +1 :D

Can I expect a tutorial for this? It would be pretty cool

 
Loading ...