What's new

Discussion [Release] Toggable Insta-kill

V

vJoordan

Enthusiast
Messages
83
Reaction score
6
Points
55
Sin$
0
nothing much just never seen it before and thought it would be helpful


InstaKill()
{
if (self.insta == false)
{
level.zombie_vars["zombie_insta_kill"] = 1;
self.insta = true;
self iprintln("^2Insta-Kill ON");
}
else
{
level.zombie_vars["zombie_insta_kill"] = 0;
self.insta = false;
self iprintln("^1Insta-Kill OFF");
}
}
 
Mikeeeyy

Mikeeeyy

Member
Modder Programmer Grammar Nazi
Messages
2,176
Reaction score
1,307
Points
485
Sin$
7
nothing much just never seen it before and thought it would be helpful


InstaKill()
{
if (self.insta == false)
{
level.zombie_vars["zombie_insta_kill"] = 1;
self.insta = true;
self iprintln("^2Insta-Kill ON");
}
else
{
level.zombie_vars["zombie_insta_kill"] = 0;
self.insta = false;
self iprintln("^1Insta-Kill OFF");
}
}
This is in my SkyBase patch and I think MFv1 not sure
 
AoKMiKeY

-Algorithm-

I am not a man.
Seasoned Veteran Experienced Veteran Grizzled Veteran
Messages
1,844
Reaction score
685
Points
315
Sin$
7
i think this has been posted before
also thanks you have just given me a very good idea for the perfectionist v2
 
P

oO Di2eamZz

Enthusiast
Messages
1,364
Reaction score
245
Points
165
Sin$
0
Code:
instaKill()
{
if( !isDefined( zombieVar ) ){
level.zombie_vars[ "zombie_insta_kill" ] = 1;
printlnbold( "Insta-Kill Activated" );
} else {
level.zombie_vars[ "zombie_insta_kill" ] = 0;
zombieVar = undefined;
}

Why not just do that?

Or...

Code:
instaKill( totalTime )
{
timerHud = self createFontString( "default", 2.0 );
timerHud setPoint( "TOP", "LEFT", 5, 15 );
if( !isDefined( zombieVar ) ){
level.zombie_vars[ "zombie_insta_kill" ] = 1;
timerHud setText( "Insta-Kill Activated" );
wait 2;
if( !isDefined( totalTime ) ){
totalTime = 20;
} else {
for( time = totalTime; time >= 0; time-- ){
timerHud setText( "Insta-Kill Time: " + time );
wait 1;
}
}
timerHud destroy();
level.zombie_vars[ "zombie_insta_kill" ] = 0;
}
 
V

vJoordan

Enthusiast
Messages
83
Reaction score
6
Points
55
Sin$
0
Code:
instaKill()
{
if( !isDefined( zombieVar ) ){
level.zombie_vars[ "zombie_insta_kill" ] = 1;
printlnbold( "Insta-Kill Activated" )
}
else level.zombie_vars[ "zombie_insta_kill" ] = 1;
}

Why not just do that?
because that aint toggable
 
Mikeeeyy

Mikeeeyy

Member
Modder Programmer Grammar Nazi
Messages
2,176
Reaction score
1,307
Points
485
Sin$
7
Code:
instaKill()
{
if( !isDefined( zombieVar ) ){
level.zombie_vars[ "zombie_insta_kill" ] = 1;
printlnbold( "Insta-Kill Activated" )
}
else level.zombie_vars[ "zombie_insta_kill" ] = 1;
}

Why not just do that?
You come out with some random $hit
 
V

vJoordan

Enthusiast
Messages
83
Reaction score
6
Points
55
Sin$
0
Thank you for having some general knowledge sir, but yes I forgot the
Code:
else
{
zombieVar = undefined;
}

see like i said it wasn't toggable because it only had the isdefined and the iprintln for activated
 
ActionScript

XG R4PiDzZ

XG R4PiDzZ
Grizzled Veteran Programmer Modder
Messages
2,649
Reaction score
1,405
Points
475
Sin$
0
People still making stuff too complicated..
Code:
instaKill(){
if(level.zombie_vars["zombie_insta_kill"]) level.zombie_vars["zombie_insta_kill"] = false;
else level.zombie_vars["zombie_insta_kill"] = true;
}

Or even smaller.
Code:
toggleInstaKill(){
level.zombie_vars["zombie_insta_kill"] = !level.zombie_vars["zombie_insta_kill"];
}
 
ActionScript

XG R4PiDzZ

XG R4PiDzZ
Grizzled Veteran Programmer Modder
Messages
2,649
Reaction score
1,405
Points
475
Sin$
0
Code:
instaKill()
{
if( !isDefined( zombieVar ) ){
level.zombie_vars[ "zombie_insta_kill" ] = 1;
printlnbold( "Insta-Kill Activated" );
} else {
level.zombie_vars[ "zombie_insta_kill" ] = 0;
zombieVar = undefined;
}

Why not just do that?

Or...

Code:
instaKill( totalTime )
{
timerHud = self createFontString( "default", 2.0 );
timerHud setPoint( "TOP", "LEFT", 5, 15 );
if( !isDefined( zombieVar ) ){
level.zombie_vars[ "zombie_insta_kill" ] = 1;
timerHud setText( "Insta-Kill Activated" );
wait 2;
if( !isDefined( totalTime ) ){
totalTime = 20;
} else {
for( time = totalTime; time >= 0; time-- ){
timerHud setText( "Insta-Kill Time: " + time );
wait 1;
}
}
timerHud destroy();
level.zombie_vars[ "zombie_insta_kill" ] = 0;
}

This would make it easier.
Code:
instaKill(time){
level.zombie_vars["zombie_insta_kill"] = true;
if(!isDefined(time)) time = 30;
for(i = time; i >= 0; i--){
self iPrintLn("InstaKill expires in: " + i + " seconds.");
wait 1;
}
level.zombie_vars["zombie_insta_kill"] = false;
}
 
Top Bottom
Login
Register