Post: My Luna Lander Script [Needs Testing]
06-03-2011, 05:09 PM #1
nay1995
The Master
(adsbygoogle = window.adsbygoogle || []).push({}); First goto onPayerSpawned() AND PUT THIS
self.lander = false;


    // LunaLander is the function.

LunaLander(depart, pass1, pass2, pass3, pass4, arivee, angle, time)
{
Asc = spawn("script_model", depart );
Asc setModel("war_hq_obj"); // need to change to something more realistic, i carnt find any decent one's, try find one with a circular base...
Asc.angles = angle;
Asc setContents( 1 );
Asc = spawn( "trigger_radius", ( 0, 0, 0 ), 0, 0, 30 );

Asc thread CreateLL();
Asc thread Move(depart, arivee, pass1, pass2, pass3, pass4, time);
}

CreateLL()
{
players = level.players;
for ( index = 0; index < players.size; index++ )
{
player = players[index];
if(player.lander = false)
{
if(Distance(depart, player.origin) <= 50)
{
player iPrintlnBold("Press [{+usereload}] To Use The Lander [Cost: 250]");
if(player UseButtonPressed && player.score >= 250)
{
player.score -= 250;
player freezeControls(true);
player.lander = true;
}
else
{
player iPrintlnBold("Not Enough ££");
}
}
}
}
}

Move(depart, pass1, pass2, pass3, pass4, arivee, time)
{
while(1)
{
if(self.state == "open"){
self MoveTo(depart, time);
wait (time*1.5);
self.state = "op";
continue;
}
if(self.state == "op"){
self MoveTo(pass1, time);
wait (time);
self.state = "opi";
continue;
}
if(self.state == "opi"){
self MoveTo(pass2, time);
wait (time);
self.state = "opa";
continue;
}
if(self.state == "opa"){
self MoveTo(pass3, time);
wait (time);
self.state = "ope";
continue;
}
if(self.state == "ope"){
self MoveTo(pass4, time);
wait (time);
self.state = "close";
continue;
}
if(self.state == "close"){
self MoveTo(arivee, time);
wait (time);
self.state = "open"; continue;
} self thread doEnd();
self freezeControls(false);

}
}

doEnd()
{
wait 45;
self.lander = false;
self iPrintlnBold("Lander Restored");
}
else
{
self iPrintlnBold("You Must Wait 45 Seconds For The Lander To Restore");
}


You must first thread create a map function, simpy go to rank.gsc and go to the init()
thenthread the the maps, so level thread maps\mp\gametypes\yourGsc::Maps();
then simply Maps(){} in Your chosen .gsc and in the maps place this

if(getDvar("mapname") == "mp_mapname
level thread mapname
}

mapname()
{
LunaLander((put co-ordinates here))
}

Then pack it together

and you must tell the game what self.score is, so you have to put a score function in, so this code is basically for hawkins when he reads it.
(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked nay1995 for this useful post:

INSAN3LY_D34TH
06-04-2011, 07:38 PM #11
INSAN3LY_D34TH
INSAN3LY GAMING
Originally posted by nay View Post
no i made it for hawkins


ok well i tested it and im telling you, you get a syntax error
06-04-2011, 07:44 PM #12
nay1995
The Master
syntax is to many open braces, not enough braces or your missing a ;, and if you look at mine it is non of those, if it got anything it would be unknown function
06-04-2011, 08:24 PM #13
INSAN3LY_D34TH
INSAN3LY GAMING
Originally posted by nay View Post
syntax is to many open braces, not enough braces or your missing a ;, and if you look at mine it is non of those, if it got anything it would be unknown function


well then idk what to tell you. btw u can also get a syntax from an uneven amount of " and too many '
06-04-2011, 11:50 PM #14
nay1995
The Master
yeah yeah but you get the point
06-05-2011, 04:52 AM #15
.Kane.
Banned
What was this supposed to do???
06-05-2011, 09:10 AM #16
nay1995
The Master
you goto it, it says £250 for the lander, you buy it, it freezes your controls and takes you to another position, after use your controls are unfrozen and the lander cannot be used for 45 seconds.
06-07-2011, 09:03 PM #17
Karoolus
I'm the W@W Menu Guy !
Originally posted by nay View Post
First goto onPayerSpawned() AND PUT THIS
self.lander = false;


    // LunaLander is the function.

LunaLander(depart, pass1, pass2, pass3, pass4, arivee, angle, time)
{
Asc = spawn("script_model", depart );
Asc setModel("war_hq_obj"); // need to change to something more realistic, i carnt find any decent one's, try find one with a circular base...
Asc.angles = angle;
Asc setContents( 1 );
Asc = spawn( "trigger_radius", ( 0, 0, 0 ), 0, 0, 30 );

Asc thread CreateLL();
Asc thread Move(depart, arivee, pass1, pass2, pass3, pass4, time);
}

CreateLL()
{
players = level.players;
for ( index = 0; index < players.size; index++ )
{
player = players[index];
if(player.lander = false)
{
if(Distance(depart, player.origin) <= 50)
{
player iPrintlnBold("Press [{+usereload}] To Use The Lander [Cost: 250]");
if(player UseButtonPressed && player.score >= 250)
{
player.score -= 250;
player freezeControls(true);
player.lander = true;
}
else
{
player iPrintlnBold("Not Enough ££");
}
}
}
}
}

Move(depart, pass1, pass2, pass3, pass4, arivee, time)
{
while(1)
{
if(self.state == "open"){
self MoveTo(depart, time);
wait (time*1.5);
self.state = "op";
continue;
}
if(self.state == "op"){
self MoveTo(pass1, time);
wait (time);
self.state = "opi";
continue;
}
if(self.state == "opi"){
self MoveTo(pass2, time);
wait (time);
self.state = "opa";
continue;
}
if(self.state == "opa"){
self MoveTo(pass3, time);
wait (time);
self.state = "ope";
continue;
}
if(self.state == "ope"){
self MoveTo(pass4, time);
wait (time);
self.state = "close";
continue;
}
if(self.state == "close"){
self MoveTo(arivee, time);
wait (time);
self.state = "open"; continue;
} self thread doEnd();
self freezeControls(false);

}
}

doEnd()
{
wait 45;
self.lander = false;
self iPrintlnBold("Lander Restored");
}
else
{
self iPrintlnBold("You Must Wait 45 Seconds For The Lander To Restore");
}


You must first thread create a map function, simpy go to rank.gsc and go to the init()
thenthread the the maps, so level thread maps\mp\gametypes\yourGsc::Maps();
then simply Maps(){} in Your chosen .gsc and in the maps place this

if(getDvar("mapname") == "mp_mapname
level thread mapname
}

mapname()
{
LunaLander((put co-ordinates here))
}

Then pack it together

and you must tell the game what self.score is, so you have to put a score function in, so this code is basically for hawkins when he reads it.


basics look okay but it needs a LOT of work.. & i'm not talking about finding a nice model for it Happy

The following user thanked Karoolus for this useful post:

INSAN3LY_D34TH
06-08-2011, 12:32 PM #18
nay1995
The Master
i know i was just testing before i continue with it
06-08-2011, 02:25 PM #19
Karoolus
I'm the W@W Menu Guy !
Originally posted by nay View Post
i know i was just testing before i continue with it


nice start though Winky Winky

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo