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

[User Tutorial] Custom powerup(Speed, Unlimited ammo and God)

HOT
broken avatar :(
Created 12 years ago
by KDXDARK
0 Members and 1 Guest are viewing this topic.
14,899 views
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 10 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
Hi people i am DARKLEGION and this is a tutorial to add custom powerups, Thank's to Treminaor and Codmapper for the help.

1)_Go to raw/maps and copy the  _zombiemode_powerups.gsc to mods/mapname/maps .

2)_open in the line 48 you see this " // Random Drops " and down of that:
Code Snippet
Plaintext
	add_zombie_powerup( "nuke", 		"zombie_bomb",		&"ZOMBIE_POWERUP_NUKE", 			"misc/fx_zombie_mini_nuke" );
// add_zombie_powerup( "nuke", "zombie_bomb", &"ZOMBIE_POWERUP_NUKE", "misc/fx_zombie_mini_nuke_hotness" );
add_zombie_powerup( "insta_kill", "zombie_skull", &"ZOMBIE_POWERUP_INSTA_KILL" );
add_zombie_powerup( "double_points","zombie_x2_icon", &"ZOMBIE_POWERUP_DOUBLE_POINTS" );
add_zombie_powerup( "full_ammo",  "zombie_ammocan", &"ZOMBIE_POWERUP_MAX_AMMO");
add_zombie_powerup( "carpenter",  "zombie_carpenter", &"ZOMBIE_POWERUP_MAX_AMMO");
under the carpenter add this
Code Snippet
Plaintext
add_zombie_powerup( "unlimited_ammo", 	"aircraft_bomb", &"UNLIMITED_AMMO" );
add_zombie_powerup( "player_godmode", "zombie_brain", &"GODMODE" );
add_zombie_powerup( "speed", "char_jap_impinfwet_body4_g_lowclean", &"SPEED" );
3)_ go to the fuction " powerup_grab() "
under
Code Snippet
Plaintext
					case "carpenter":
level thread start_carpenter( self.origin );
players[i] thread powerup_vo("carpenter");
break;
add this
Code Snippet
Plaintext
		case "unlimited_ammo":
players[i] thread unlimited_ammo_powerup( self );
        break;
case "player_godmode":
                        players[i] thread player_godmode_powerup( self );
                        break;
case "speed":
                        players[i] thread speed( self );
                        break;

4)_now find this fuction  " nuke_flash() "
Code Snippet
Plaintext
nuke_flash()
{
players = getplayers();
for(i=0; i<players.size; i ++)
{
players[i] play_sound_2d("nuke_flash");
}
level thread devil_dialog_delay();


fadetowhite = newhudelem();

fadetowhite.x = 0;
fadetowhite.y = 0;
fadetowhite.alpha = 0;

fadetowhite.horzAlign = "fullscreen";
fadetowhite.vertAlign = "fullscreen";
fadetowhite.foreground = true;
fadetowhite SetShader( "white", 640, 480 );

// Fade into white
fadetowhite FadeOverTime( 0.2 );
fadetowhite.alpha = 0.8;

wait 0.5;
fadetowhite FadeOverTime( 1.0 );
fadetowhite.alpha = 0;

wait 1.1;
fadetowhite destroy();
}
and under that add this
Code Snippet
Plaintext
unlimited_ammo_powerup( drop_item, player_won )
{
level notify ("powerup unlimited ammo");
level endon ("powerup unlimited ammo");
self iPrintLnBold("^7Unlimited Ammo");
setsaveddvar ( "player_sustainammo",  1 );

wait ( 30 );

self iPrintLnBold("^7No More Unlimited Ammo");
setsaveddvar ( "player_sustainammo", 0 );
}
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 iPrintLnBold("^7NO MORE GOD!");
    self DisableInvulnerability();
}
speed( drop_item, player_won )
{
    level notify ("powerup speed");
    level endon ("powerup speed");
    self iPrintLnBold("^7Speed!!!");
    self setmovespeedscale(2.0);
    wait  15;
self iPrintLnBold("^7NO MORE SPEED!");
    self setmovespeedscale(1.0);
}
5)_ Go to raw/maps and open your mapname.gsc and add this in your main fuction

Code Snippet
Plaintext
    include_powerup( "unlimited_ammo" );
    include_powerup( "player_godmode" );
    include_powerup( "speed" );

Example

Code Snippet
Plaintext
    include_powerup( "unlimited_ammo" );
    include_powerup( "player_godmode" );
    include_powerup( "speed" );

maps\_zombiemode::main();

6)_ Go to Zone_source and open your mapname.csv and add this in the end of it
Code Snippet
Plaintext
xmodel,zombie_brain
xmodel,aircraft_bomb
xmodel,char_jap_impinfwet_body4_g_lowclean

7)_compile all your map and test it!

ENJOY  :troll:

