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

Randomized Powerup Powerup

broken avatar :(
Created 8 years ago
by arceus
0 Members and 1 Guest are viewing this topic.
2,439 views
broken avatar :(
×
broken avatar :(
Senpai
Location: us
Date Registered: 28 September 2013
Last active: 3 years ago
Posts
605
Respect
Forum Rank
Zombie Enslaver
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
arceus's Groups
Box Mappers Elite
Box Mappers Elite
arceus's Contact & Social LinksarceusNT
This simple script adds a powerup that will randomly cycle threw all powerups in the map and when picked up will do the effect of the powerup it was on at the time.


First open up your zombiemode_powerups.gsc in your mods folder (if it is not there copy it there from your raw folder)

paste this at the bottom of the file:
Code Snippet
Plaintext
random_powerup_powerup()
{
while(isdefined(self))
{
powerup = get_next_powerup();
struct = level.zombie_powerups[powerup];

self SetModel( struct.model_name );
self.powerup_name = struct.powerup_name;
self.hint = struct.hint;

if( IsDefined( struct.fx ) )
self.fx = struct.fx;

wait 0.2; // change this to change the cycle time
}
}

now go higher in the file to this line:
Code Snippet
Plaintext
//powerup = powerup_setup();
and paste this directly above it:
Code Snippet
Plaintext
	if(randomint(100) < 20) // change the 20 to change the chance that this will appear, higher number = more chance to drop
powerup thread random_powerup_powerup();
Last Edit: July 23, 2016, 11:44:38 pm by arceus
broken avatar :(
×
broken avatar :(
Location: tr
Date Registered: 1 March 2013
Last active: 3 days ago
Posts
816
Respect
Forum Rank
The Decider
Primary Group
2015 Contest Winner
My Groups
More
My Contact & Social Links
More
Personal Quote
Caw caw caw
×
johndoe'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.
2015 Contest Winner
johndoe's Contact & Social Linksmyc153-johndoe
what happens if get a randomized powerup when i get the randomized powerup?  :troll:
broken avatar :(
×
broken avatar :(
Constants and Variables
Location: us
Date Registered: 18 August 2013
Last active: 2 years ago
Posts
889
Respect
Forum Rank
The Decider
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
The Worst Secret Agent Ever
Signature
×
MAK911's Groups
Box Mappers Elite
Box Mappers Elite
Banned Elite
Banned Elite
MAK911's Contact & Social Linksmkramrtmkramrt
what happens if get a randomized powerup when i get the randomized powerup?  :troll:
Well, to put it simply...

 
Loading ...