Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Sprite sheet for entity template Slime -->
- <render />
- <sprite sheet="XK_Slime.bmp" name="Texture_XK_Slime" />
- <!-- Skipping automatic exports for abstract entity template Xanadu Entity -->
- <!-- This is a hint to the entity factory to specify a class to construct in game code. -->
- <!-- Xanadu entities are most physical things that have presence in the game world, are affected by gravity, and so on. -->
- <class name="xanaduentity" />
- <!-- Skipping automatic exports for abstract entity template Sprite Base -->
- <render />
- <space>
- <position>
- <!-- Default to behind the player. -->
- <vector z="5.0" />
- </position>
- </space>
- <camera />
- <anim />
- <sprite />
- <!-- Skipping automatic exports for abstract entity template Assigned GUID -->
- <!-- This thing is assigned a GUID at runtime so that it can be serialized. -->
- <!-- A typical use case would be an item drop that should persist if we leave and return. -->
- <guid guid="assign" />
- <!-- Skipping automatic exports for abstract entity template Data Haver -->
- <!-- This is just a thing that has a data component. -->
- <!-- This can track arbitrary data external to other components. -->
- <data />
- <!-- Skipping automatic exports for abstract entity template Screen Bounded -->
- <!-- This is a thing that will be destroyed if it goes offscreen. -->
- <bounds />
- <!-- Skipping automatic exports for abstract entity template Facing Left -->
- <facing facing="left" />
- <!-- Skipping automatic exports for abstract entity template Deletable -->
- <delete />
- <!-- Skipping automatic exports for abstract entity template Loot Dropper -->
- <loot>
- <!-- We will roll on EACH opportunity. -->
- <!-- Things that may only drop at most one item should only have one opportunity. -->
- <opportunity>
- <roll weight="20" drop="" />
- <roll weight="10" drop="Ammo" />
- <roll weight="4" drop="Bombs" />
- <roll weight="10" drop="Coin" />
- <roll weight="8" drop="Gem" />
- <roll weight="6" drop="Heart" />
- <roll weight="4" drop="Key" />
- </opportunity>
- <!-- These XP pellets feel bad man. -->
- <!-- opportunity><roll weight="1" drop="XP" /></opportunity -->
- </loot>
- <!-- Skipping automatic exports for abstract entity template Enemy Allegiance -->
- <allegiance name="enemy" />
- <!-- Animation for entity template Slime -->
- <anim>
- <sequence name="Idle" priority="0" duration="0.5" loop="True" startplaying="True" scrub="0" jump="False" trumpstop="False" primitive="">
- <frame durweight="1" x="0" y="4" w="16" h="12" spoffx="0" spoffy="0" spsclx="16" spscly="12">
- </frame>
- <frame durweight="1" x="16" y="5" w="16" h="11" spoffx="0" spoffy="0" spsclx="16" spscly="11">
- </frame>
- <frame durweight="1" x="0" y="4" w="16" h="12" spoffx="0" spoffy="0" spsclx="16" spscly="12">
- </frame>
- <frame durweight="1" x="33" y="3" w="14" h="13" spoffx="0" spoffy="-1" spsclx="14" spscly="13">
- </frame>
- </sequence>
- <sequence name="Hurt" priority="8" duration="1" loop="True" startplaying="False" scrub="0" jump="False" trumpstop="False" primitive="">
- <frame durweight="1" x="0" y="20" w="16" h="12" spoffx="0" spoffy="0" spsclx="16" spscly="12">
- </frame>
- </sequence>
- <sequence name="Shake" priority="2" duration="0.125" loop="True" startplaying="False" scrub="0" jump="False" trumpstop="False" primitive="">
- <frame durweight="1" x="0" y="4" w="16" h="12" spoffx="0" spoffy="0" spsclx="16" spscly="12">
- </frame>
- <frame durweight="1" x="33" y="3" w="14" h="13" spoffx="0" spoffy="0" spsclx="14" spscly="13">
- </frame>
- </sequence>
- <sequence name="Jump" priority="4" duration="1" loop="False" startplaying="False" scrub="0" jump="True" trumpstop="False" primitive="">
- <frame durweight="1" x="33" y="3" w="14" h="13" spoffx="0" spoffy="-1" spsclx="14" spscly="13">
- </frame>
- <frame durweight="1" x="0" y="4" w="16" h="12" spoffx="0" spoffy="0" spsclx="16" spscly="12">
- </frame>
- <frame durweight="1" x="16" y="5" w="16" h="11" spoffx="0" spoffy="0" spsclx="16" spscly="11">
- </frame>
- <frame durweight="1" x="0" y="4" w="16" h="12" spoffx="0" spoffy="0" spsclx="16" spscly="12">
- </frame>
- <frame durweight="1" x="33" y="3" w="14" h="13" spoffx="0" spoffy="-1" spsclx="14" spscly="13">
- </frame>
- </sequence>
- <sequence name="Drip" priority="3" duration="1" loop="True" startplaying="False" scrub="0" jump="False" trumpstop="False" primitive="">
- <frame durweight="1" x="16" y="16" w="16" h="4" spoffx="0" spoffy="-3" spsclx="16" spscly="4">
- </frame>
- <frame durweight="1" x="16" y="21" w="16" h="5" spoffx="0" spoffy="-3" spsclx="16" spscly="5">
- </frame>
- <frame durweight="1" x="16" y="26" w="16" h="6" spoffx="0" spoffy="-2" spsclx="16" spscly="6">
- </frame>
- <frame durweight="1" x="32" y="16" w="16" h="8" spoffx="0" spoffy="-1" spsclx="16" spscly="8">
- </frame>
- <frame durweight="1" x="32" y="24" w="16" h="3" spoffx="0" spoffy="-4" spsclx="16" spscly="3">
- </frame>
- <frame durweight="1" x="16" y="16" w="16" h="4" spoffx="0" spoffy="-3" spsclx="16" spscly="4">
- </frame>
- </sequence>
- <sequence name="Fall" priority="5" duration="0.3" loop="False" startplaying="False" scrub="0" jump="False" trumpstop="True" primitive="">
- <onend>
- <action text="anim self play FallingLoop" />
- </onend>
- <frame durweight="1" x="48" y="0" w="8" h="9" spoffx="0" spoffy="0" spsclx="8" spscly="9">
- </frame>
- <frame durweight="1" x="48" y="9" w="10" h="13" spoffx="0" spoffy="-1" spsclx="10" spscly="13">
- </frame>
- </sequence>
- <sequence name="Land" priority="7" duration="0.125" loop="False" startplaying="False" scrub="0" jump="False" trumpstop="False" primitive="">
- <frame durweight="1" x="48" y="22" w="16" h="10" spoffx="0" spoffy="1" spsclx="16" spscly="10">
- </frame>
- </sequence>
- <sequence name="FallingLoop" priority="6" duration="0.3" loop="True" startplaying="False" scrub="0" jump="False" trumpstop="True" primitive="">
- <frame durweight="1" x="48" y="9" w="10" h="13" spoffx="0" spoffy="-1" spsclx="10" spscly="13">
- </frame>
- </sequence>
- </anim>
- <!-- Collision for entity template Slime -->
- <collision blocker="False" shallowledge="False" sweep="fdfaffcf">
- <primitive name="Default" type="box" response="slide" filter="02000001" default="True">
- <extents>
- <vector x="6" y="5" />
- </extents>
- <offset>
- <vector x="0" y="0" />
- </offset>
- </primitive>
- </collision>
- <sprite subpalette="Slime Subpalette" />
- <physics>
- <constants
- footspeed="80.0"
- jumptime="0.240"
- effectsthreshold="0"
- >
- <jump height="20" />
- </constants>
- <event name="onland">
- <action text="anim self play land" />
- <action text="ai self stop" />
- <action text="ai self choosebehavior" />
- </event>
- <!-- In case we spawn on the ground. -->
- <event name="onspawngrounded">
- <!-- lol emepty queries cause crashes btw -->
- <!-- query text="" / -->
- <action text="ai self stop" />
- <action text="ai self choosebehavior" />
- </event>
- </physics>
- <title text="Slime" />
- <health invtime="0.0" stuntime="0.25" freeze="true" max="5" default="5" hurtanim="hurt">
- <event name="ondamaged">
- <action text="playsound attack 85 unique" />
- </event>
- <event name="ondepleted">
- <action text="playfx sparkle" />
- </event>
- <event name="ondied">
- <action text="droploot" />
- </event>
- </health>
- <ai>
- <!-- General pattern: If we're a thing that wants to be aware of the player, -->
- <!-- and we ARE aware of player, turn to face them. -->
- <!-- Then choose one of three options: -->
- <!-- 1. Sit in place and do nothing. -->
- <!-- 2. Walk forward some distance. -->
- <!-- 3. Play shake animation and then jump forward. -->
- <!-- We become player-aware when we take damage from the player -->
- <!-- or when they enter our line of sight. -->
- <!-- We lose awareness when they leave our line of sight and some time passes. -->
- <!-- action text="face player" / -->
- <behaviorset>
- <behavior weight="0.5">
- <action text="ai self stop" />
- <wait time="1.0" />
- </behavior >
- <behavior weight="1.0">
- <action text="ai self stop" />
- <!-- Wait a short time before jumping in case we landed. -->
- <!-- Jumping immediately looks weird. -->
- <wait time="0.15" />
- <action text="anim self play shake" />
- <wait time="0.55" />
- <action text="anim self stop shake" />
- <action text="ai self jump forward 1.0" />
- <!-- On landing, we choose a new action. -->
- <!-- Negative wait time means wait forever. -->
- <!-- We'll reset this when choosing a new behavior. -->
- <!-- But just in case we don't get our land event, let's set SOME time here. -->
- <wait time="4.0" />
- </behavior >
- <behavior weight="3.0">
- <action text="ai self walk forward 0.25" />
- <wait time="0.5" />
- </behavior >
- <behavior weight="0.75">
- <action text="ai self stop" />
- <wait time="0.25" />
- <action text="ai self turn" />
- <wait time="0.5" />
- </behavior >
- </behaviorset>
- <event name="onhitwall">
- <query>
- <condition>
- <expression text="grounded" />
- </condition>
- <true>
- <!-- This is what slimes and stuff will want. -->
- <action text="ai self turn" />
- </true>
- <false>
- </false>
- </query>
- </event>
- </ai>
- <script>
- <onfullyloaded WithSerial="false">
- <!-- In case we spawn in the air. -->
- <action text="ai self stop" />
- <action text="ai self wait 60.0f" />
- </onfullyloaded>
- </script>
- <!-- GUID for entity instance 74ecdb54 -->
- <guid guid="74ecdb54" />
- <!-- Position for entity instance 74ecdb54 -->
- <space>
- <position>
- <vector x="216" y="56" />
- </position>
- </space>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement