def StopProxy1_Test(sentence): Utility.outputAbilityDebug('StopProxy1_Test') if ((sentence.directObject.OwnerCharacterID is None) or (sentence.subject.CharacterID != sentence.directObject.OwnerCharacterID)): sentence.result = FAILURE else: sentence.result = SUCCESS
def MessageCloud_DirectObject(subject, msg): Utility.outputAbilityDebug('MSG CLOUD DIRECT OBJECT ') percentage_decrease_in_range = 80 duration = 4.0 mem_cost = 0 mc_procs = ('MessageCloudInit', 'MessageCloudTerm', '', '', '') subject.AbilityInv.addTempModProcs(mc_procs, MessageCloudAbility, SelectionRangeAbility, duration, mem_cost, 0, percentage_decrease_in_range)
def MessageCloud_Subject(subject, msg): Utility.outputAbilityDebug('MSG CLOUD') objects = discovery.getAllObjects() msgcldid = objects['MessageCloud'] print 'msg cld id : ', print msgcldid duration = 20.0 msgcld = subject.AbilityInv.createStaticObject( msgcldid, { 'Position': msg.location, 'Orientation': subject.CharMvt.Orientation, 'Duration': duration }) procs = ('', '', 'MessageCloudPulse', '', '') msgcld.Abilities.addTempModProcs(procs, duration, 0, 0) procs = ('MessageCloudInit', 'MessageCloudTerm', '', '', '') msgcld.Abilities.addTempModProcs(procs, duration, 0, 0)
def MessageCloud_Subject(subject, msg): Utility.outputAbilityDebug('MSG CLOUD') objects = discovery.getAllObjects() msgcldid = objects['MessageCloud'] print 'msg cld id : ', print msgcldid duration = 20.0 msgcld = subject.AbilityInv.createStaticObject(msgcldid, {'Position': msg.location, 'Orientation': subject.CharMvt.Orientation, 'Duration': duration}) procs = ('', '', 'MessageCloudPulse', '', '') msgcld.Abilities.addTempModProcs(procs, duration, 0, 0) procs = ('MessageCloudInit', 'MessageCloudTerm', '', '', '') msgcld.Abilities.addTempModProcs(procs, duration, 0, 0)