4Dimensions Forum

Building & Scripting => Scripting Board => Topic started by: Asmodeus on August 04, 2010, 03:57:48 pm

Title: new variable?
Post by: Asmodeus on August 04, 2010, 03:57:48 pm
Hey guys.  I'm not exactly sure who would be able to do this (i assume its possible), but I would really like a variable that could check a characters carried weight, considering %actor.weight% never changes depending on what one is holding/has in their inventory.  Or maybe it already exists and its just not on that dg scripts guide.  Is there a list of added variables anywhere?


so for example, the first things i see when I type inventory are...


[You are carrying 26 of 39 items]
[You have a total weight of 422/1055]


So I would like an %actor.tweight% variable (or whatever word you want to put in there) that would return the number 422, in this case.

Also, does anyone know if 422 includes all the things i'm wearing/holding/wielding?
Title: Re: new variable?
Post by: Asmodeus on August 04, 2010, 04:10:51 pm
just to clarify, %actor.weight% returns the weight you see when you finger a character.  And that doesn't change depending on inventory/items worn.

I'm looking for this other type of variable because im trying to create traps triggered by weight.
Title: Re: new variable?
Post by: Kvetch on August 04, 2010, 04:12:17 pm
Looks like %actor.weight% would bring up the weight of the pc and not what they're carrying.  I think that if this isn't a current variable, it is one that should be added.  I should've thought of this when I wanted my trap in NDR - instead of making it so people had to fly, I should have had it by total weight because it's the weight of the person that is supposed to trigger the trap (hence my reason for thinking of fly).
Title: Re: new variable?
Post by: thotter on August 04, 2010, 05:40:05 pm
I added 4 new variables.
%actor.carriedweight% returns the weight the actor is carrying.
%actor.maxcarriedweight% returns how much weight the actor could carry.
%actor.carriedamount% returns the amount of items the actor is carrying.
%actor.maxcarriedamount% returns the amount of items the actor could carry.

Happy scripting!
Title: Re: new variable?
Post by: Asmodeus on August 04, 2010, 05:41:52 pm
you rock!

off to kill some fat mobs with weight traps!

 ;D

Title: Re: new variable?
Post by: Tocharaeh on August 11, 2010, 04:19:52 pm
that's so awesome!!@!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11