Jump to content

Ultea

Resident
  • Posts

    4
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yes thank you, I was adding more lines just to be extra sure things were working right; originally I didn't have any of those statements written out, and will just use all_off/power_on/power_off again from now on!
  2. Thanks everyone, that did the trick! Forgetting that, I wonder how I ever got it right in the first place.
  3. Thank you! I knew I missed something obvious. But while that changed the behavior in the right direction, it's still not working. Now it just repeats this step: else if (on == FALSE) { cup_on(); on == TRUE; cupon == TRUE; } Over and over again Edit: To clarify, when I say "over and over" I mean, when i hit the HUD button again it repeats, not that it's repeating on its own after one message from the HUD
  4. I got this working perfectly, then tried to change it, broke it, and forgot how it worked. Now I'm starting over. Basically, I'm trying to get the script to make certain prims visible in a certain sequence when responding to a HUD, and either turn off or on depending on if the prim is already on (cupon), or another linked prim is already on (on). The HUD works fine. The problem is for some reason, despite the script's toggles being set "OFF," the script behaves as if they're "TRUE" when being triggered by the HUD, and it doesn't toggle, it just repeats the same function (power_off()) over and over. power_on(), power_off(), and cup_on just make different prims visible in different colors. I figure I'm missing something obvious but am at my wit's end. Any help would be appreciated. all_off() { llSetLinkPrimitiveParamsFast( LINK_ALL_CHILDREN, [ PRIM_GLOW, ALL_SIDES, 0.0, PRIM_COLOR, ALL_SIDES, white, 0.0 ] ); llSetLinkPrimitiveParamsFast( 3, [ PRIM_POINT_LIGHT, FALSE, ZERO_VECTOR, 0.0, 1.0, 1.0]); on = FALSE; cupon = FALSE; } default { state_entry() { llSetLinkPrimitiveParamsFast( LINK_ALL_CHILDREN, [ PRIM_GLOW, ALL_SIDES, 0.0, PRIM_COLOR, ALL_SIDES, white, 0.0 ] ); llSetLinkPrimitiveParamsFast( 3, [ PRIM_POINT_LIGHT, FALSE, ZERO_VECTOR, 0.0, 1.0, 1.0]); on = FALSE; cupon = FALSE; HUD_channel=-11*llAbs((integer)("0x"+ llGetSubString(llGetOwner(),0,7))); key owner = llGetOwner(); llListen(HUD_channel,"","",""); } listen( integer channel, string name, key id, string message ) { if( message == "SHUD92" ) { if(on = TRUE) { if(cupon = TRUE) { power_off(); all_off(); } else { power_on(); on = TRUE; cupon = TRUE; } } else if (on = FALSE) { cup_on(); on = TRUE; cupon = TRUE; } } } }
×
×
  • Create New...