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-03-2011, 08:20 PM #2
INSAN3LY_D34TH
INSAN3LY GAMING
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";
self thread doEnd();
self freezeControls(false);
continue;
}
}
}

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.


ill test this out later tonight. and just making sure, this is for multiplayer correct?
06-03-2011, 09:51 PM #3
nay1995
The Master
yeah---------------
06-03-2011, 10:04 PM #4
XKevin356
Are you high?
wait what is? is there a model? whats supposed to happen
06-03-2011, 11:23 PM #5
INSAN3LY_D34TH
INSAN3LY GAMING
Originally posted by XKevin356 View Post
wait what is? is there a model? whats supposed to happen


ill post a video after i test it

---------- Post added at 04:23 PM ---------- Previous post was at 03:20 PM ----------

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";
self thread doEnd();
self freezeControls(false);
continue;
}
}
}

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.


it has a bad syntax error. but keep up the good work. quote me when you update the code and ill test again

The following user thanked INSAN3LY_D34TH for this useful post:

Skyl1n3
06-04-2011, 08:55 AM #6
nay1995
The Master
did you take out the self.score, otherwise it will not work

---------- Post added at 03:55 AM ---------- Previous post was at 03:53 AM ----------

my script defenatly doesnt have syntax, so it must be something you did, even if the code doesnt work it would still run the game
06-04-2011, 05:20 PM #7
INSAN3LY_D34TH
INSAN3LY GAMING
Originally posted by nay View Post
did you take out the self.score, otherwise it will not work

---------- Post added at 03:55 AM ---------- Previous post was at 03:53 AM ----------

my script defenatly doesnt have syntax, so it must be something you did, even if the code doesnt work it would still run the game


ya, i took out the self.score and left the code exactly how you gave it to me and the game got a syntax error.
06-04-2011, 05:30 PM #8
nay1995
The Master
it must be something you did even if my code doesnt work the game will still run
06-04-2011, 06:17 PM #9
INSAN3LY_D34TH
INSAN3LY GAMING
Originally posted by nay View Post
it must be something you did even if my code doesnt work the game will still run


have you tested this before?
06-04-2011, 07:19 PM #10
nay1995
The Master
no i made it for hawkins

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo