Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Havok 4 Flight assist scripts...

MortVent Charron
Can haz cuddles now?
Join date: 21 Sep 2007
Posts: 1,942
05-04-2008 21:49
I've seen examples of the older ones... but usually far more complex and full of stuff I don't need.

And then read up on havok 4 issues with them.

So are there any simple ones that simply check to see if the avatar is flying and then allows them to fly higher (possibly with a bit more speed than normal, at most run speeds) ?
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
05-05-2008 00:12
I believe something like this should do it (note: not yet compiled; may need minor syntax fixes):

CODE

float TIMER_PERIOD = 0.5;
float NORMAL_FLY_HEIGHT_LIMIT = 50.0;

default
{
state_entry()
{
llSetBuoyancy(0.0);
if (llGetAttached())
{
llSetTimerEvent(TIMER_PERIOD);
}
}

attached(key id)
{
if (id != NULL_KEY)
{
llSetTimerEvent(TIMER_PERIOD);
} else
{
llSetTimerEvent(0.0);
llSetBuoyancy(0.0);
}
}

timer()
{
float buoyancy = 0.0;
if (llGetAgentInfo(llGetOwner()) & AGENT_FLYING)
{
vector pos = llGetPos();
if (pos.z >= llGround(ZERO_VECTOR)+NORMAL_FLY_HEIGHT_LIMIT)
{
buoyancy = 1.0;
}
}

llSetBuoyancy(buoyancy);
}
}


Good luck!
MortVent Charron
Can haz cuddles now?
Join date: 21 Sep 2007
Posts: 1,942
05-05-2008 10:38
thanks, was only one error on the attached line. Was simply attach(key.id)

But works just as i need it to, thanks a lot

though still playing around with the values. I'm thinking 1.5 gives it the right upward speed


(and it's slim script so less overhead)
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
05-07-2008 14:08
Attempts to use this, provide annoying and inconsistent results.

When I CAN get it to work... if I use the 1.5 buoyancy, every time I fly forward, I also drift upward. (almost at a 45 degree angle)

Additionally, a lot of the difficulty working with it, seems to come from the fact that you can't edit the script while wearing it, because on reset it doesn't detect that it's being worn anymore. So you have to drop it and rewear it in order for it to initialize
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
MortVent Charron
Can haz cuddles now?
Join date: 21 Sep 2007
Posts: 1,942
05-07-2008 18:56
From: Winter Ventura
Attempts to use this, provide annoying and inconsistent results.

When I CAN get it to work... if I use the 1.5 buoyancy, every time I fly forward, I also drift upward. (almost at a 45 degree angle)

Additionally, a lot of the difficulty working with it, seems to come from the fact that you can't edit the script while wearing it, because on reset it doesn't detect that it's being worn anymore. So you have to drop it and rewear it in order for it to initialize


Hmm, one option is to find the havok 4 rating and simply set it to nullify that.

Let me do a search and see if I can find it

edit:

Seems to be variable... buoyancy is kinda borked a bit in havok 4

Most flight scripts are. One option I guess is to tweak the script a bit up in a large builder's box.
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
05-07-2008 20:40
From: MortVent Charron
buoyancy is kinda borked a bit in havok 4

Most flight scripts are.


People keep saying that, but nearly every flight script I've tried seems to work reasonably.. This one is just acting weird.
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
MortVent Charron
Can haz cuddles now?
Join date: 21 Sep 2007
Posts: 1,942
05-07-2008 20:48
From: Winter Ventura
People keep saying that, but nearly every flight script I've tried seems to work reasonably.. This one is just acting weird.


This one uses the one factor.

Most use velocity adjustments and other techniques.

Just tried it in a havok 4 sandbox and had no problems. Also worked fine in a std sim...

I'll double check and tweak my version a bit tomorrow. See if I can figure out what may be causing trouble
Rez Gray
Registered User
Join date: 2 Apr 2007
Posts: 23
Faking recoil-error (weapon innacuracy) in SL
05-19-2008 09:32
- nevermind, stupid new topic button.....