(if you got a error post here and wait for my response)
possible error in the GOD POWERUP fuction
Last Edit: September 10, 2012, 01:35:46 pm by DARKLEGION
broken avatar :(
×
broken avatar :(
Donator <3
Location: auAustralia
Date Registered: 20 August 2012
Last active: 4 years ago
Posts
337
Respect
Forum Rank
Perk Hacker
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
×
Chunkdogg9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Chunkdogg9's Contact & Social LinksChunkdogg9Chunkdogg00Chunkdogg9
testing it out now hope it works :D

::EDIT::

It didnt work just says script compile error

i did everything you said to do an didnt work
Last Edit: September 10, 2012, 03:04:22 am by Chunkdogg9
broken avatar :(
×
broken avatar :(
Former UGX Lead Asset Creator
Location: ca
Date Registered: 17 August 2012
Last active: 5 years ago
Posts
1,932
Respect
Forum Rank
Zombie Destroyer
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Eh?
Signature

(Click to enter portfolio)
×
SajeOne's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
epic, death machine is being made into power up now ;)
broken avatar :(
×
broken avatar :(
Donator <3
Location: auAustralia
Date Registered: 20 August 2012
Last active: 4 years ago
Posts
337
Respect
Forum Rank
Perk Hacker
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
×
Chunkdogg9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Chunkdogg9's Contact & Social LinksChunkdogg9Chunkdogg00Chunkdogg9
i can't even load my map now  >:(
Last Edit: September 10, 2012, 05:01:26 am by Chunkdogg9
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.
Once someone reports this as working, I will sticky it. Until then, help Chunkdogg9 out .
broken avatar :(
×
broken avatar :(
Donator <3
Location: auAustralia
Date Registered: 20 August 2012
Last active: 4 years ago
Posts
337
Respect
Forum Rank
Perk Hacker
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
×
Chunkdogg9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Chunkdogg9's Contact & Social LinksChunkdogg9Chunkdogg00Chunkdogg9
i replaced my DLC3_Code thing with the download you provided im guessing i wasn't suppose to do that?
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 replaced my DLC3_Code thing with the download you provided im guessing i wasn't suppose to do that?
You're supposed to put it in your mods folder, not replace the one in /raw/.

Here's the original, restore the one in raw with this one: https://dl.dropbox.com/u/7345145/dlc3_code.rar

broken avatar :(
×
broken avatar :(
Donator <3
Location: auAustralia
Date Registered: 20 August 2012
Last active: 4 years ago
Posts
337
Respect
Forum Rank
Perk Hacker
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
×
Chunkdogg9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Chunkdogg9's Contact & Social LinksChunkdogg9Chunkdogg00Chunkdogg9
so just drop it in the where the one in raw is? and replace it?
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.
so just drop it in the where the one in raw is? and replace it?
Yes the one I just gave you is the original file. Overwrite your /raw/maps/dlc3_code with that one. Put the DARKLEGION dlc3_code in /mods/YOURMODNAME/maps
broken avatar :(
×
broken avatar :(
Former UGX Lead Asset Creator
Location: ca
Date Registered: 17 August 2012
Last active: 5 years ago
Posts
1,932
Respect
Forum Rank
Zombie Destroyer
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Eh?
×
SajeOne's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
darklegion it would help if i knew what you edited in dlc3_code
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.
darklegion it would help if i knew what you edited in dlc3_code
Yes you should never have to download script files unless they are new files. Modifications should all be documented.
broken avatar :(
×
broken avatar :(
Donator <3
Location: auAustralia
Date Registered: 20 August 2012
Last active: 4 years ago
Posts
337
Respect
Forum Rank
Perk Hacker
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
×
Chunkdogg9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Chunkdogg9's Contact & Social LinksChunkdogg9Chunkdogg00Chunkdogg9
yea this doesnt work i tried doing it after fixing it up and nothing game just freeze's on the load screen :lol: 
broken avatar :(
×
broken avatar :(
Location: de
Date Registered: 6 August 2012
Last active: 4 years ago
Posts
277
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Scripter Elite
My Groups
More
×
YaPh1l's Groups
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
YaPh1l's Contact & Social Links
Only thing changed in dlc3_code is the include_powerups(9 function:
Code Snippet
Plaintext
include_powerups()
{
include_powerup( "nuke" );
include_powerup( "insta_kill" );
include_powerup( "double_points" );
include_powerup( "full_ammo" );
include_powerup( "carpenter" );
speed( "carpenter" );
unlimited_ammo( "carpenter" );
player_godmode( "carpenter" );
}
Which should more look like this:
Code Snippet
Plaintext
include_powerups()
{
include_powerup( "nuke" );
include_powerup( "insta_kill" );
include_powerup( "double_points" );
include_powerup( "full_ammo" );
include_powerup( "carpenter" );
include_powerup( "unlimited_ammo" );
include_powerup( "player_godmode" );
include_powerup( "speed" );
}
You do not even need the modified dlc3_code.gsc, you could use the stock one and add the three new include_powerup() calls in your mapname.gsc.
EDIT: @SajeOne, I already scripted the death machine powerup :troll: .

- Phil.
Last Edit: September 10, 2012, 11:40:07 am by YaPh1l
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 10 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
edited the post, i can give too much support beacause i am not in my computer, this night possible update and fix
Last Edit: September 10, 2012, 01:38:15 pm by DARKLEGION
broken avatar :(
×
broken avatar :(
Donator <3
Location: auAustralia
Date Registered: 20 August 2012
Last active: 4 years ago
Posts
337
Respect
Forum Rank
Perk Hacker
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
×
Chunkdogg9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Chunkdogg9's Contact & Social LinksChunkdogg9Chunkdogg00Chunkdogg9
So what do the power ups look like?

 
Loading ...