Jump to content

Need help with some scripts...


Fitzypoop
 Share

You are about to reply to a thread that has been inactive for 4126 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hey all, 

I'm new to scripting and there's a few things I want to do but I have very little idea on where to begin or what script codes to use.

First, I want to make it possible for my avatar to "become invisible."  I don't know if it's possible for the entire avatar to go invisible like prims can so I'll settle for shoving him underground.  The type of script I'm looking for would allow me to click on an object which would then cause the avatar to "disappear."  How would I go about doing this?

Second, I have been able to make prims appear and disappear on command through the chat box.  Unfortunately for what I want to do this process is too slow.  What I want is for the object to appear when my avatar starts flying and to disappear when he stops flying.  From what I've seen through searching, the CONTROL code works with button presses but all I've seen has it working with movements and mouse clicks, not the F key for flight.

I'm mostly looking for someone to tell me what to do so I can figure it out from there.  Any help would be greatly appreciated.

Link to comment
Share on other sites

There used to be all sorts of hacks for cloaking an avatar, but now it's pretty simple--just use an outfit consisting of a full avatar alpha mask and no visible attachments. That's not scripted, though, and isn't something you can trigger and undo instantly (although changing complete outfits is pretty fast... and I suppose it could be scripted for those using RLV, but that's pretty special-case). If you really want to do something with a script, you could have it play an animation (llStartAnimation) where that animation displaces the visible avatar below the agent's actual location, as you suggested.

Either way, it's a cosmetic effect; the avatar will still show up on the mini-map, for example, and the nametag will be visible (somewhere).

The other problem of hiding prims (attachments, I presume) while the avatar is flying is something you'd do with a script. The way to know if an avatar is flying or not is to test whether llGetAgentInfo() has the AGENT_IN_AIR bit set (or, depending what you want, possibly AGENT_FLYING). Then, when you want to hide stuff, you might call llSetAlpha(), although you may want to set the alpha of many or all linked prims at the same time, which would use llSetLinkAlpha() (or equivalent commands in llSetLinkPrimitiveParamsFast().)

You mentioned controls, and there's a way llTakeControls() might be relevant: Once a script takes controls--even if it doesn't do anything with them--it will continue to work even on no-script land, which may be handy for your application.

Link to comment
Share on other sites


Bia Arcana wrote:

I need a script that works like a teleport or a sensor. A script to go anywhere when the avatar click it, go to another object without needing coordinates

Someone help me?
:matte-motes-not-entertained:

You're hoping for a version of llTeleportAgent that will work for someone other than the script owner.  So are we.  Unfortunately, it looks as if it's going to be a while before LL releases that.  Until then, you're stuck with writing your script around llMapDestination, which opens map view and then requires the person to click its Teleport button.  If you are only going to TP within the same sim, of course, you can use any version of a sit teleporter.

Link to comment
Share on other sites

In order for a script to "go anywhere", you have to tell the script where you want to go.  Within the same sim, "anywhere" can just be a set of coordinates where you either define a sit target or a place to move a prim that the avatar sits on.  If you intend to teleport beyond the sim, the common option is llMapDestination, as I described earlier.  With llMapDestination, you also need to provide a sim name and coordinates.  Your only other choice is to create a SLURL that the user needs to click in order to teleport.  A SLURL, also, requires coordinates.  When you write your TP script, those are your choices.

Link to comment
Share on other sites

hum ok, I think I begin to understand.
In the case of animation have another doubt.
The animation must be configured within a line of the script, or just because colcar the object it will work.
Sorry again and ta the English and my lack of ability to understand

Link to comment
Share on other sites

I just saw the link you sent me very good thanks.

Returning to the script, I'm looking at it here again and saw that he did not follow coordinates or url. I'll try to explain, you put the script into 2 objects name and description. So you can rezz this object anywhere within the same SIM that both estejm clicking the avatar goes to another object
If I get these 2 objects and change yes, I can rezz on earth and will work.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4126 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...