Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- What the original code looks like [SM5]
- Def.ActorFrameTexture{
- Name = "Memory",
- InitCommand=function(self)
- self:SetTextureName( "Memory" )
- self:SetWidth( SCREEN_WIDTH )
- self:SetHeight( SCREEN_HEIGHT )
- self:EnableAlphaBuffer( true )
- self:Create()
- end,
- -- Cannot call the second AFT's texture by name as it has not been created when this Sprite loads.
- Def.Sprite{ Name = "Sprite", InitCommand=cmd(Center), },
- },
- Def.ActorFrameTexture{
- InitCommand=function(self)
- self:SetTextureName( "Output" )
- self:SetWidth( SCREEN_WIDTH )
- self:SetHeight( SCREEN_HEIGHT )
- self:EnableAlphaBuffer( true )
- self:Create()
- -- Set the first AFT's child's texture to this AFT's texture, now that it has been created.
- self:GetParent():GetChild("Memory"):GetChild("Sprite"):SetTexture( self:GetTexture() )
- end,
- -- A sprite to draw the 'trail' with.
- Def.Sprite{ Texture = "Memory",
- InitCommand=cmd(Center);
- OnCommand=function(self)
- self:diffusealpha(0)
- end;
- StartBlueTrailMessageCommand=cmd(blend,"normal";diffuse,color("#9600D1");diffusealpha,1;),
- MoreTrailsMessageCommand=cmd(blend,"normal";diffuse,color("#0000FF");diffusealpha,0.96;),
- StopBlueTrailMessageCommand=cmd(smooth,0.2;diffusealpha,0;),
- },
- -- Then I tried porting it. [NITG]
- <Layer Type="ActorFrameTexture"
- InitCommand="%function(self)
- -- What's up with ponies and putting spaces on the ()'s?
- self:SetTextureName('Memory')
- self:SetWidth(DISPLAY:GetDisplayWidth())
- self:SetHeight(DISPLAY:GetDisplayHeight())
- self:EnableAlphaBuffer(true)
- self:Create()
- memory_aft = self
- end"
- />
- <Layer Type="ActorFrameTexture"
- InitCommand="%function(self)
- self:SetTextureName('Output')
- self:SetWidth(DISPLAY:GetDisplayWidth())
- self:SetHeight(DISPLAY:GetDisplayHeight())
- self:EnableAlphaBuffer(true)
- self:Create()
- self:hidden(0)
- output_aft = self
- end"
- />
- <Layer Type="Sprite"
- OnCommand="%function(self)
- self:SetTexture(memory_aft:GetTexture())
- self:xy(cx,cy)
- self:basezoomx(sw/DISPLAY:GetDisplayWidth())
- self:basezoomy(-1*(sh/DISPLAY:GetDisplayHeight()))
- self:diffusealpha(0)
- end"
- StartBlueTrailMessageCommand="%function(self) self:cmd('blend,normal;diffuse,150/255,0,209/255,'..(1*alphamult)) end"
- MoreTrailsMessageCommand="%function(self) self:cmd('blend,normal;diffuse,0,0,1,'..(0.96*alphamult)) end"
- />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement