okay and i could help you code the game
Printable View
okay and i could help you code the game
Okay guys im just blanking out right now. Umm lets say that i want a diffrent lua script to load after pressing cross X what code would I use
if pad:cross() then---------------------------------------
end
if pad:cross() then
screen:clear()
dofile ("script.lua")
end
-----------------------
where script.lua is the file that you want to load.
this should work
Nope
It stays on the same screen
if pad:cross() then
gamestate = "game"
end
end
function playGame()
screen:clear()
dofile("script.lua")
if pad:start() then
gamestate = "menu"
end
end
--this part is after the main loop
if gamestate == "game" then
playGame() end
hmm how is it a halo 3 game... halo 3 isnt out... do you know the weapons? vehicles? characters? environments?
The code is fine. The problem is your code logic.Quote:
Originally Posted by RealRitzcracker
yes, i knew that my code worked because i use expressions like that all the time. It must be the way you have got your code written.
Ya I guess so but nothings working.
Im so confused
It is kind of difficult to see what you are doing wrong if we can't see what you are doing.