Eufloria > Eufloria HD Mods

iPad Custom Level [HELP, Very Beginner]

<< < (3/9) > >>

Tomfloria:
So...


--- Code: --- SetCameraPositionToAsteroidID(0)
SetCameraZoomNow(50)
end

function LevelLogic()
StartLevelLogic()

if (GetCameraZoom() > 50) then
SetCameraZoomNow(50)
end

--- End code ---


Just a question.... That code you gave me, does it restrict zooming capabilities until I want the user to be able to use it?

Pilchard123:
No, it doesn't. You'll need to add that in yourself. Try something like


--- Code: ---if GetCameraZoom() > 50 and zoomRestricted then
    SetCameraZoomNow(50)
end
--- End code ---

Of course, you will have to set zoomRestricted to TRUE at the start of the level and then FALSE when you want it unlocked.

Tomfloria:
Where would I add zoomRestricted? or even, what would the code look like?

Also how do I change the text colour from black to white?

Aino:
Your code should look something like this for the zoom capper:


--- Code: --- SetCameraPositionToAsteroidID(0)
SetCameraZoomNow(50)
end

function LevelLogic()
StartLevelLogic()

zoomRestricted  = true
while GameRunning() do
if GetCameraZoom() > 50 and zoomRestricted then
SetCameraZoomNow(50)
end

coroutine.yield() --if you need this one....
end
end

--- End code ---

Tomfloria:
The code you give me crashes the level :/

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version