If by now you have made the textures single user as well the glow should be working. So let's continue with the SDL for the cloths.
Since you probably want to do as little Python programming as possible we'll start with an existing global Python file: xAgeSDLBoolSet. You can simply call this Python file from your AlcScript to make it do its thing.
First you need SDL variables, as many as there are cloths in your age. Assuming you have 7 cloths, your SDL file should look something like this:
- Code: Select all
STATEDESC TurtleIsle
{
VAR BOOL trtlCloth1[1] DEFAULT=0
VAR BOOL trtlCloth2[1] DEFAULT=0
VAR BOOL trtlCloth3[1] DEFAULT=0
VAR BOOL trtlCloth4[1] DEFAULT=0
VAR BOOL trtlCloth5[1] DEFAULT=0
VAR BOOL trtlCloth6[1] DEFAULT=0
VAR BOOL trtlCloth7[1] DEFAULT=0
}
I don't know if your age name is really TurtleIsle, so change that if necessary.
In order to mark the cloths as touched you can change the AlcScript for the Cloth1 object as follows:
- Code: Select all
Cloth1:
visual:
matanims:
- mat: Journey.001
flags:
- stopped
logic:
modifiers:
- name: Cloth1Clk
cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Cloth1Rgn
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: responder
ref: :Cloth1Glowing
- type: pythonfile
ref: :Cloth1BoolSet
actions:
- type: responder
name: Cloth1Glowing
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Cloth1_Seek
callbacks:
- marker: DoorButtonTouch
receiver: respondermod:Cloth1Glowing
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 0043:Journey.001-Glow.001
cmds:
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Cloth1_se
cmds:
- play
waiton: -1
nextstate: 0
ncallbacks: 1
waittocmd:
- key: 0
msg: 0
curstate: 0
flags:
- detecttrigger
- type: pythonfile
name: Cloth1BoolSet
pythonfile:
file: xAgeSDLBoolSet
parameters:
- type: activator
ref: logicmod:Cloth1Clk
- type: string
value: trtlCloth1
- type: skip
- type: skip
- type: skip
- type: skip
- type: int
value: 1
- type: string
value: trtlCloth1
As you can see I have already named your glow texture Glow.001 which is the name it should have gotten when you made it single user. The important parameter is the "type: int". This tells Uru to set SDL trtlCloth1 to value 1. This is NOT a toggle. So if the cloth is clicked twice the SDL value will still be 1.
Next do this for each of your cloths.
OK. That was the easy part. Now you need to tell the door to open only when all cloths are pressed. For this you need to edit the AlcScript of the objects DoorButton, DoorButton.001 and Door1 as follows:
- Code: Select all
DoorButton:
logic:
modifiers:
- name: DoorButtonClk
cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: DoorButtonRgn
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: pythonfile
ref: :Door1Pyth
DoorButton.001:
logic:
modifiers:
- name: DoorButtonClk.001
cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: DoorButtonRgn.001
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: pythonfile
ref: :Door1Pyth
Door1:
animations:
- name: DoorOpen1
autostart: 0
loop: 0
logic:
actions:
- type: responder
name: DoorOpen
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:DoorButtonOneshot
callbacks:
- marker: DoorButtonTouch
receiver: respondermod:DoorOpen
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door1
animname: DoorOpen1
cmds:
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door1_se
cmds:
- play
waiton: -1
nextstate: 0
ncallbacks: 1
waittocmd:
- key: 0
msg: 0
curstate: 0
flags:
- detecttrigger
- type: responder
name: DoorOpen.001
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:DoorButtonOneshot.001
callbacks:
- marker: DoorButtonTouch
receiver: respondermod:DoorOpen.001
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door1
animname: DoorOpen1
cmds:
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door1_se
cmds:
- play
waiton: -1
nextstate: 0
ncallbacks: 1
waittocmd:
- key: 0
msg: 0
curstate: 0
flags:
- detecttrigger
- type: responder
name: DoorStuck
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:DoorButtonOneshot
waiton: -1
nextstate: 0
waittocmd: 0
curstate: 0
flags:
- detecttrigger
- type: responder
name: DoorStuck.001
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:DoorButtonOneshot.001
waiton: -1
nextstate: 0
waittocmd: 0
curstate: 0
flags:
- detecttrigger
- type: pythonfile
name: Door1Pyth
pythonfile:
file: trtlDoor1
parameters:
- type: activator
ref: logicmod:DoorButtonClk
- type: activator
ref: logicmod:DoorButtonClk.001
- type: string
value: "trtlCloth1,trtlCloth2,trtlCloth3,trtlCloth4,trtlCloth5,trtlCloth6,trtlCloth7"
- type: responder
ref: :DoorOpen
- type: responder
ref: :DoorOpen.001
- type: responder
ref: :DoorStuck
- type: responder
ref: :DoorStuck.001
- type: bool
value: false
The bad news is that you need a custom made Python file for this, which I called trtlDoor.py. The good news is that I already made it.

