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 10 years ago
by KDXDARK
0 Members and 1 Guest are viewing this topic.
1,978 views
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 3 weeks ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
×
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
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
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 10 years ago
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
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: al
Date Registered: 21 August 2011
Last active: 3 weeks ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
×
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
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
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: 8 years ago
Posts
2,790
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: al
Date Registered: 21 August 2011
Last active: 3 weeks ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
×
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
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
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: 6 years ago
Posts
840
Respect
Forum Rank
The Decider
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Embers are the new lens flares
×
chromastone10's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
chromastone10's Contact & Social Linkschromastone10chromastone1chromastone10
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 ...