setBounds() / setFrame() in rocketlobster tutorial

New to Moai? Get started here with our best tips and tutorials.

setBounds() / setFrame() in rocketlobster tutorial

Postby aou » Thu Jul 12, 2012 5:10 pm

I'm trying to get the explosion expansion effect to work as described in the rocketlobster tutorial, seems like MOAIProp2D.setFrame() as suggested was deprecated in 1.2, so tried using MOAIProp.setBounds() ; neither seemed to have any effect.

I also tried using the binary from the sdk, as well as building my own from the latest sources in git.

Has anyone else run into this problem?
aou
 
Posts: 23
Joined: Thu Jul 12, 2012 2:42 pm

Re: setBounds() / setFrame() in rocketlobster tutorial

Postby mxttie » Thu Jul 19, 2012 12:28 pm

I'm very new to moai, so bear that in mind ;)

The rocketlobster tutorial is included in the sdk: $moai-sdk\samples\tutorials\RocketDirective
The code there should work.

I kept having a problem using the MOAISim.getDeviceTime method:
PANIC: unprotected error in call to Lua API (C:/tests/moai/lua/test.lua:11: attempt to call field 'getDeviceTime' (a nil value))
so the method seemed to be missing.

I was using the host included with the rocket example. then I discovered this is not the same host as in the main folder:
$moai-sdk\bin\win32

when I switched to the host in the main folder, the getDeviceTime method resolved.

So maybe, you are also using a 'different' host?
mxttie
 
Posts: 24
Joined: Thu Jul 19, 2012 12:05 pm
Location: belgium

Re: setBounds() / setFrame() in rocketlobster tutorial

Postby dana » Thu Jul 19, 2012 3:16 pm

There were a few issues in some of the Rocket Lobster files included in the SDK. I went through all of the lua files included and made sure to fix all of the places where functions were deprecated, so in the next release the tutorial files should all be fine.
User avatar
dana
Site Admin
 
Posts: 200
Joined: Fri Mar 02, 2012 6:10 pm
Location: Zipline Games


Return to New Users

Who is online

Users browsing this forum: No registered users and 1 guest

x