Here is the code:
- Code: Select all
from Plasma import *
from PlasmaTypes import *
import string
actDoorButton = ptAttribActivator(1, 'Act: DoorButton')
actDoorButton1 = ptAttribActivator(2, 'Act: DoorButton.001')
strVarNames = ptAttribString(3, 'SDL Vars to check')
respDoorOpen = ptAttribResponder(4, 'Resp: DoorOpen')
respDoorOpen1 = ptAttribResponder(5, 'Resp: DoorOpen.001')
respDoorStuck = ptAttribResponder(6, 'Resp: DoorStuck')
respDoorStuck1 = ptAttribResponder(7, 'Resp: DoorStuck.001')
boolFirstUpdate = ptAttribBoolean(8, 'Process On First Update?', 0)
class trtlDoor1(ptModifier,):
def __init__(self):
ptModifier.__init__(self)
self.version = 1
minor = 0
self.me = self.__class__.__name__
self.SDLlist = []
print ('__init__%s v. %d.%d' % (self.me,
self.version,
minor))
def OnFirstUpdate(self):
try:
self.SDLlist = strVarNames.value.split(',')
for i in range(len(self.SDLlist)):
self.SDLlist[i] = self.SDLlist[i].strip()
PtDebugPrint(('%s: SDL list = %s' % (self.me,
self.SDLlist)))
except:
PtDebugPrint(("ERROR: %s.OnFirstUpdate():\tERROR: couldn't process SDL list" % self.me))
return
if boolFirstUpdate.value:
self.OnServerInitComplete()
def OnServerInitComplete(self):
ageSDL = PtGetAgeSDL()
for i in range(len(self.SDLlist)):
try:
ageSDL.sendToClients(self.SDLlist[i])
ageSDL.setFlags(self.SDLlist[i], 1, 1)
ageSDL.setNotify(self.key, self.SDLlist[i], 0.0)
except:
PtDebugPrint(("ERROR: %s.OnServerInitComplete():\tERROR: couldn't process SDL %s" % (self.me,
self.SDLlist[i])))
def OnNotify(self, state, id, events):
ageSDL = PtGetAgeSDL()
solved = 1
for i in range(len(self.SDLlist)):
if (not ageSDL[self.SDLlist[i]][0]):
solved = 0
break
objAvatar = PtFindAvatar(events)
if ((id == actDoorButton.id) and state):
if solved:
respDoorOpen.run(self.key, avatar=objAvatar, netPropagate=0)
else:
respDoorStuck.run(self.key, avatar=objAvatar, netPropagate=0)
elif ((id == actDoorButton1.id) and state):
if solved:
respDoorOpen1.run(self.key, avatar=objAvatar, netPropagate=0)
else:
respDoorStuck1.run(self.key, avatar=objAvatar, netPropagate=0)
glue_cl = None
glue_inst = None
glue_params = None
glue_paramKeys = None
try:
x = glue_verbose
except NameError:
glue_verbose = 0
def glue_getClass():
global glue_cl
if (glue_cl == None):
try:
cl = eval(glue_name)
if issubclass(cl, ptModifier):
glue_cl = cl
elif glue_verbose:
print ('Class %s is not derived from modifier' % cl.__name__)
except NameError:
if glue_verbose:
try:
print ('Could not find class %s' % glue_name)
except NameError:
print 'Filename/classname not set!'
return glue_cl
def glue_getInst():
global glue_inst
if (type(glue_inst) == type(None)):
cl = glue_getClass()
if (cl != None):
glue_inst = cl()
return glue_inst
def glue_delInst():
global glue_inst
global glue_cl
global glue_paramKeys
global glue_params
if (type(glue_inst) != type(None)):
del glue_inst
glue_cl = None
glue_params = None
glue_paramKeys = None
def glue_getVersion():
inst = glue_getInst()
ver = inst.version
glue_delInst()
return ver
def glue_findAndAddAttribs(obj, glue_params):
if isinstance(obj, ptAttribute):
if glue_params.has_key(obj.id):
if glue_verbose:
print 'WARNING: Duplicate attribute ids!'
print ('%s has id %d which is already defined in %s' % (obj.name,
obj.id,
glue_params[obj.id].name))
else:
glue_params[obj.id] = obj
elif (type(obj) == type([])):
for o in obj:
glue_findAndAddAttribs(o, glue_params)
elif (type(obj) == type({})):
for o in obj.values():
glue_findAndAddAttribs(o, glue_params)
elif (type(obj) == type(())):
for o in obj:
glue_findAndAddAttribs(o, glue_params)
def glue_getParamDict():
global glue_paramKeys
global glue_params
if (type(glue_params) == type(None)):
glue_params = {}
gd = globals()
for obj in gd.values():
glue_findAndAddAttribs(obj, glue_params)
glue_paramKeys = glue_params.keys()
glue_paramKeys.sort()
glue_paramKeys.reverse()
return glue_params
def glue_getClassName():
cl = glue_getClass()
if (cl != None):
return cl.__name__
if glue_verbose:
print ('Class not found in %s.py' % glue_name)
return None
def glue_getBlockID():
inst = glue_getInst()
if (inst != None):
return inst.id
if glue_verbose:
print ('Instance could not be created in %s.py' % glue_name)
return None
def glue_getNumParams():
pd = glue_getParamDict()
if (pd != None):
return len(pd)
if glue_verbose:
print ('No attributes found in %s.py' % glue_name)
return 0
def glue_getParam(number):
pd = glue_getParamDict()
if (pd != None):
if (type(glue_paramKeys) == type([])):
if ((number >= 0) and (number < len(glue_paramKeys))):
return pd[glue_paramKeys[number]].getdef()
else:
print ('glue_getParam: Error! %d out of range of attribute list' % number)
else:
pl = pd.values()
if ((number >= 0) and (number < len(pl))):
return pl[number].getdef()
elif glue_verbose:
print ('glue_getParam: Error! %d out of range of attribute list' % number)
if glue_verbose:
print 'GLUE: Attribute list error'
return None
def glue_setParam(id, value):
pd = glue_getParamDict()
if (pd != None):
if pd.has_key(id):
try:
pd[id].__setvalue__(value)
except AttributeError:
if isinstance(pd[id], ptAttributeList):
try:
if (type(pd[id].value) != type([])):
pd[id].value = []
except AttributeError:
pd[id].value = []
pd[id].value.append(value)
else:
pd[id].value = value
elif glue_verbose:
print "setParam: can't find id=",
print id
else:
print 'setParma: Something terribly has gone wrong. Head for the cover.'
def glue_isNamedAttribute(id):
pd = glue_getParamDict()
if (pd != None):
try:
if isinstance(pd[id], ptAttribNamedActivator):
return 1
if isinstance(pd[id], ptAttribNamedResponder):
return 2
except KeyError:
if glue_verbose:
print ('Could not find id=%d attribute' % id)
return 0
def glue_isMultiModifier():
inst = glue_getInst()
if isinstance(inst, ptMultiModifier):
return 1
return 0
def glue_getVisInfo(number):
pd = glue_getParamDict()
if (pd != None):
if (type(glue_paramKeys) == type([])):
if ((number >= 0) and (number < len(glue_paramKeys))):
return pd[glue_paramKeys[number]].getVisInfo()
else:
print ('glue_getVisInfo: Error! %d out of range of attribute list' % number)
else:
pl = pd.values()
if ((number >= 0) and (number < len(pl))):
return pl[number].getVisInfo()
elif glue_verbose:
print ('glue_getVisInfo: Error! %d out of range of attribute list' % number)
if glue_verbose:
print 'GLUE: Attribute list error'
return None
If you haven't worked with SDL states and Python before I suggest you read what Andy posted
in this topic about the "Dummy" python file.