Jump to content

Search the Community

Showing results for tags 'maths'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Important News
    • Announcements
  • People Forum
    • Your Avatar
    • Make Friends
    • Lifestyles and Relationships
    • Role Play
    • General Discussion Forum
    • Forums Feedback
    • Second Life Education and Nonprofits
  • Places and Events Forum
    • Favorite Destinations
    • Upcoming Events and Activities
    • Games in Second Life
  • Official Contests, Events & Challenges
    • Challenges
    • Contests
  • Creation Forum
    • Fashion
    • Art, Music and Photography
    • Animation Forum
    • Bakes on Mesh
    • Environmental Enhancement Project
    • Machinima Forum
    • Building and Texturing Forum
    • Mesh
    • LSL Scripting
    • Experience Tools Forum
  • Technology Forum
    • Second Life Server
    • Second Life Viewer
    • Second Life Web
    • General Second Life Tech Discussion
    • Mobile
  • Commerce Forum
    • Merchants
    • Inworld Employment
    • Wanted
  • Land Forum
    • General Discussion
    • Mainland
    • Linden Homes
    • Wanted
    • Regions for Sale
    • Regions for Rent
  • International Forum
    • Deutsches Forum
    • Foro en español
    • Forum in italiano
    • Forum français
    • 日本語フォーラム
    • 한국어 포럼
    • Fórum em português
    • Forum polskie
    • المنتدى العربي
    • Türkçe Forum
    • Форум по-русски
  • Answers
    • Abuse and Griefing
    • Account
    • Avatar
    • Creation
    • Inventory
    • Getting Started
    • Controls
    • Land
    • Linden Dollars (L$)
    • Shopping
    • Technical
    • Viewers
    • Everything Else
    • International Answers

Blogs

  • Commerce
  • Featured News
  • Inworld
  • Tools and Technology
  • Tips and Tricks
  • Land
  • Community News

Categories

  • English
  • Deutsch
  • Français
  • Español
  • Português
  • 日本語
  • Italiano
  • Pусский
  • Türkçe

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Member Title

Found 2 results

  1. Hi! I've been working on a script somone put into the public domain, trying to adapt it to my purpose, which is to rez an NPC when it receives a message via a Dataserver call. Broadly, it works fine, but upon rezing, I want the NPC to adaopt the included (static) animation and to face a particular direction. It's this last part that won't work. No matter what value I put in for the Z rotation, the NPC will behave as follows: 1) It tends not to change direction at all for small (Less than about 7 or 8 degrees) increments/decrements of Z 2) Then it will suddenly change direction by an estimated 20 or so degrees. 3) it cannot be made to face any direction in between it's two jumps 4) For some values, it jumps into a wildly different direction. 5) Overall, it seems to be a toss up between only about 4 or 5 directions it will face, and none other, no matter which of the 360 degrees I try. Here's the relevant piece of code I believe. Where you see "185" in this example; that's the value I'm changing, but the results don't change as expected/intended. Clearly I'm doing something wrong here, but can anyone tell me what? if(npc_on == FALSE) { npc = osNpcCreate("", "", npcPos, npc); npc_on = TRUE; llSensor("", "", AGENT | NPC, 96.0, PI); vector xyz_angles = <1.0, 1.0, 185.0>; vector angles_in_radians = xyz_angles * DEG_TO_RAD; // Change to Radians rot_xyzq = llEuler2Rot(angles_in_radians); // Change to a Rotation osNpcSetRot(npc, rot_xyzq); osNpcPlayAnimation(npc, "My animation"); } Thank you in advance for your thoughts!
  2. OK, hopefully someone can help me here as whatever I do always results in a 0 (zero) output! I'm just trying to do a simple calculation to work out the percentage of memory. It really shouldn't be so difficult, should it?? I thought maybe there was limitation with how much maths could be done in one line, so I split the two calculations up and it still doesn't work as expected. The calculation should look something like: 34968 / 65536 * 100 which rounded up should be about 53%. I wasn't sure if you could use parenthesis in it or not, but it didn't work anyway (eg: (34968 / 65536) * 100) integer used_memory = llGetUsedMemory(); integer total_memory = llGetMemoryLimit(); float percentageMaths = used_memory / total_memory; float percentageMemory = percentageMaths * 100; llOwnerSay("Memory used as percentage: " + (string)llRound(percentageMemory)); //result as: "Memory used as percentage: 0" Any insights?
×
×
  • Create New...