GithubSPerez / pt-new-level-editor

Public repo for PizzaTower's Make your own Pizza mod
23 stars 3 forks source link

Fun Farm Crash #87

Open Mati278 opened 1 year ago

Mati278 commented 1 year ago

the soundpack is called dmca tower btw

https://github.com/GithubSPerez/pt-new-level-editor/assets/100154995/caad4f9a-0574-47e0-8df3-9e3767934bba

NARbluebear commented 1 year ago

I just encountered this myself, and I feel like there should be a little more information on the problem. When entering a room with ladders, the CYOP mod tries to check if a ladder object has a variable called showLadder. The script in question is as follows:

gml_Object_obj_ladder_Step_2:
if showLadder
    visible = true

The script looks kind of redundant as it just copies the variable showLadder to the built-in variable visible every frame. This is weird though, as when obj_ladder is created, it's given a variable of showLadder with the value of 0. The fact that it's barely referenced on top of causing a crash makes me think you, or whoever the developer of CYOP is, should really just scrap that variable altogether and make it so the ladders use visible instead.

image

ovapico998 commented 1 year ago

i've actually fixed this in a fanmade mod i'm developing so i'll put this in a little more context if you dive into the files (of cyop), you'll notice that the object in question (obj_hookup) uses the ladder object (obj_ladder) as a parent obj_hookup (and a similar ladder equivalent, obj_ladderhorizontal) both do not set the variable upon creation, thus causing the crash to fix this, basically all you need to do is to get undertale modtool, search for obj_hookup, (and obj_ladderhorizontal, if you're a completionist), and then insert this code anywhere in a new line "showLadder = 1" doing this will make the game not crash, and the ladder will show (hopefully) the reason you need to set the variables there is probably just because an object parent basically runs all of the same code as the object unless new code is written, or something, and the ladder's code says if showladder is one, then it'll show, but obviously it doesn't account for showladder being nil, or nothing, i guess this is like ridiculously simple, too, it makes me wonder why this is a major issue in the first place? anyways, if you'd like to close the issue down, please do, and hopefully you'll get this out in an update thanksies, from ova pico