Log In  

Cart #giyowakehi-0 | 2022-01-08 | Code ▽ | Embed ▽ | No License


There are multiple issues I can't seem to figure out such as:
Why isn't the text coming up during the "cutscene" unless I manually set the state="cutscene"
I can't change the spawn point after the cutscene
why do I need to talk to piggy twice after I collect all his apples

I think I'm somehow setting the text on the screen to inactive and I'm not sure how

~Any and all help is greatly appreciated thanks!~

P#104568 2022-01-08 20:40 ( Edited 2022-01-08 21:24)

1

Not sure about the problems you are having, the_bean17. I may suggest that you add dialog for just about everything that Simon can touch, especially if it is touched for the first time.

Branch:
"Must've been from an earlier tree."

Apple:
"This looks delicious, but I need to talk to Piggy first."

Water:
"This is too deep. I better not go swimming."

etc.

What Pico-8 cannot make up for in pixels can certainly be made up for in rich storytelling.

P#104571 2022-01-08 21:00

two thoughts (without having dug into the code too much)

state machines

you have a lot of code that looks like this:

if state=="intro" then
  ...
end
if state=="game" then
  ...
end
if state=="cutscene" then
  ...
end

this might cause problems when you transition between states. like, if you're in game and you transition to cutscene, well then the cutscene code is going to also run on this frame, when it should maybe not happen until the next frame. to give a simplified example:

function _init()
  state="apple"
end
function _update()
  if state=="apple" then
    state="orange"
  end
  if state=="orange" then
    state="apple"
  end
end
function _draw()
  cls()
  print(state.."!")
end

what do you think this will do? run it and see!

anyway, my recommendation is that you change your code to this instead:

if state=="intro" then
  ...
elseif state=="game" then
  ...
elseif state=="cutscene" then
  ...
end

(question: how would a change like this affect the apple/orange example?)

I have not tried this on your code, so idk if it will help, but I suspect it might be related to your first
question ("Why isn't the text coming up during the "cutscene" unless I manually set the state="cutscene"")

debugging

https://www.lexaloffle.com/bbs/?tid=42367 is a general tutorial for debugging; it's not very detailed but hopefully it's useful

P#104570 2022-01-08 21:06
1

Try, in cutscene_draw, add in, after where you have cls(0), the line: camera(0,0)

P#104578 2022-01-08 22:39
1

remcode, I am such an idiot thanks so much!

P#104579 2022-01-08 23:12 ( Edited 2022-01-09 15:19)

Can you edit the category for this thread?
It should be chat I think, not bugs.

P#104921 2022-01-12 22:24

[Please log in to post a comment]