Post: [Release] Universal Lunar Landers
05-28-2013, 06:08 PM #1
coolbunny1234
the bunny who started it all
(adsbygoogle = window.adsbygoogle || []).push({}); Here is the code from my upcoming strategy lobby for Universal Landers. I'll update the code later with the exact positions and a full code that you can just copy and paste to use for all maps, but for now, here is just the code and the arguments, so you can mess around with them yourself. Enjoy!

Video Uploading

Picture of Universal Lander in Shi No Numa

You must login or register to view this content.

How To Use
    
self thread universalLunarLanders(pad,panel,pov1,pov2);
pad = Lunar Lander Pad Model
panel = Lunar Lander Control Panel Model
pov1 = Start Location
pov2 = End Location


Example

    self thread universalLunarLander("teleporter_pad","zombie_teleporter_control_panel",(52, -440, -1.2),(-1236, -515, 619));


The above is for Der Reise, as it has Der Reise locations/models

    universalLunarLanders(pad,panel,pov1,pov2)
{
lunar = [];
lunar[0] = spawnStruct();
lunar[0] = spawnSM(pov1, pad);
lunar[1] = spawnSM(pov1, pad, (-180, 0, 0));
if(getMap()=="nzf"){
playFx(level._effect["zombie_flashback_american"], lunar[0].origin);
playFx(level._effect["zombie_flashback_american"], pov2);
}
if(getMap()=="nzs"){
self thread s_effect_();
}
lunar[1] linkTo(lunar[0]);
lunar[0].seat = [];
for(m = 0; m < 4; m++)
lunar[0].seat[m] = spawnStruct();
lunar[0].seat[0] = spawnSM(lunar[0].origin+(0, 50, 20), "tag_origin");
lunar[0].seat[1] = spawnSM(lunar[0].origin+(0, -50, 20), "tag_origin");
lunar[0].seat[2] = spawnSM(lunar[0].origin+(50, 0, 20), "tag_origin");
lunar[0].seat[3] = spawnSM(lunar[0].origin+(-50, 0, 20), "tag_origin");
for(m = 0; m < lunar[0].seat.size; m++)
{
lunar[0].seat[m] linkTo(lunar[0]);
lunar[0].seat[m].occupied = false;
}
lunar[0].ctrlPanel = [];
lunar[0].ctrlPanel[0] = spawnSM(lunar[0].origin+(0, -8, 40), panel);
lunar[0].ctrlPanel[1] = spawnSM(lunar[0].origin+(0, 8, 40), panel, (0, 180, 0));
for(m = 0; m < lunar[0].ctrlPanel.size; m++)
lunar[0].ctrlPanel[m] linkTo(lunar[0]);
lunar[0].trig = [];
lunar[0].trig[0] = spawnTrig(lunar[0].origin, 50, 20, "HINT_NOICON", "Press & Hold &&1 To Use Lunar Lander! [Cost: 150]");
lunar[0].trig[1] = spawnTrig(pov2, 50, 20, "HINT_NOICON", "Press & Hold &&1 To Call Lunar Lander!");
lunar[0].trig[0] thread lunarThink(lunar[0],pov1,pov2);
lunar[0].trig[1] thread lunarThink(lunar[0],pov1,pov2);
lunar[0].pos = "spawn";
}

