So in my game script, after you beat the first puzzle and the cutscenes are over and everything, a hidden variable is set to 'true' (showing that it is over). I have a script ready so that the arrows that let you go to other locations only work when it's over. Howvever, when it's over, I click an arrow and the 'area' variable gloes blank and then nothing happens. Can anybody check and fix my scripts to make it so that when I click the right arrow the area variable is set to hills? The game is called DONT PLAY - Scratch Cat Detective or something like that, I cant remember the bit at the beggining.
Last edited by EdgeGamer (2013-01-28 14:50:30)
Offline
After surveying your script it was easy to determine your problem.
You are displaying the Up and Left arrow sprites after the first puzzle is solved.
The variables in play are then:
Area = "Southern Beach"
BSO = true
In the left arrow sprite here's the block of code:
when [Left v] clicked end if < (BSO) = [True] > if < (Area) = [Southern Beach] > // this is true set [Area v] to [Hills] // Area now = Hills end if < (Area) = [Northern Beach] > set [Area v] to [ ] end if < (Area) = [Hills] > // Then this is true set [Area v] to [ ] // and immediately sets Area to empty end if < (Area) = [West Road] > set [Area v] to [ ] end if < (Area) = [Canyon] > set [Area v] to [ ] end if < (Area) = [Cornelius' Pathway] > set [Area v] to [Canyon] end end
Last edited by dechan (2013-01-28 16:02:11)
Offline
oh, yeah, that would mess up the game alright...
Does it work now, EdgeGamer?
Regards,
CAA14
Offline
Well, i just looked now, and i don't think you have a ton of bugs.
I think it's just that you didn't finish it.
Like dechan said, you have some empty assignment boxes that need to be filled.
Very clever puzzle.
i love those puzzles, reminds me of the moron test app.
Hope that helps,
CAA14
Offline
dechan wrote:
After surveying your script it was easy to determine your problem.
You are displaying the Up and Left arrow sprites after the first puzzle is solved.
The variables in play are then:
Area = "Southern Beach"
BSO = true
In the left arrow sprite here's the block of code:when [Left v] clicked end if < (BSO) = [True] > if < (Area) = [Southern Beach] > // this is true set [Area v] to [Hills] // Area now = Hills end if < (Area) = [Northern Beach] > set [Area v] to [ ] end if < (Area) = [Hills] > // Then this is true set [Area v] to [ ] // and immediately sets Area to empty end if < (Area) = [West Road] > set [Area v] to [ ] end if < (Area) = [Canyon] > set [Area v] to [ ] end if < (Area) = [Cornelius' Pathway] > set [Area v] to [Canyon] end end
Well, what I was going for, was that it picks one of those 'ifs' depending on the area, and the hills one was blank because it would be hidden then anyway. I think I know how to fix it.
Offline