|
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 4 posts ] |
|
Making things happen according to frame
Author |
Message |
Djinn
Joined: Sun Oct 29, 2006 4:26 am Posts: 298
|
Making things happen according to frame
Here again, this time wondering how to hook into determining what sprite frame is active and then doing stuff based on that. I want it to check for frame 14 and do something then gib or remove the parent. I figured I'd try to do the last part first to test it, and I can't even get THAT to work. Take a look, svp:
function Create(self) end
function Update(self) if self.Frame > 13 then self:GibThis(); end
|
Thu Feb 18, 2010 2:57 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Making things happen according to frame
function Update(self) if self.Frame == 14 then self:GibThis(); end end
should work, by all accounts, but then, your script should also work.
Check the console for any errors, and then try replacing 'self:GibThis' with 'print("test");', and then spawn the object and check the console
edit: oh and also try just adding 'print(self.Frame)' to the update code (outside of any checks)
|
Thu Feb 18, 2010 3:10 am |
|
|
Mind
Joined: Thu Mar 06, 2008 10:54 pm Posts: 1360 Location: USA
|
Re: Making things happen according to frame
your script needs another end :3
|
Thu Feb 18, 2010 3:26 am |
|
|
Djinn
Joined: Sun Oct 29, 2006 4:26 am Posts: 298
|
Re: Making things happen according to frame
... Uh DURR. Woops. Thanks, guys, haha.
|
Thu Feb 18, 2010 4:25 am |
|
|
|
|
Page 1 of 1
|
[ 4 posts ] |
|
Who is online |
Users browsing this forum: No registered users |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|