View Single Post

Old 04-13-2008, 04:43 AM   #1656
sharksoda
SHARK SHARK SHARK
 
sharksoda's Avatar
 
sharksoda is offline
Join Date: Oct 2006
Location: Seattle, WA
Posts: 352
Marketplace Rating: 0
Send a message via PM  to sharksoda
soda
Default

everything you could do in 3.9 is easy to do with Lua in 4, it's the new stuff that can get complicated.
basic format:
Code:
local t = Def.ActorFrame {
  LoadActor( "something" )..{
    InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;zoom,0.5);
    OnCommand=cmd(smooth,0.35;zoom,1);
    OffCommand=cmd(smooth,0.3;zoom,0);
  };
  LoadActor( "something else" )..{
    InitCommand=cmd(diffuseblink);  
  };
};
return t;
edit: method #2:
Code:
local t = Def.ActorFrame{};
t[#t+1] = LoadActor( "whatever" )..{ InitCommand=cmd(put stuff here); };
return t;

Last edited by shakesoda : 04-13-2008 at 04:49 AM.
  Reply With Quote