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

Power up drop notification

broken avatar :(
Created 9 years ago
by ibounce
0 Members and 1 Guest are viewing this topic.
1,643 views
broken avatar :(
×
broken avatar :(
Location: usWisconsin
Date Registered: 5 September 2013
Last active: 4 years ago
Posts
70
Respect
Forum Rank
Rotting Walker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Just Having Fun.
Signature

Released Maps:
TRAPPED
LSD
24h Labs
LegoLand
Poseidome

[Coming Soon]
Downtown Bikini Bottom
×
ibounce's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
ibounce's Contact & Social LinksiBounceyiBounceun1tedbouncersibouncey
So, I was just looking through some scripts cause I was bored and I found this in _zombiemode_powerups.gsc

Code Snippet
Plaintext
print_powerup_drop( powerup, type )
{
/#
if( !IsDefined( level.powerup_drop_time ) )
{
level.powerup_drop_time = 0;
level.powerup_random_count = 0;
level.powerup_score_count = 0;
}

time = ( GetTime() - level.powerup_drop_time ) * 0.001;
level.powerup_drop_time = GetTime();

if( type == "random" )
{
level.powerup_random_count++;
}
else
{
level.powerup_score_count++;
}

println( "========== POWER UP DROPPED ==========" );
println( "DROPPED: " + powerup );
println( "HOW IT DROPPED: " + type );
println( "--------------------" );
println( "Drop Time: " + time );
println( "Random Powerup Count: " + level.powerup_random_count );
println( "Random Powerup Count: " + level.powerup_score_count );
println( "======================================" );
#/
}


So, I edited to make it look like this:

Code Snippet
Plaintext
print_powerup_drop( powerup, type )
{

if( !IsDefined( level.powerup_drop_time ) )
{
level.powerup_drop_time = 0;
level.powerup_random_count = 0;
level.powerup_score_count = 0;
}

time = ( GetTime() - level.powerup_drop_time ) * 0.001;
level.powerup_drop_time = GetTime();

if( type == "random" )
{
level.powerup_random_count++;
}
else
{
level.powerup_score_count++;
}

println( "^1========== ^2POWER-UP DROPPED! ^1==========" );
println( "^5DROPPED^7: ^3" + powerup );
println( "^1======================================" );
/#
println( "HOW IT DROPPED: " + type );
println( "--------------------" );
println( "Drop Time: " + time );
println( "Random Powerup Count: " + level.powerup_random_count );
println( "Random Powerup Count: " + level.powerup_score_count );
println( "======================================" );
#/
}

But, it won't shot up in game because the type is set to debug somewhere in the script. I even tried entering debug mode, I don't know if I did successfully or not, but it wouldn't show up there either.

How could I make this script come to life without debug mode?
Marked as best answer by ibounce 9 years ago
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
IF the script is threaded somewhere by default, this should do:

Code Snippet
Plaintext
print_powerup_drop( powerup, type )
{

if( !IsDefined( level.powerup_drop_time ) )
{
level.powerup_drop_time = 0;
level.powerup_random_count = 0;
level.powerup_score_count = 0;
}

time = ( GetTime() - level.powerup_drop_time ) * 0.001;
level.powerup_drop_time = GetTime();

if( type == "random" )
{
level.powerup_random_count++;
}
else
{
level.powerup_score_count++;
}

iprintln( "^1========== ^2POWER-UP DROPPED! ^1==========" );
iprintln( "^5DROPPED^7: ^3" + powerup );
iprintln( "^1======================================" );

iprintln( "HOW IT DROPPED: " + type );
iprintln( "--------------------" );
iprintln( "Drop Time: " + time );
iprintln( "Random Powerup Count: " + level.powerup_random_count );
iprintln( "Random Powerup Count: " + level.powerup_score_count );
iprintln( "======================================" );
}

EDIT:
Quote
But, it won't shot up in game because the type is set to debug somewhere in the script.

The  /# mark #/ script that's only executed in developer mode, but also 'println' only prints to the console and or logfile ( not sure wich one's ) if you use iprintln  it  prints on the screen in the top left, and iprintlnbold prints the text in the center of the screen..
Last Edit: June 03, 2015, 04:24:55 pm by BluntStuffy
broken avatar :(
×
broken avatar :(
Location: usWisconsin
Date Registered: 5 September 2013
Last active: 4 years ago
Posts
70
Respect
Forum Rank
Rotting Walker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Just Having Fun.
×
ibounce's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
ibounce's Contact & Social LinksiBounceyiBounceun1tedbouncersibouncey
-snip-
Uh no....
I didn't even realize it was just println and not iprintln.
Thank you!

 
Loading ...