Key: Difference between revisions
From CC Wiki
Jump to navigationJump to search
No edit summary |
m (Add stub category) |
||
| Line 23: | Line 23: | ||
</pre> | </pre> | ||
[[Category:Mechanics]] | [[Category:Mechanics]] | ||
[[Category:Stub]] | |||
Latest revision as of 16:00, 19 February 2026
keys are collectibles that open small chests.
original code
key={
tile=8,
if_not_fruit=true,
update=function(this)
local was=flr(this.spr)
this.spr=9+(sin(frames/30)+0.5)*1
local is=flr(this.spr)
if is==10 and is!=was then
this.flip.x=not this.flip.x
end
if this.check(player,0,0) then
sfx(23)
sfx_timer=10
destroy_object(this)
has_key=true
end
end
}