def collide_with_kitchen_trap(): print('ciappo') s = Script() s.addAction(AddEntity(buildItem(id='seagull'), 'main')) s.addAction(Animate(anim='fly', tag='seagull', sync=True)) s.addAction(Animate(anim='eat', tag='seagull')) example.play(s)
def run_background_script(actor, a, b, c, d): s = Script(loop = 0) s.addAction (DelayRandom(min=a, max=b)) s.addAction (Animate(tag=actor, anim='idle_2', fwd = True, sync = True)) s.addAction (DelayRandom(min=c, max=d)) s.addAction (Animate(tag=actor, anim='idle_2', fwd = False, sync = True)) s.addAction (Animate(tag=actor, anim='idle_1', fwd = True, sync = True)) example.play(s)
def f(): s = Script() s.addAction(Animate(tag=doorIn, anim='open')) s.addAction(Delay(0.5)) s.addAction(SetActive(tag='player', value=False)) s.addAction(Animate(tag=doorIn, anim='closed')) s.addAction( Scroll(pos=scrollPos, relative=False, speed=50, cam='maincam')) s.addAction(Animate(tag=doorOut, anim='open')) s.addAction(Delay(0.5)) s.addAction(Move(immediate=True, speed=0, tag='player', to=gotoPos)) s.addAction(Turn(dir=dir, tag='player')) s.addAction(SetActive(tag='player', value=True)) s.addAction(Animate(tag=doorOut, anim='closed')) return s
def open_scummbar_door_kitchen(): c: example.Wrap1 = example.get('cook') if c.valid: return toggleDoor('scummbar_door_kitchen', True)() else: s = Script() s.addAction(SuspendScript('_cook')) s.addAction(EnableControls(False)) s.addAction(Animate(tag='scummbar_door_kitchen', anim='open')) s.addAction( Msg(text=gt('@lines/34'), font='monkey', pos=[588, 90, 1], color=[85, 255, 255, 255])) s.addAction(Animate(tag='scummbar_door_kitchen', anim='closed')) s.addAction(EnableControls(True)) s.addAction(ResumeScript('_cook')) return s
def f(): print('ciao' + itemId) s = Script() status = 'open' if open else 'closed' s.addAction(CallFunc(f=setvar(Data.items[itemId]['anim'], status))) # set corresponding variables #sv(Data.items[itemId]['anim'], status) print('set to ' + status) s.addAction(Animate(anim=status, tag=itemId)) return s
def keg(): s = Script() s.addAction(Say([sl[48]], tag='player'), 0) s.addAction(Say([sl[53]], tag='lmf3'), 1, after=[0]) s.addAction(Say([sl[52]], tag='lmf1'), 2, after=[0]) s.addAction(Animate('idle_s', tag='lmf2'), after=[1, 2]) s.addAction(Animate('idle_s', tag='lmf3'), after=[1, 2]) s.addAction(Animate('idle_n', tag='lmf1'), after=[1, 2]) s.addAction(Delay(1), 3) s.addAction(Say([sl[52]], tag='lmf3'), 4, after=[3]) s.addAction(Say([sl[53]], tag='lmf1'), 5, after=[3]) s.addAction(Animate('idle_s', tag='lmf2'), after=[4, 5]) s.addAction(Animate('idle_s', tag='lmf3'), after=[4, 5]) s.addAction(Animate('idle_n', tag='lmf1'), after=[4, 5]) s.addAction(Delay(1), 3) s.addAction(Animate('idle_e', tag='lmf2')) s.addAction(Animate('idle_e', tag='lmf1')) s.addAction(Say([sl[54], sl[55]], tag='lmf3')) return s
def walkto_scummbar_door_kitchen(): a = fetch(Data.items['scummbar_door_kitchen']['anim']) print('a = ' + str(a)) if a == 'open': c: example.Wrap1 = example.get('cook') if c.valid: if c.x > 320: going_left = c.flipx s = Script() s.addAction(SuspendScript('_cook')) s.addAction(Turn(tag='cook', dir='e')) s.addAction( Say(lines=[gt('@lines/32'), gt('@lines/33')], tag='cook')) if going_left: s.addAction(Turn(tag='cook', dir='w')) s.addAction(Animate(tag='cook', anim='walk_e')) s.addAction(ResumeScript('_cook')) return s else: return goto('kitchen', '@&kitchen_door', 'e')() else: return goto('kitchen', '@&kitchen_door', 'e')() return None
def end(self): s = Script() s.addAction(Animate(tag='citizen', anim='idle_s')) example.play(s)
def end(self): s = Script() s.addAction(Animate(tag='lmf1', anim='idle_e')) s.addAction(Animate(tag='lmf2', anim='idle_e')) s.addAction(Animate(tag='lmf3', anim='idle_e')) example.play(s)