not me
So to look at only players we do this:
foreach in $loc do checkit,players not me;
To find all unlocked doorways do this:
foreach in $loc do checkit,not locked doorways;
or
foreach in $loc do checkit,doorways not locked;
You can combine them in any way you like however it is assume you wil only have one of each fiter type and you wont try any find all locked and unlocked at once - just dont bother filtering in that case.
Now lets choose a random object in this location to jump onto:
##think:runsub checkall;
##checkall:
foreach in $loc do lookatit;
find $loc,random;
set $actor's pose to 'jumping';
set $actor's hosthow to 'on';
set $actor's host to $found_id;
say 'jumps',"[$actor] chooses to jump on [$found_id]";
msg 0,$actor,0,0,'force',"force:look $loc";
##lookatit:
say 'msg',"[$actor] looks at [$for_id]";
We use the 'find' statement to location an object in a location.
Find has threemain ways of operating:
find $loc the cat; = to find a specificly named object
find where {SQL_stament} = find anything using SQL
find $loc random,{filters} = find a random object
The first method of exact object finding is pretty self explanetory.
The second method of finding using SQL is too complext to go into right now
The third finds a random object in the location, and you can apply the same filters as you did in the 'foreach' above.
So to make your object jump only on players you would use this find statement:
find $loc,random players;
or to find any object which is not a doorway and not the current actor you would do this:
find $loc,not doorway not me;
Notice that we are not just saying the object jumps, we actually manipulate it so it is 'on' the found object and posed as jumping and we force a look so everyone gets to see this new arrangment.