hello everyone, I’ve been developing a game that utilizes director as well as spritegrabber. I seem to have solved how to insert my sprites into the localGroup, as it works on the device and simulator just fine. the problem i’m having lies in two functions i’m using in my game that changes a display objects graphic depending on a varible I have set. the code works like this example.
–first i have a variable to represent bullets for my weapon.
local ammo = 9
–then we have a function thats updates the graphics for the bullets —being shown on screen.
local function ammocount()
if ammo == 0 then
bulletpic = display.newImage(“bullet0.png”)
elseif ammo == 1 then
bulletpic = display.newImage(“bullet01.png”)
end
end
Runtime:addEventListener(“enterFrame”, ammocount)
I have another function like this as well for updating my players healthbar.
if I dont try to insert the display objects for these functions into
the localGroup. it runs fine in the simulator and displays the graphics properly. when i build it for my android device, the graphics for my bullets and healthbar do not show up at all and no errors are displayed. if I try to insert the display objects for these graphics into the localGroup it runs fine on the simulator still, but returns a director error on the android device that so many others have posted about regarding params. *note that the example was just a quick explanation and not the full code for all nine graphics.* so, I guess the question would be… how do i go about getting these graphics into my localGroup and onto my devices screen properly. I’ve been working at this for days and it’s the only thing that is stopping my game from making it to my device.
any help is greatly appreciated.
thank you kindly,
Joey king
Crayotic Games
[import]uid: 97844 topic_id: 21368 reply_id: 321368[/import]