custom powerup

broken avatar :(
Created 2780 days ago
by KDXDARK
0 Members and 1 Guest are viewing this topic.
6,667 views
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: arSan Cristobal
Date Registered: 21 August 2011
Last active: 16 minutes ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
My Contact & Social Links
More
Personal Quote
Time of revenge
Signature
"Nada sale como quiero, es por eso que renuncie a muchas cosas en mi vida, entre ellas, vivir"
×
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 LinksKDXDARKKDXDARKKDXDARKKDXDARK
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: 49 days ago
Posts
5,545
Respect
6,506Add +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: arSan Cristobal
Date Registered: 21 August 2011
Last active: 16 minutes ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
My Contact & Social Links
More
Personal Quote
Time of revenge
×
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 LinksKDXDARKKDXDARKKDXDARKKDXDARK
 i wanna put for the player have a god mode for 5 seconds

i put this code
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: 49 days ago
Posts
5,545
Respect
6,506Add +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
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:
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: arSan Cristobal
Date Registered: 21 August 2011
Last active: 16 minutes ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
My Contact & Social Links
More
Personal Quote
Time of revenge
×
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 LinksKDXDARKKDXDARKKDXDARKKDXDARK
not work
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 49 days ago
Posts
5,545
Respect
6,506Add +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: arSan Cristobal
Date Registered: 21 August 2011
Last active: 16 minutes ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
My Contact & Social Links
More
Personal Quote
Time of revenge
×
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 LinksKDXDARKKDXDARKKDXDARKKDXDARK

add_zombie_powerup( "player_godmode", 	"zombie_brain",&"GODMODE" );

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

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: 577 days ago
Posts
43
Respect
Forum Rank
Legless Crawler
Primary Group
Community Mapper Elite
My Groups
More
My Contact & Social Links
More
Signature
[You are not allowed to view external links. Register or Login to see them]
×
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: 577 days 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: 49 days ago
Posts
5,545
Respect
6,506Add +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

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

to

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: arSan Cristobal
Date Registered: 21 August 2011
Last active: 16 minutes ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
My Contact & Social Links
More
Personal Quote
Time of revenge
×
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 LinksKDXDARKKDXDARKKDXDARKKDXDARK
not, not work
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 49 days ago
Posts
5,545
Respect
6,506Add +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.

 

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 Twitch
Loading ...