Jump to content

steph Arnott

Resident
  • Posts

    3,914
  • Joined

  • Last visited

Everything posted by steph Arnott

  1. It is the list that is the issue. Also LSL does not evalute cond ? a : b; the same as C. If a is logically FALSE it will cause odd behavior.
  2. But that was not easier. It is actually terrible.
  3. But that is just basically an 'if else' conditional. Even in C it is weak currying. Well the way you have done it it is.
  4. You can not change an objects name by a script while it is un-rezzed, ie it is in the inventory. You can only manually do it.
  5. Would rathe use Would rather use integer gAfternoon = 43200; integer gEvening = 64800; string sayTimeOfDay() { float timeOfDay = llGetWallclock(); if(timeOfDay < gAfternoon) return "Good Morning!"; else if (timeOfDay < gEvening) return "Good Afternoon!"; else return "Good Evening!"; }
  6. Mirror objects of mesh are blocked. You can mod it as much as you like, assuming the creator has allowed it.
  7. Then you show the legal rights for an agent in SL who agreed to the ToS of SL to do what this commentor claims is their sole rights? I will what, A VERY LONG TIME.
  8. You just don't get it do you? FYI you own nothining is SL. ZERO.
  9. I assumed a counter or message would delete the invent object. Maybe i was thing further ahead than that.
  10. llSetObjectName( "new name" );
  11. Still not getting the legal point are you?
  12. It is a creator legal matter. End of. Good day. Take it up with LR if you want to argue about it. They will either ignore you or state they are legally adhering to law.
  13. You could simply use a strided list and use an randomized integer then call that from the list. say, [ 1, "this sound", 2, "that song" .......]. Assuming that is what you was refering to.
  14. None of them are hacks. They are just different ways to achieve the same result. The issue is whether one is more efficient than another, and whether it is stable. As for LSL syntax it was tightened up with mono and has been several times since. Simple things like nesting 'if' conditionals into relievent blocks rather than twenty lines. Understanding the difference of 'if' and 'else if' conditionals. Not using pointless functions like upper/lower case converstion in stored memory dialog script when it is intended for user created notecards and text messages. List sorting etc' Putting events in their priority order because some have higher priority than others. The miss usage of globals when locals are only needed. LSO used more memory with repeat variables, mono does not. The correct usage of listen filtering, the correct usage of targeted agent messaging and not blasting it to everyone with an irrelievent message that they will never see. Understanding that some functions have inbuilt delays etc etc. Many can even get their head around the fact that touch_start, touch and touch_end can be stated in the body of the script stacked and used for different things. 'if ( !~llListFindList(My_list, [ message ] ) )' i use this, but whether it is more efficient than this ' if ( llListFindList(My_list, [ message ] ) == -1 ) ' is debatable. Technically it should be more efficient, but SL does not behave in ways that seem logical. I doubt many even understand what this '!~' is even doing.
  15. Even if you played ABBA backwards it is still the legal property of ABBA and not yours. So if you change your backwards ABBA, recorded it and put your name as the creator then you will be sued. LR made it not possible because there is no way they could retain the original creators name and permissions. It is a legal matter and nothing to do with your woolly ideas.
  16. Basically yes. Trying to read it in the original awfull format hid all the errors. On an addition note at least the OP is actually working at the problem. Your change event block was what i inteded to post. I also added the user created function to it. if ( change & INVENTORY_SOUND ) { LoadSounds(); } vector sit_position = <0.0, 0.0, -0.1>; // here an euler rot vector sit_rotation = <0.0, 0.0, 0.0>; float MinimumSeconds = 10.0; // Minimum time between successive sounds (seconds) float MaximumSeconds = 30.0; // Maximum time between successive sounds (seconds) float volume = 0.5; // How loud? Between 0 and 1. integer sounds = 0; // # sounds in inventory list soundnames; LoadSounds() { soundnames = []; sounds = llGetInventoryNumber( INVENTORY_SOUND ); integer n; for ( n=0; n < sounds; ++n ) { soundnames += llGetInventoryName( INVENTORY_SOUND, n ); } } default { state_entry() { llSitTarget(sit_position, llEuler2Rot(sit_rotation * DEG_TO_RAD)); } on_rez(integer start_param) { //soundnames = []; LoadSounds(); } timer() { integer random = (integer) llFrand ( sounds ); string sound = llList2String( soundnames, random ); llTriggerSound( sound, volume ); llSetTimerEvent( MinimumSeconds + (llFrand( MaximumSeconds - MinimumSeconds)) ); } changed (integer change) { if ( change & CHANGED_LINK ) { if ( llAvatarOnSitTarget() ) { llSetTimerEvent( MinimumSeconds + (llFrand( MaximumSeconds - MinimumSeconds)) ); } else { llSetTimerEvent(0.0); } } if ( change & CHANGED_INVENTORY ) { //soundnames = []; LoadSounds(); } } }
  17. Because it was doing my head in. vector sit_position = <0.0, 0.0, -0.1>; // here an euler rot vector sit_rotation = <0.0, 0.0, 0.0>; float MinimumSeconds = 10.0; // Minimum time between successive sounds (seconds) float MaximumSeconds = 30.0; // Maximum time between successive sounds (seconds) float volume = 0.5; // How loud? Between 0 and 1. integer sounds = 0; // # sounds in inventory list soundnames; LoadSounds() { soundnames = []; sounds = llGetInventoryNumber( INVENTORY_SOUND ); integer n; for ( n=0; n < sounds; ++n ) { soundnames += llGetInventoryName( INVENTORY_SOUND, n ); } } default { state_entry() { llSitTarget(sit_position, llEuler2Rot(sit_rotation * DEG_TO_RAD)); LoadSounds(); if ( sounds > 0 ) llSetTimerEvent( 0.1 ); else llOwnerSay("No sounds."); } timer() { integer random = (integer) llFrand ( sounds ); string sound = llList2String( soundnames, random ); llTriggerSound( sound, volume ); llSetTimerEvent( MinimumSeconds + (llFrand( MaximumSeconds - MinimumSeconds)) ); } changed (integer change) { key sittingAvatar = llAvatarOnSitTarget(); if (sittingAvatar == NULL_KEY) { llStopSound(); return; } string sound = llList2String( soundnames, llFloor(llFrand( sounds ))); llPlaySound(sound, volume); } }
  18. I use KinEx - Link Mirror V2.1.1 As Rollig stated it will not work on mesh.
  19. The script is a mess. This looks wrong 'if (sittingAvatar == NULL_KEY)' should be sufficient to use this if (NULL_KEY) which will evaluate as true.
  20. It was in the LSL scripting forum and was moved to this one.
  21. You are in the wrong forum. You need the employment forum or what ever it is called.
×
×
  • Create New...