Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Advanced PvP-related scripting.

Samuel Fleming
Registered User
Join date: 6 Oct 2004
Posts: 7
10-22-2004 20:45
Just can't leave well enough alone, gotta try to push that envelope...

OK, so I'd like to do some advanced PvP-related scriptwork for an "assassins" gametype/event referee. For those unfamiliar with the principle, all participants are given 1 target. Their job is to kill that target. If they succeed, they inherit their victim's target. Of course, this all links back in a circle, so you know there's someone out to kill you...

My current design is planning on relying on a "badge & controller" mechanism, where the participating players are wearing a badge (probably invisible, to make things more interesting and less easy) that would allow them to interact in an advanced PvP mode for the duration of an event, by relaying messages on target and player status back to the ref, who adjudicates over who's still in the game.

If the player removes the badge, he or she has "committed suicide" and removed themselves from the event - their target gets passed on as if they had died. That doesn't seem like it'd be difficult to do.

The tricky part comes in trying to track the Avatar's health. As far as I can tell, there's no way to do it. There's no "Avatar Health" constant or function that the badge can look out for, and no agent state that indicates the player has "died." This makes using traditional 3rd-party weapons useless; people would have to buy Assassin-compatible weapons that would operate like LaserTag, on their own proprietary health system. I don't want the badges to look for sudden teleports because that forces players to have to run/fly everywhere, and I want them to have total freedom of movement. Optimally, you should be able to stalk someone all across LindenLand. I'm willing to compromise if I have to, by forcing people to stay within the Sim that's hosting, and telling the badges to DQ anyone who wanders too far, but that spoils the fun of it by imposing more artificial restrictions.

Another factor I need to consider is server load and communications lag. I don't have nearly enough experience to know how communication-heavy scripts affect the Sims they're based in...does anybody have any knowledge or advice on the most streamlined way to implement something like this? If we end up pulling it off, you'll have my unending gratitude, your name in the badge and ref credits/description, and maybe even L$ royalties from events...

So yeah, anyway...just another cracked out idea from the guy who wanted to code recreational drugs. :D
Siro Mfume
XD
Join date: 5 Aug 2004
Posts: 747
10-22-2004 22:45
First decide how many 'hitpoints' you want to give someone. Set this as a counter inside the badge. When this counter reaches zero, use llEmail to report death to a central object for tracking.

For the weapons, you will need to design something appropriate to your game format. The bullet will be the important part. You can do this one of three ways. You can have the bullet comminicate with the badge when it successfully hits an avatar wearing a badge (tricky, but doable). Or you can have the badge detect when it's hit by a specific object of a specific type. Or you can mix both methods. I.e., the badge won't bother to register a hit if the bullet isn't also communicating. The second method will likely prove the least laggy, but potentially easily abused.

Good Luck.
Azelda Garcia
Azelda Garcia
Join date: 3 Nov 2003
Posts: 819
10-23-2004 11:23
Hmmm, this is on my list of games that I think would be fun in SecondLife. Good luck, I think it stands a decent chance of working well.

Azelda
_____________________
Samhain Broom
Registered User
Join date: 1 Aug 2004
Posts: 298
10-25-2004 10:54
I remember a movie once with actor Rutger Hauer where he was a prisoner of a new kind of facility where he and another player had rings they wore around their necks, and as long as they did not move a certain distance from their unknown partner, they were fine, otherwise, both of their heads would be blown off.

Now, I THINK you cannot have two prims talk to each other in the game, but can the ONE prim have a communication to a land based prim which each of the neck rings sensed, and if they roamed too far POOF goes their heads? That would solve the "Roam too far" issue. Kind of on the order (though a much greater penalty than) going out of the baseline for Baseball, or out of bounds in Football....

Does that help? (I'm not sure what the code would be or what the lag prohibitives might be for something like that... but there' s a concept?)
_____________________
rm -rf /bin/ladden #beware of geeks bearing grifts