Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Combat system help

DALEK Drillon
Registered User
Join date: 20 Jul 2006
Posts: 22
07-21-2008 01:02
Hi Ladies and Gents......


Just wanted to ask if any of you know of a combat system like these Roleplay sims have thats open source so i can learn how it all works. I think most are sensor based but i have no clue how its used. Any help would be greatly appreciated, thanks.
Ollj Oh
Registered User
Join date: 28 Aug 2007
Posts: 522
07-21-2008 10:53
mono compiler may be released next month.
This inxcreases the 16k script limit to 4x16k and may increase performance so much, many complex scripts may require various tweak-adjustments.

While the old systems and compiler will still work, for complex systems you may want to start from scrach for a permanent performance boost, instead of trying to understand someone elses code, wich usually is more complicated and has lower performance.
Scott Tureaud
market base?
Join date: 7 Jun 2007
Posts: 224
07-22-2008 07:33
For safezone(and similar) it's pretty much the weapons using sensors to dredge out avatar names, then communicating a formated string on channel 20(of chat).

format looks like "damage type, owner, target" or llSay(20, "sword," + llKey2Name(llGetOwner()) + "," +lDetectedName(0)); if you aren't worried about efficiency.

The meter then takes this with CVS2List. which gives a list that looks like this 0:damage type 1:owner 2:target

the meter then checks if the target is the owner of the meter.

if it is it takes the damage type searches through a list with all the damage types and takes a parallel list and subtracts that from the meters health. those two lists look like:

0:sword 1:kick 2: punch 3:heal
0:15 1:10 2:5 3:-10

all meters pretty much have the first three some have the heal(or heal types) and most meters have considerably more damage types. Of which aren't shared and that creators outside the SIM, aren't supposed to use(even though they are easy to grab).

some other guidelines is that swords don't swing further than 3 meters or faster than .4 seconds, arrows splash isn't above 3.5 and bows aren't faster than .7 seconds. Safezone is pretty much completely based on creators trusting others to not mess up, and users not playing with people who use 'badstuff'. each SIM can have completely different meters(SpellFire which doesn't use chat), very different syntax, different damage amounts, and completely different rules(what's 'badstuff' in one SIM isn't so in another)

To be honest I actually expect combat meters to be the least affected thing by mono.