Jump to content

Tommy Rampal

Resident
  • Posts

    129
  • Joined

  • Last visited

Everything posted by Tommy Rampal

  1. I'm a bit iffy on control events and the best way of going about them. The following is placed in my control() event: integer start = level & edge; integer end = ~level & edge; integer held = level & ~edge; if(start & CONTROL_LBUTTON) { ATTACKING=TRUE; } else if(held & CONTROL_LBUTTON) { if(!ATTACKING) ATTACKING=TRUE; if(ATTACKING) { if(start & CONTROL_DOWN) { attack(); } } } else if(end & CONTROL_LBUTTON) { ATTACKING=FALSE; } I'm not too sure if this inefficient/overkill. I could either take out the held and just have if(ATTACKING) in place, or take out the start & CONTROL_LBUTTON as held is already doing the check, or just keep them both in. Could anyone throw a suggestion my way and elaborate why (e.g. potential/unnessacary lag). Thanks again!
  2. To slow down general walking speeds I've put llMoveToTarget(llGetPos(),1.0); in a timer event that occurs every 1 second; so it has a constant pull on you, and updates your pull centre every 1 second. This works great until I remembered running, which doesn't obey that clamp. With the aforementioned method, running almost puts the avatar back to walking speed. Does walking and running use static speeds, or does it vary depending on situations? So far I put a if(llGetAgentStatus() & AGENT_ALWAYS_RUNNING) where it tau = tau/2; if true. This is close to the desired speed I want, but I'm not sure if this is an exact difference. Can someone elaborate?
  3. So Accept TRUE pass_on FALSE, the controls I did not list will do control events, but not for those specific controls? I wanted to disable jump(up) and crouch(down), while rotate left, right, forward and back still called their respective events.
  4. The sudden change from v2 to v3 isn't a huge one apart from the mesh. Do note that installations sometimes resets your viewer config, which is essential for you to get right in order to not experience any lag. Change the graphics settings to what suits your laptop; bare in mind that overheating (which is extremely common in all laptops) and power settings take effect (which is why I purchased a desktop); in some Windows configurations, not having your laptop powered by your wall charge will affect performance also. Texture loading issues relates to your viewer config aswell. By default your viewer is set to allow 500kbps maximum bandwidth, this is the minimum amount. I have fast broadband, so I set mine to the maximum (10,000kbps). You can find this in the Setup tab of your preferences window. It's a common misconception to blame Secondlife and/or their servers. Really, the only thing they've got/they're doing wrong is setting default settings and optimising the rendering for lower spec computers.
  5. Hey all! So today I'm experimenting with controls, and how can I implement them into my game the best I can. To my knowledge, llTakeControls cannot be layered - calling it again will overwrite previous control settings; but is it possible to disable controls (e.g. preventing one from jumping or crouching which activates a control event...) while accepting all control events (... a user being able to turn which also activates a control event)? Thanks again!
  6. Aha brilliant! vector size = llGetAgentSize(llGetOwner()); vector target = (llGetPos() + <0,0,size.z/16> * llGetRot()); The code above seemed to work fine, and fixed my problem. Didn't really get to experiment what you described with the weight/mass; if anyone has an improvement, it'd be much appreciated!
  7. Thanks! I'll experiment some more later when I get on the viewer. So far its pretty much: llMoveToTarget(llGetPos() + offset * llGetRot(),.75); What would you say will be a safe algorithm to increment the Z axis depending on the height of the avatar? So far its set to a static 0,0,.1 where the jitter affects taller avatars. By the differences, I meant the min and max vectors you get from llGetBindingBox I applogise, I am slower than usual today; I am battling off 3 hours sleep and a migraine. ;_;
  8. Oh right! Well that's me learning eh? So I understand the concepts, but I'm struggling to make use of the avatar height/bounding box coordinates into some algorithm. Does llGetBoundingBox return local or region vectors? If it's region my problem is pretty much solved I guess. Does that mean llGetPos is broken? I would've thought it'd return the same as the llGetBoundingBox differences?
  9. Not sure what you meant Dora, to note, I am working with avatars. But adding <0,0,.1> to the llGetPos seems to help but it seems that avatars with certain height still jitter.
  10. Experimenting with the animating programs fixed this, a slight turn here and there will suffice. Thanks!
  11. Hey again all, I'm dealing with a walking animation that I captured in hopes to turn it into something that can be used in an animation overrider. I've already discovered bvhacker to create seamless looping (unless there is a better solution?). Now my next problem is when taking an animation that has a movement path (A to B), to one that animates on the spot (the hips stay in the same X,Y locations). I've tried doing it manually, but it's incredibly time consuming and a big mess as I have to reposition the feet too, rebuilding keyframes etc. Are there any tools (e.g. in Poser) that does this in near enough a click of a button? Thanks for your time!
  12. Hey guys, So I've been working on moving my avatar through LSL using llMoveToTarget, and have had some weird results. vector vec = (llGetPos()-<.5,0,0>*-llGetRot()); llMoveToTarget(vec,0.5)The code above moves the avatar fine, but in mostly a lot of cases it puts the avatar in a constant jitter (consistent small 'jumps' along the Z axis unless they move or rotate to correct it. This is a problem for me because I also take controls to stop the avatar from moving and turning. Is there an easy fix around this? I also experimented with taking someone else's position (e.g. llGetObjectDetails and moving .5 meters in front of their position) and it seems to be fine. So maybe the problem lies in how llMoveToTarget deals with the llGetPos() vector? This is also an attachment. Thanks again
  13. How would you go ahead about locking joints? Adding a 0.001 rotation or something? Does this still apply to the highest priority when uploading?
  14. Hmm no I haven't used an AO in a while.
  15. Hey guys, I know it's a common problem to experience hands doing random things, but I'm unsure if this is something I'm doing terribly wrong or can be avoided: When playing animations I have made, I find that for some reason the hands seem to bend backwards (almost 90 degress). So animations like beating your chest or stroking the back of your head will seem very off. I'm a bit new when it comes to animations, does anyone have this problem and is there a work around? Thanks
  16. They compile fine, I edit the default script; changing "Hello Avatar!" to something different, (e.g. "Hello"), and it just doesn't save... I was able to save in a different sim, so maybe it's a region problem?
  17. I'm unsure if this is an expected issue adjacent to some of the other issues going on, but I cannot save any form of script. It just doesn't save; I try to make changes to an existing or new script, and I never receive the 'Save Complete' dialog. If I reopen the script, the changes remain and 'Running' and 'Mono' are unticked. Can anyone elaborate on this?
  18. I kicked myself after I found out about llEscapeURL and llUnescapeURL - it can be pretty much used for the same purpose as bind_param() in php. So if someone types 'test&uhoh=100000' (say it's a game statistic), it'd actually be posted as 'test%26uhoh%3D100000'. The length validation was in place, but I was unaware of the overflow breach, thanks for the heads up!
  19. Hey again guys, So pretty much I have a llHTTPRequest script that works with a listen that checks to see if the username is registered; whether or not it is registered to the user's key. I've managed to get it all working but I managed to recreate some sort of breach/break by saying 'whateverusername&postdata=...'. Normally it validates the username through the PHP script but in this case, a user can inject post data and bypass it - potentially being malicious. I assume that the string can be validated before it is passed to my web server (all & characters are to be removed), but is there any other security measures I should take that I could be unaware of? I'm familiar with mysql parameter binding and prepared statements to prevent SQL injection.
  20. So pretty much I have developed a 'info terminal' system that works similar to a vendor, depending on the terminal state it changes child prims' textures, position and shape to mimic a LCD screen (with text and buttons). The base of this terminal is sculpted (soon to be mesh). I was wondering if anyone has devised a use/idea for mesh for well designed HUDs and vendors. I presume XYtext can be replaced/optimised to make use of mesh's 8 faces. But for the scaling/resizing thing, would it be worth making a special mesh alternative to cut down on prims (I'm talking 2-3 prims), or it's just not worth the hassle and stick to llSetLinkPrimitiveParamsFast ?
  21. Yeah, well everytime it sends a HTTP request, it triggers a 'Connecting to server' display and disables all user interactivity until it receives the body and handles the data accordingly. It saves the request as a string so it knows how to deal which body is returned, so if the requestid == NULL_KEY, I can literally tell it to wait 1-2 seconds, destroy the token and try the request again. I got the message in the error/debug window (viewer 2), it didn't kill the script; it timed out and reverted back to the welcome screen as I expected. Does anyone know if there's a way to turn off the 'Too many requests too fast' warning (to not confuse non-technical minded users). And does anyone have any statistics on exactly how quick it takes to reach the HTTP throttle; and if it temporarily halts/sleeps HTTP requests for a further amount of time once the throttle has been reached (so I should add a mandatory sleep)? Thanks again guys.
  22. Option A sounds like the most appealing to me. I think it's because there was some flawed passage where too many panel changes occured per each click. I can tell it to not do as many server checks, as I'm sure it'd survive without them. For future reference, how would one throttle requests? Is that just as simple as adding a script sleeper?
  23. Hey again all, So pretty much my GUI actively does HTTP requests and waits for the body upon a user interacting with it. That's fine, until I noticed something.. For testing purposes, I just hammered through my own built menus/interfaces to get to what I wanted to test to (I've made my own 'panel' system that checks for server variable changes when a panel is changed), I noticed that I managed to crash my script my clicking too fast: "Too many HTTP requests too fast. (Set HTTP_VERBOSE_THROTTLE, FALSE in the parameters to hide these messages.)" Luckily I have implemented a time-out on my scripts for when a user abandons the GUI without finishing appropiately, or a HTTP failure (e.g. my web server is down). But for users who know where they want to be with the GUI, or those in a rush, this can be quite an inconvenience. Has anyone else worked with this problem and/or does anyone have any advice for a practical work around? Sorry if this is an easy fix, I'm just about to head to bed and thought it'd be quicker if I wake up to a solution tomorrow ;)
  24. The following was from my hosting provider: The changes you described can be created with a .htaccess file. To deny all except the IP you wish: Create a .htaccess file and put Deny from all This will block all access to the site, and then add another line to enable access only for yourself: Allow from 1.2.3.4 where 1.2.3.4 is the IP address of the server you would like to allow to. To force it to connect over the shared SSL you would use this: RewriteEngine On RewriteCond %{SERVER_PORT} !443 RewriteRule (.*) https://WEBHOSTURL/~username [R] Would you suggest this is the optimal way to go about it? So 'Allow from *.agni.lindenlab.com'
  25. I'll look into HTTPS more and chat with my host, thanks. Pretty much this is how my communication works: A token is created within the LSL script The request is sent to the php page along with the token as a 'create token' command The web server responds, clarifying the token was created ok, and sends back the request The LSL script sends the request (e.g. get server variables) along with the token The web server checks if the token exists with the owner key, if not, return 'badtoken' else return whatever depending the request, and destroys the token. So right now I have these additional worries on my mind... Someone could easily make a mock of my script, thus sending a create token request. Once that token is created they can potentially send any request; most worryingly database input data (e.g. game saves).. Or they can just use the 'create token' request to send the request they wish. >> Though to make it slightly more secure I can make tokens bind to a specific request, so tokens are created to serve a specific purpose than just be a master key to anything. I guess for purposes of security. I can save the original command via. LSL variable, so that http_responses are purely for clarification or server variables?
×
×
  • Create New...