Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Discussion: The Ridiculously Simple Method to a Phantom Av

Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
05-31-2005 18:59
Here is the bare-bones method for making your av phantom. If you've ever gotten sick of trying to navigate around rezzing buildings, and you wish you could just fly right through them, this is all you need to use to achieve it.

The first step is setting up the prim. Rez two spheres side-by-side and link them. Using "Edit linked parts", select the child prim and put the following script in it:

CODE
default
{
state_entry()
{
llVolumeDetect(TRUE);
}
}


After saving the script, unlink the prims and delete the one you put the script in. The remaining prim should now act like a phantom prim, even though it's not set to phantom. Next, place the following script in it:

CODE
default
{
state_entry()
{
llListen(1, "", llGetOwner(), "");
}

listen(integer channel, string name, key id, string message)
{
if (message == "phantom on")
{
llSetScale(<.4, .4, .4>);
llSetScale(<.5, .5, .5>);
}
else if (message == "phantom off")
{
llResetScript();
}
}
}


Finally, attach the prim. Type "/1 phantom on" to turn on phantom mode, and "/1 phantom off" to turn it off. That's all there is to it! Note that this is intended for flying only; it can do some pretty funky stuff in walk mode. :p

Feel free to add your own bugfixes & embellishments to this.
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Original Thread:
06-02-2005 22:03
/15/44/48641/1.html
_____________________
i've got nothing. ;)
Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
06-02-2005 23:54
Note that this method does NOT support sim crossings. You would need to use llSetScale whenever crossing a sim border.
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
06-03-2005 00:19
D'oh! Hand't thought of that >.<

Well, here's my controller. I like to ghost when flying to avoid problems of late-rezzing buildings:

CODE
default
{
state_entry()
{
llSetTimerEvent(1.0);
}

timer()
{
if(llGetAgentInfo(llGetOwner()) & AGENT_FLYING) // Wait 'till the agent starts to fly.
{
state flying;
}
}
}

state flying
{
state_entry() // Activate the bug ... er... ghosting upon flight
{
llSetScale(<.2, .2, .2>);
llSetScale(<.1, .1, .1>);
llSetTimerEvent(1.0);
}

moving_start() // Reactivate on move and (thisis the best bit) on a sim crossing.
{
llSetScale(<.2, .2, .2>);
llSetScale(<.1, .1, .1>);
}

timer()
{
if(!(llGetAgentInfo(llGetOwner()) & AGENT_FLYING)) // Stop when no longer flying
{
llResetScript();
}
}
}
_____________________
Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
06-03-2005 21:11
Ah, so moving_start is called upon sim crossing? Good to know... I'll have to remember that!

Also, someone showed me an alternate way to prepare the prim: Use just one prim, and place the controller script in it with llVolumeDetect(TRUE) added to state_entry. Then attach the prim and delete the volume-detect line.
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden
Stinky Queso
Second Life Resident
Join date: 29 Nov 2004
Posts: 53
06-04-2005 02:36
From: someone
Also, someone showed me an alternate way to prepare the prim



"someone"
Laharl Fassbinder
Registered User
Join date: 12 Oct 2004
Posts: 68
06-04-2005 05:29
i didnt try this yet, but when i use llVolumeDetect on my vehicles, they can go underground, so keep an eye open :P
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
06-04-2005 15:08
is there any way to get this to deal with no-script zones like at the welcome area?
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Stinky Queso
Second Life Resident
Join date: 29 Nov 2004
Posts: 53
^^^^^^^^^^^
06-04-2005 16:16
yeah sure, but you have to go to a script enabled zone first. though if you pass into no script zone when you arent flying you will still be phantom.
Phylos Qin
Registered User
Join date: 3 Mar 2005
Posts: 1
Phantom Script for Flying and Walking
10-12-2005 09:13
Hey Beatfox, thanks for the phantom method/script!

Beatfox Xevious' Phantom AV is excellent for flying, but for walking is unstable. When the script is on, the arms and legs just flail about...looks like a skydiving animation. So, I studied this problem a bit. I think I have a good solution, see script below.

How to use. Follow Xevious' method for creating a prim that is phantom. Drop the script below in the parent prim. This script contains voice, collision, and move events to control and stabilize the phantom effect. Wear the phantom object on spine (other positions give less desirable effects). When walking, the script automatically kicks on phantom during collision and turns off afterwards. Also, it has voice for flight (from Xevious' script).

N.B., this script only allows walking on land. Flailing still occurs when walking on floor objects or landing on objects. Perhaps a collision filter would fix this.

Ok, that's about it. Hope this helps. Of course, suggestions, comments, improvements are welcome.

-Phylos


CODE


//Phantom script By Phylos Qin.
//Phantom method by Beatfox Xevious.

default
{
state_entry()
{
llSetScale(<.05, .05, .8>);
llListen(5, "", llGetOwner(), "");
}
on_rez(integer total_number)
{
llResetScript();
}
listen(integer channel, string name, key id, string message)
{

if (message == "po")
{
llSetScale(<.05, .05, .8>);
llSetScale(<.05, .05, 1>);
}
if (message == "pn")
{
llResetScript();
}
}
collision_start(integer total_number)
{
llSetScale(<.05, .05, 1>);
}
moving_start()
{
llSetScale(<.05, .05, .8>);
}
moving_end()
{
llResetScript();
}
}



edit: for some reason, didn't see Callahan's script. hmm...have to try...ok, just took it for a spin. Excellent.
Nathan Stewart
Registered User
Join date: 2 Feb 2005
Posts: 1,039
10-12-2005 09:44
Just to note this or the previous method doesnt work in 1.7 of sl
_____________________
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
05-05-2008 17:46
From: Nathan Stewart
Just to note this or the previous method doesnt work in 1.7 of sl


yep, doesn't work now either. but mystitool does have a non-phys vehicle with walking, flying, and other animations in it. great tool for walking thru walls, as long as you can build in the area. if not, you may be able to rez it in a building area and "walk" back to the desired non-building area, as long as it allows object entry
Wicc Cunningham
Registered User
Join date: 25 Jun 2004
Posts: 52
05-06-2008 09:46
I'm wondering why you are changing the size of the prim? How does that "activate/deactivate" the phantom of the av/object?
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
05-06-2008 09:57
From: Wicc Cunningham
I'm wondering why you are changing the size of the prim? How does that "activate/deactivate" the phantom of the av/object?

It really doesn't matter. It was a hack that worked WAAAAAAAAAAAAAAAAY back when this thread was started. It hasn't worked in years.
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
05-06-2008 10:04
From: Hewee Zetkin
It really doesn't matter. It was a hack that worked WAAAAAAAAAAAAAAAAY back when this thread was started. It hasn't worked in years.

TY for posting that - didn't notice the dates on earlier posts and was also ready to ask WTH setting prim size had to do with anything.
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left