Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Crude 250m+ flight enhancer for newbies

Jolan Nolan
wannabe
Join date: 12 Feb 2006
Posts: 243
01-04-2007 10:21
This is a bare-bones script method that will enable you new people to fly higher than 250m without buying a premade enhancer. While they are less hassle and come in pretty designs like belts and jetpacks, you can use this as a starting point in learning how to do create your own. If height enhancers are made a different way, here's another method :p.

------------------------
OK, first let's create the button you will use to activate it. It is a simple button that sits on your HUD that you click on to give you that extra boost.
Make a cube x0.04 y0.04 z0.04 and attach it to your HUD somewhere (mine's in top right).
Now right-click and edit, and add this script to it:

CODE


// Crude bare bones 250m+ lifter
// This simple command will allow you to fly higher than the 250m limit
// simply by 'pushing' yourself.

integer power = 20; // Strength to push with

default
{
touch_start(integer total_number)
{
llPushObject(llGetOwner(), <0, 0, power>, ZERO_VECTOR, 1);
}
}



Now all you have to do when you hit that 250m mark, is click the button in your HUD and you will get thrown up higher. This second script will push harder if you click faster (double-click):

CODE


integer power = 20;
integer power_plus = 50;

default
{
state_entry()
{
llSetText((string)zed,<1,1,1>,1.0);
}

touch_start(integer total_number)
{
llPushObject(llGetOwner(), <0, 0, power>, ZERO_VECTOR, 1);
llSetTimerEvent(0.5); // Set the timer smaller to give less time to double-click
state power;
}
}

state power
{
touch_start(integer total_number)
{
llPushObject(llGetOwner(), <0, 0, power_plus>, ZERO_VECTOR, 1);
}

timer()
{
state default;
}
}



I hope this is of help to someone(s) :).

- Jolan
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Discussion Thread
01-06-2007 09:29
/54/32/158925/1.html
_____________________
i've got nothing. ;)