lunarThink(lunar,pov1,pov2)
{
for(;Winky Winky
{
self waittill("trigger", m);
if(m useButtonPressed() && !m.is_zombie && !isDefined(m.revivetrigger) && !isDefined(lunar.isMoving) && !isDefined(level.lunarCooling))
{
time = 0;
while(m useButtonPressed())
{
time+= .05;
if(!m useButtonPressed())
break;
if(time >= .3)
{
distance1 = distance(m.origin, pov1); //start
distance2 = distance(m.origin, pov2); //second pos
if(lunar.pos == "spawn"){
pos1 = distance1; pos2 = distance2;}
else{
pos1 = distance2; pos2 = distance1;}

if(pos1 < pos2)
{
if(m.score < 750){
m playSound("plr_"+m getEntityNumber()+"_vox_nomoney_perk_0");
break;}
else
m maps\_zombiemode_score::minus_to_player_score(150);
}
lunar.isMoving = true;
for(e = 0; e < getPlayers().size; e++)
if(distance(getPlayers()[e].origin, lunar.origin) < 100)
{
getPlayers()[e] enableGodMode();
getPlayers()[e] playerLinkTo(lunar.seat[getPlayers()[e] getEntityNumber()]);
getPlayers()[e].isOnLunar = true;
}
if(lunar.pos == "spawn") lunar thread lunarSpawn2Courtyard(pov2);
else lunar thread lunarCourtyard2Spawn(pov1);
wait 8.5;
for(e = 0; e < getPlayers().size; e++)
if(isDefined(getPlayers()[e].isOnLunar))
{
getPlayers()[e] disableGodMode();
getPlayers()[e] unlink();
getPlayers()[e].isOnLunar = undefined;
}
lunar.isMoving = undefined;
}
wait .05;
}
}
}
}

lunarSpawn2Courtyard(pov2)
{
self.pos = "courtyard";
self.trig[0] setHintString("Lunar Lander Is In Use!");
self.trig[1] setHintString("Lunar Lander Is In Use!");
self moveTo((self.origin[0], self.origin[1], 800), 3, .5, 1);
self vibrate((0, -100, 0), 1.5, .4, 3);
wait 3;
self moveTo(pov2 + (0,0,200), 3, .5, 1);
self rotateTo((5, 0, 10), 1, 0, .5);
self rotateTo((0, 0, 0), 1);
wait 3;
self moveTo(pov2, 3, .5, 1);
self vibrate((0, -100, 0), 1.5, .4, 3);
self.trig[0] setHintString("Lunar Lander Is Cooling...");
self.trig[1] setHintString("Lunar Lander Is Cooling...");
level.lunarCooling = randomIntRange(15, 30);
wait(level.lunarCooling);
level.lunarCooling = undefined;
self.trig[0] setHintString("Press & Hold &&1 To Call Lunar Lander");
self.trig[1] setHintString("Press & Hold &&1 To Use Lunar Lander! [Cost: 150]");
}

lunarCourtyard2Spawn(pov1)
{
self.pos = "spawn";
self.trig[0] setHintString("Lunar Lander Is In Use!");
self.trig[1] setHintString("Lunar Lander Is In Use!");
self moveTo((self.origin[0], self.origin[1], 800), 3, .5, 1);
self vibrate((0, -100, 0), 1.5, .4, 3);
wait 3;
self moveTo(pov1 + (0, 0, self.origin[2]), 3, .5, 1);
self rotateTo((-5, 0, -10), 1, 0, .5);
wait 2;
self rotateTo((0, 0, 0), 1);
wait 1;
self moveTo(pov1, 3, 0, 1);
self vibrate((0, -100, 0), 1.5, .4, 3);
wait 3;
self.trig[0] setHintString("Lunar Lander Is Cooling...");
self.trig[1] setHintString("Lunar Lander Is Cooling...");
level.lunarCooling = randomIntRange(15, 30);
wait(level.lunarCooling);
level.lunarCooling = undefined;
self.trig[0] setHintString("Press & Hold &&1 To Use Lunar Lander! [Cost: 150]");
self.trig[1] setHintString("Press & Hold &&1 To Call Lunar Lander");
}

spawnTrig(origin, width, height, cursorHint, string)
{
trig = spawn("trigger_radius", origin, 1, width, height);
trig setCursorHint(cursorHint);
trig setHintString(string);
return trig;
}

s_effect_(){
for(;Winky Winky{
playFx(level._effect["lightning_dog_spawn"], (9208, 1250, -650));
playFx(level._effect["lightning_dog_spawn"], (10988, -1755, -73Cool Man (aka Tustin));
wait 3;
}
}

//Functions Needed
spawnSM(origin, model, angles)
{
level.modelsSpawns++;
ent = spawn("script_model", origin);
ent setModel(model);
if(isDefined(angles))
ent.angles = angles;
return ent;
}
getMap()
{
if(level.script == "nazi_zombie_prototype")
return "nzp";
if(level.script == "nazi_zombie_asylum")
return "nza";
if(level.script == "nazi_zombie_sumpf")
return "nzs";
if(level.script == "nazi_zombie_factory")
return "nzf";
return "";
}
enableGodMode()
{
self enableInvulnerability();
}

disableGodMode()
{
self disableInvulnerability();
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked coolbunny1234 for this useful post:

Devastation
05-28-2013, 06:18 PM #2
zombiegangster
Pokemon Trainer
Originally posted by coolbunny1234 View Post
Here is the code from my upcoming strategy lobby for Universal Landers. I'll update the code later with the exact positions and a full code that you can just copy and paste to use for all maps, but for now, here is just the code and the arguments, so you can mess around with them yourself. Enjoy!

Video Uploading

Picture of Universal Lander in Shi No Numa

You must login or register to view this content.

How To Use
    
self thread universalLunarLanders(pad,panel,pov1,pov2);
pad = Lunar Lander Pad Model
panel = Lunar Lander Control Panel Model
pov1 = Start Location
pov2 = End Location


Example

    self thread universalLunarLander("teleporter_pad","zombie_teleporter_control_panel",(52, -440, -1.2),(-1236, -515, 619));


The above is for Der Reise, as it has Der Reise locations/models

    universalLunarLanders(pad,panel,pov1,pov2)
{
lunar = [];
lunar[0] = spawnStruct();
lunar[0] = spawnSM(pov1, pad);
lunar[1] = spawnSM(pov1, pad, (-180, 0, 0));
if(getMap()=="nzf"){
playFx(level._effect["zombie_flashback_american"], lunar[0].origin);
playFx(level._effect["zombie_flashback_american"], pov2);
}
if(getMap()=="nzs"){
self thread s_effect_();
}
lunar[1] linkTo(lunar[0]);
lunar[0].seat = [];
for(m = 0; m < 4; m++)
lunar[0].seat[m] = spawnStruct();
lunar[0].seat[0] = spawnSM(lunar[0].origin+(0, 50, 20), "tag_origin");
lunar[0].seat[1] = spawnSM(lunar[0].origin+(0, -50, 20), "tag_origin");
lunar[0].seat[2] = spawnSM(lunar[0].origin+(50, 0, 20), "tag_origin");
lunar[0].seat[3] = spawnSM(lunar[0].origin+(-50, 0, 20), "tag_origin");
for(m = 0; m < lunar[0].seat.size; m++)
{
lunar[0].seat[m] linkTo(lunar[0]);
lunar[0].seat[m].occupied = false;
}
lunar[0].ctrlPanel = [];
lunar[0].ctrlPanel[0] = spawnSM(lunar[0].origin+(0, -8, 40), panel);
lunar[0].ctrlPanel[1] = spawnSM(lunar[0].origin+(0, 8, 40), panel, (0, 180, 0));
for(m = 0; m < lunar[0].ctrlPanel.size; m++)
lunar[0].ctrlPanel[m] linkTo(lunar[0]);
lunar[0].trig = [];
lunar[0].trig[0] = spawnTrig(lunar[0].origin, 50, 20, "HINT_NOICON", "Press & Hold &&1 To Use Lunar Lander! [Cost: 150]");
lunar[0].trig[1] = spawnTrig(pov2, 50, 20, "HINT_NOICON", "Press & Hold &&1 To Call Lunar Lander!");
lunar[0].trig[0] thread lunarThink(lunar[0],pov1,pov2);
lunar[0].trig[1] thread lunarThink(lunar[0],pov1,pov2);
lunar[0].pos = "spawn";
}

lunarThink(lunar,pov1,pov2)
{
for(;Winky Winky
{
self waittill("trigger", m);
if(m useButtonPressed() && !m.is_zombie && !isDefined(m.revivetrigger) && !isDefined(lunar.isMoving) && !isDefined(level.lunarCooling))
{
time = 0;
while(m useButtonPressed())
{
time+= .05;
if(!m useButtonPressed())
break;
if(time >= .3)
{
distance1 = distance(m.origin, pov1); //start
distance2 = distance(m.origin, pov2); //second pos
if(lunar.pos == "spawn"){
pos1 = distance1; pos2 = distance2;}
else{
pos1 = distance2; pos2 = distance1;}

if(pos1 < pos2)
{
if(m.score < 750){
m playSound("plr_"+m getEntityNumber()+"_vox_nomoney_perk_0");
break;}
else
m maps\_zombiemode_score::minus_to_player_score(150);
}
lunar.isMoving = true;
for(e = 0; e < getPlayers().size; e++)
if(distance(getPlayers()[e].origin, lunar.origin) < 100)
{
getPlayers()[e] enableGodMode();
getPlayers()[e] playerLinkTo(lunar.seat[getPlayers()[e] getEntityNumber()]);
getPlayers()[e].isOnLunar = true;
}
if(lunar.pos == "spawn") lunar thread lunarSpawn2Courtyard(pov2);
else lunar thread lunarCourtyard2Spawn(pov1);
wait 8.5;
for(e = 0; e < getPlayers().size; e++)
if(isDefined(getPlayers()[e].isOnLunar))
{
getPlayers()[e] disableGodMode();
getPlayers()[e] unlink();
getPlayers()[e].isOnLunar = undefined;
}
lunar.isMoving = undefined;
}
wait .05;
}
}
}
}

lunarSpawn2Courtyard(pov2)
{
self.pos = "courtyard";
self.trig[0] setHintString("Lunar Lander Is In Use!");
self.trig[1] setHintString("Lunar Lander Is In Use!");
self moveTo((self.origin[0], self.origin[1], 800), 3, .5, 1);
self vibrate((0, -100, 0), 1.5, .4, 3);
wait 3;
self moveTo(pov2 + (0,0,200), 3, .5, 1);
self rotateTo((5, 0, 10), 1, 0, .5);
self rotateTo((0, 0, 0), 1);
wait 3;
self moveTo(pov2, 3, .5, 1);
self vibrate((0, -100, 0), 1.5, .4, 3);
self.trig[0] setHintString("Lunar Lander Is Cooling...");
self.trig[1] setHintString("Lunar Lander Is Cooling...");
level.lunarCooling = randomIntRange(15, 30);
wait(level.lunarCooling);
level.lunarCooling = undefined;
self.trig[0] setHintString("Press & Hold &&1 To Call Lunar Lander");
self.trig[1] setHintString("Press & Hold &&1 To Use Lunar Lander! [Cost: 150]");
}

lunarCourtyard2Spawn(pov1)
{
self.pos = "spawn";
self.trig[0] setHintString("Lunar Lander Is In Use!");
self.trig[1] setHintString("Lunar Lander Is In Use!");
self moveTo((self.origin[0], self.origin[1], 800), 3, .5, 1);
self vibrate((0, -100, 0), 1.5, .4, 3);
wait 3;
self moveTo(pov1 + (0, 0, self.origin[2]), 3, .5, 1);
self rotateTo((-5, 0, -10), 1, 0, .5);
wait 2;
self rotateTo((0, 0, 0), 1);
wait 1;
self moveTo(pov1, 3, 0, 1);
self vibrate((0, -100, 0), 1.5, .4, 3);
wait 3;
self.trig[0] setHintString("Lunar Lander Is Cooling...");
self.trig[1] setHintString("Lunar Lander Is Cooling...");
level.lunarCooling = randomIntRange(15, 30);
wait(level.lunarCooling);
level.lunarCooling = undefined;
self.trig[0] setHintString("Press & Hold &&1 To Use Lunar Lander! [Cost: 150]");
self.trig[1] setHintString("Press & Hold &&1 To Call Lunar Lander");
}

spawnTrig(origin, width, height, cursorHint, string)
{
trig = spawn("trigger_radius", origin, 1, width, height);
trig setCursorHint(cursorHint);
trig setHintString(string);
return trig;
}

s_effect_(){
for(;Winky Winky{
playFx(level._effect["lightning_dog_spawn"], (9208, 1250, -650));
playFx(level._effect["lightning_dog_spawn"], (10988, -1755, -73Cool Man (aka Tustin));
wait 3;
}
}

//Functions Needed
spawnSM(origin, model, angles)
{
level.modelsSpawns++;
ent = spawn("script_model", origin);
ent setModel(model);
if(isDefined(angles))
ent.angles = angles;
return ent;
}
getMap()
{
if(level.script == "nazi_zombie_prototype")
return "nzp";
if(level.script == "nazi_zombie_asylum")
return "nza";
if(level.script == "nazi_zombie_sumpf")
return "nzs";
if(level.script == "nazi_zombie_factory")
return "nzf";
return "";
}
enableGodMode()
{
self enableInvulnerability();
}

disableGodMode()
{
self disableInvulnerability();
}


Nice im new to coding gsc for waw so im not quite sure where to thread this at but it looks awesome cant wait to try it!

---------- Post added at 06:18 PM ---------- Previous post was at 06:18 PM ----------

Originally posted by coolbunny1234 View Post
Here is the code from my upcoming strategy lobby for Universal Landers. I'll update the code later with the exact positions and a full code that you can just copy and paste to use for all maps, but for now, here is just the code and the arguments, so you can mess around with them yourself. Enjoy!


Nice im new to coding gsc for waw so im not quite sure where to thread this at but it looks awesome cant wait to try it!
05-28-2013, 07:10 PM #3
coolbunny1234
the bunny who started it all
Originally posted by zombiegangster View Post
Nice im new to coding gsc for waw so im not quite sure where to thread this at but it looks awesome cant wait to try it!

---------- Post added at 06:18 PM ---------- Previous post was at 06:18 PM ----------



Nice im new to coding gsc for waw so im not quite sure where to thread this at but it looks awesome cant wait to try it!


You should have an init() thread somewhere, thread it under that!
05-29-2013, 01:18 PM #4
TheKodingKobra
Do a barrel roll!
Coolbunny. Still bringing brilliant gsc scripts to a dying section. Long live world at war. Keep up your great work Smile
05-29-2013, 02:11 PM #5
Specter
Pro Memer
This is some nice coding man, but it'd be even better if you added gates that go up on the sides (maybe you can use the shi no numa picket fences?). Just a suggestion.
05-29-2013, 05:29 PM #6
zombiegangster
Pokemon Trainer
Originally posted by NGU
This is some nice coding man, but it'd be even better if you added gates that go up on the sides (maybe you can use the shi no numa picket fences?). Just a suggestion.


Ha that's a great idea but I dont think you cant just slap those in the script I imagine that it would take a lot of time to script that in as well not that I dont think coolbunny couldn't do it but I mean hey who doesn't love devotionSmile
05-30-2013, 04:12 PM #7
xRaW
xI2aW-
Would you like a video of this so it shows exactly what they do? Obviously people know what a lunar lander is but seeing it in action would be better :p

The following 2 users say thank you to xRaW for this useful post:

philipeininger, xX_mchawk115_Xx

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo