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

custom powerup

HOT
broken avatar :(
Created 12 years ago
by KDXDARK
0 Members and 1 Guest are viewing this topic.
10,852 views
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 9 days 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
Do you still need help?
yes but for put another powerups
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 8 months ago
Posts
5,551
Respect
6,691Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
Signature
If Java had true garbage collection, most programs would delete themselves upon execution.
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
Do you still need help?
yes but for put another powerups
Explain the new problem so that we can help.
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 9 days 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
 i wanna put for the player have a god mode for 5 seconds

i put this code
Code Snippet
Plaintext
player_godmode_powerup( drop_item, player_won )
{
level notify ("powerup player_godmode");
level endon ("powerup player_godmode");
self iPrintLnBold("^7GOD!");
setsaveddvar ( "god" );

wait ( 5 );


setsaveddvar ( "god" );
}

is that correct?
Last Edit: May 20, 2012, 06:25:22 pm by DARKLEGION
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 8 months ago
Posts
5,551
Respect
6,691Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
i wanna put for the player have a god mode for 5 seconds

i put this code
Code Snippet
Plaintext
player_godmode_powerup( drop_item, player_won )
{
level notify ("powerup player_godmode");
level endon ("powerup player_godmode");
self iPrintLnBold("^7GOD!");
setsaveddvar ( "god" );

wait ( 5 );


setsaveddvar ( "god" );
}

is that correct?
Don't bother using dvars. Try this code:
Code Snippet
Plaintext
player_godmode_powerup( drop_item, player_won )
{
    level notify ("powerup player_godmode");
    level endon ("powerup player_godmode");
    self iPrintLnBold("^7GOD!");
    self thread magic_bullet_shield();
    wait  5;
    self thread stop_magic_bullet_shield();
}

magic_bullet_shield() is a utility function that will prevent the player from taking damage. It basically sets their health to 100000 and constantly sets their health.
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 9 days 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
not work
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 8 months ago
Posts
5,551
Respect
6,691Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
not work
Show me how you are calling the function, because that code works.
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 9 days 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

Code Snippet
Plaintext
add_zombie_powerup( "player_godmode", 	"zombie_brain",&"GODMODE" );

Code Snippet
Plaintext
case "player_godmode":
level thread player_godmode_powerup( self );
break;

Code Snippet
Plaintext
player_godmode_powerup( drop_item, player_won )
{
    level notify ("powerup player_godmode");
    level endon ("powerup player_godmode");
    self iPrintLnBold("^7GOD!");
    self thread magic_bullet_shield();
    wait  5;
    self thread stop_magic_bullet_shield();
}


there is all the code of the powerup
broken avatar :(
×
broken avatar :(
Location: 00
Date Registered: 13 March 2012
Last active: 20 hours ago
Posts
43
Respect
Forum Rank
Legless Crawler
Primary Group
Community Mapper Elite
My Groups
More
My Contact & Social Links
More
Signature
×
CoDMapper's Groups
Community Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods community.
CoDMapper's Contact & Social LinksCoDMapperCoDMapper
magic_bullet_shield(); is for AI only
broken avatar :(
×
broken avatar :(
Location: 00
Date Registered: 13 March 2012
Last active: 20 hours ago
Posts
43
Respect
Forum Rank
Legless Crawler
Primary Group
Community Mapper Elite
My Groups
More
My Contact & Social Links
More
×
CoDMapper's Groups
Community Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods community.
CoDMapper's Contact & Social LinksCoDMapperCoDMapper
player_godmode_powerup( drop_item, player_won )
{
    level notify ("powerup player_godmode");
    level endon ("powerup player_godmode");
    self iPrintLnBold("^7GOD!");
    self EnableInvulnerability();
    wait  5;
    self DisableInvulnerability();
}
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 8 months ago
Posts
5,551
Respect
6,691Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
The main problem is that he is threading it on level and we are threading the health funcs on self (level). So.... change the

Code Snippet
Plaintext
case "player_godmode":
level thread player_godmode_powerup( self );
break;

to

Code Snippet
Plaintext
case "player_godmode":
self thread player_godmode_powerup( self );
break;

assuming the case statement is threaded on the player, I can't tell from the tiny snippet you provided.
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 9 days 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
not, not work
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 8 months ago
Posts
5,551
Respect
6,691Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.

 
Loading ...