Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Text Activated Phatom Script Help Please!

Devin Calhoun
Registered User
Join date: 4 Jun 2006
Posts: 4
07-16-2006 01:30
Hello All, Im looking for a Script that I can add to my existing Gun script to make the guns go into "PHANTOM" i guess its called when i type "AO OFF" and Holster My Guns. i Want it so exactly when i type AO Off and my stance returns to normal Standing my 2 Pistols will become invis/phantom and be unseen, Also a script wich will do the opposite, though im sure i can modify it to do that myself for my holster so the guns switch visibility ya know? AO OFF would take em outa vis on my hand and make them visable on my holsters, i know ill require the holsters and 2 more guns for that. ALL I NEED IS THE PHANTOM SCRIPT :D. i already have everything else ready to go i just needthis small part to add to my script and id be all set. If anyone can lend me a hand id GREATLY appreciate it.

Thanks to all who respond
Dev
LaZy Hulka
Registered User
Join date: 11 Apr 2006
Posts: 32
07-16-2006 01:55
Do you mean somthing like this?




listen(integer channel, string name, key id, string msg)
{
if (msg == ao off)
{
llSetAlpha(1,ALL_SIDES);
llSetTimerEvent(time);

}

if (msg == ao on)
{
llSetAlpha(0,ALL_SIDES);
}
}
timer()
{
llSetAlpha(0,ALL_SIDES);
}
Devin Calhoun
Registered User
Join date: 4 Jun 2006
Posts: 4
07-16-2006 03:14
Hey thanks for the reply, did i mention im still a newb at this lol

I tried to copy and paste that into my script and i get syntax errors, where specificaly do i need to put that in, i tried a few diff places but no luck all syntax errors :(

i was thinking i should put that stuff in this part of the script but like i said im a newb hehe

Thanks for your help i appreciate it =]

llisten( integer _channel, string _name, key _id,string _message ) {
string match;

// Send a link message to all other scripts, so they don't have to use a listen
llMessageLinked( LINK_SET, listenRelay, _message, _id );

// Performance hack, early ignore of messages

if ( llSubStringIndex(_message,"ao";)==-1 && llSubStringIndex(_message,"animset";)==-1 )
return;

match = checkMatch( _message, loadCmd );
if( match != "" )
loadNoteCard( match );
match = checkMatch( _message, animCmd );
if ( match == "on" ) {
llSetTimerEvent( timerEventLength );
animOverrideOn = TRUE;
if ( gotPermission )
animOverride();
llOwnerSay( "Guns Drawn." );
if (msg == "ao off";)
{
llSetAlpha(1,ALL_SIDES);
llSetTimerEvent(time);






}
else if ( match == "off" ) {
llSetTimerEvent( 0 );
animOverrideOn = FALSE;
startNewAnimation( "", noAnimIndex, lastAnimState );
llOwnerSay( "Guns Holstered." );
}
else if ( match == "hide" ) {
llSetLinkAlpha( LINK_SET, 0, ALL_SIDES );
llOwnerSay( "Franimation override set invisible." );
}
else if ( match == "show" ) {
llSetLinkAlpha( LINK_SET, 1, ALL_SIDES );
llOwnerSay( "Franimation override set visible." );
}
else if ( match == "nextstand" ) {
if ( animOverrideOn && gotPermission )
doNextStand();
}
else if ( match == "reset" ) {
llResetScript();
}
}