stationk Posted June 9, 2016 Posted June 9, 2016 Hello I like to build a script based robot for RP, to be more precise, I like to build one human or robotic looking bodyguard, that means it has to be able to iteract with others normal AV. For example, if it's a bodyguard, it has to be able to push, hold and maybe even carry another AV as if it were a normal AV. So far I've about 'script AV' accounts that are normal accounts but defined as 'bots' to be controlled remotely, some just chat bots while others more iteractive in some functions. Other's I've seem are just static objects that can iteract with another AV via RLV.But I want it to walk, because it's like a bodyguard. Which may be the best options to build such thing. Thank you
Rolig Loon Posted June 9, 2016 Posted June 9, 2016 The three common options are (1) create a physical object and control its movements with llMoveToTarget or (2) Use KFM to drive a scripted object along a path or (3) create a pathfinding object. There are other possibilities too. You could use a vehicle script in an object and then move it to preset waypoints or drive it remotely from another script, for example. Whatever movement scheme you use, you could script your robot (NPC) to loop or ping-pong on a preset path or you could script it to move randomly within a preset range and respond to triggering events (like a visiting intruder). There's no "best" choice, so I can't recommend one over the others. Each of those methods has been used widely for different reasons and in different applications in SL. None of them is easy to write, of course. The logic involved in getting a robot to go where you want it to go (or not go) is fairly intricate, especially if you need to consider options like group ownership, whitelisting (or blacklisting) visitors, navigating irregular terrain or obstacles, operating in a skybox, avoiding hijacking, and recovering from unexpected failures. Scripting takes a long time and testing/debugging takes even longer, but it's fun.
stationk Posted June 9, 2016 Author Posted June 9, 2016 Thank you for the tips, I'll get these as possible starting points and see where it leads. I'll probably limit it's movement to certain distance from a root point (me) inside a plain terrain to make it easier. Thanks!
Rolig Loon Posted June 9, 2016 Posted June 9, 2016 That isn't necessarily easier than other choices you might make, since the robot will have to keep constant track of your movements and will have to know what to do if you log out or TP out of range. I scripted a gunslinger bodyguard NPC for someone three or four years ago that needed to deal with those issues. It took me quite a while to keep the thing from getting lost when I left the region or even TP'd to a skybox. 1
stationk Posted June 10, 2016 Author Posted June 10, 2016 yes, when your 'target' is not around, what to do.. something to keep in mind. I try to determine if its around, if not, to stay put.
Luxen Posted June 10, 2016 Posted June 10, 2016 To test if someone is in the same region : there is a useful function to use: if(llGetAgentSize(uuid)) { //uuid is an avatar in the region} else { //uuid is not an avatar in the region} it's quick, safe and work perfectly... More infos here: http://wiki.secondlife.com/wiki/LlGetAgentSize It's very useful and can be used in many differents scripts because this check is often needed (well recommended)...
stationk Posted July 14, 2016 Author Posted July 14, 2016 Thank you, and sorry for the slow response, just a bit busy putting the pieces together.
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now