Tilt Monster questions

Anyone knows how to change game direction? I would like to run everything from down to up position.
Played with movieclip.lua and maingame.lua files with no luck.
Also having black screen even when Default.png image is in directory.

Thanks [import]uid: 22037 topic_id: 11233 reply_id: 311233[/import]

Did you ever figure this out? I have not jumped into it just yet, but I think i am going to try to figure it out too.

blade
[import]uid: 10801 topic_id: 11233 reply_id: 55614[/import]

Actually I see everything as running from down to up position already. As in the objects go from the bottom of the screen to the top. I too am in search for hints on how to make objects fall from the top to bottom ie other direction. Any idea’s on what we should be looking at?

Thanks. [import]uid: 22673 topic_id: 11233 reply_id: 61784[/import]

Worked it out. If anyone else is wondering, just open the maingame.lua and change the maths in the moveGems() to switch the direction of the gem objects. And so forth with the other enemies etc.

[import]uid: 22673 topic_id: 11233 reply_id: 61807[/import]

Hypergurl. Can you provide a example. I tried changing the math and it just did not work.

Thanks [import]uid: 34105 topic_id: 11233 reply_id: 65081[/import]

Try this amended code, all tree move other direction.

It is fun.

KC
– ************************************************************** –

– moveTrees() – move trees upward

– ************************************************************** –
local moveTrees = function()
local gameMoveSpeed = gameSettings[“gameMoveSpeed”]

treeObjects[“left1”].y = treeObjects[“left1”].y + gameMoveSpeed
treeObjects[“left2”].y = treeObjects[“left2”].y + gameMoveSpeed
treeObjects[“right1”].y = treeObjects[“right1”].y + gameMoveSpeed
treeObjects[“right2”].y = treeObjects[“right2”].y + gameMoveSpeed

– move trees back to the bottom once they go too far up
– also, increment score by 10 everytime the first tree cycles

if treeObjects[“left1”].y > 448 then
treeObjects[“left1”].y = -256

–[[
local currentScore = getScore()
currentScore = currentScore + 10
setScore( currentScore )
]]–

treeCycle = treeCycle + 1
pickupCycle = pickupCycle + 1
checkPointCycle = checkPointCycle + 1
starCycle = starCycle + 1
bigEnemyCycle = bigEnemyCycle + 1
pondCycle = pondCycle + 1

checkObjectSpawn()

– if in easy mode, increment score
if gameSettings[“difficulty”] == “easy” then
local gameScore = getScore()
gameScore = gameScore + 25
setScore( gameScore )
end

– Handle player invisibility
if playerObject.isInvisible == true then
playerObject.invisibleCycle = playerObject.invisibleCycle + 1

if playerObject.invisibleCycle >= 5 then
playerObject.isInvisible = false
playerObject.isElectro = false
electroBubble.isVisible = false; electroBubble.x = -100; electroBubble.y = -100
playerObject.alpha = 1.0
end
end

– See if combo display needs to be hidden
if gemCombo < 2 then
comboText.isVisible = false
comboIcon.isVisible = false
comboBackground.isVisible = false
end
end

if treeObjects[“left2”].y > 448 then
treeObjects[“left2”].y = -256

– if in easy mode, increment score
if gameSettings[“difficulty”] == “easy” then
local gameScore = getScore()
gameScore = gameScore + 25
setScore( gameScore )
end

– See if combo display needs to be hidden
if gemCombo < 2 then
comboText.isVisible = false
comboIcon.isVisible = false
comboBackground.isVisible = false
end
end

if treeObjects[“right1”].y > 448 then
treeObjects[“right1”].y = -256
end

if treeObjects[“right2”].y > 448 then
treeObjects[“right2”].y = -256
end
end [import]uid: 94613 topic_id: 11233 reply_id: 65385[/import]

Thanks that really helped. I figured out what I was missing. [import]uid: 34105 topic_id: 11233 reply_id: 66527[/import]

Sorry about a slow reply, have been away the last couple of weeks. Here is the code I’ve used to make the Gems fall from top to bottom. Hope it helps :slight_smile:

[code]

– ************************************************************** –

– moveGems() – move gems based on game speed

– ************************************************************** –

local moveGems = function()

local gameMoveSpeed = gameSettings[“gameMoveSpeed”]
local randValue

gemObject1.y = gemObject1.y + gameMoveSpeed
gemObject2.y = gemObject2.y + gameMoveSpeed

– gemObjects go past player (reset gem combo)
if gemObject1.y >= 300 then
– if gem wasn’t picked up, reset combo count
if gemObject1.alpha == 1.0 then
gemCombo = 0
end
end

if gemObject2.y >= 300 then
– if gem wasn’t picked up, reset combo count
if gemObject2.alpha == 1.0 then
gemCombo = 0
end
end

– gemObject1 goes past screen (top)
if gemObject1.y >= 400 then

gemObject1.x = randomGemLocations[gemIndice];
gemIndice = gemIndice + 1
if gemIndice > maxGemIndice then
gemIndice = 1
end
gemObject1.y = -120

if gemObject1.isVisible == false or gemObject1.alpha == 0 then
gemObject1.isVisible = true
gemObject1.alpha = 1.0
end

– choose new gem color
– set random color for both gem objects
randValue = random1to4Table[oneFourIndice]
oneFourIndice = oneFourIndice + 1
if oneFourIndice > maxOneFourIndice then
oneFourIndice = 1
end

gemObject1:stopAtFrame( randValue )

gemObject1.isBodyActive = true

end

– gemObject2 goes past screen (top)
if gemObject2.y >= 400 then

gemObject2.x = randomGemLocations[gemIndice];
gemIndice = gemIndice + 1
if gemIndice > maxGemIndice then
gemIndice = 1
end
gemObject2.y = -120

if gemObject2.isVisible == false or gemObject2.alpha == 0 then
gemObject2.isVisible = true
gemObject2.alpha = 1.0
end

– choose new gem color
randValue = random1to4Table[oneFourIndice]
oneFourIndice = oneFourIndice + 1
if oneFourIndice > maxOneFourIndice then
oneFourIndice = 1
end
gemObject2:stopAtFrame( randValue )

gemObject2.isBodyActive = true
end
end

[/code] [import]uid: 22673 topic_id: 11233 reply_id: 66593[/import]

Thanks for the help. [import]uid: 34105 topic_id: 11233 reply_id: 66975[/import]