Pages: [1]
  Print  
Author Topic: Two happy little bugs  (Read 11492 times)
DialFforFunky
Bean
*
Posts: 129


Revenge of the Burning Yeti


View Profile
« on: July 20, 2013, 04:42:42 PM »

Just encountered a new bug, or at least a new one for me:


___________________________________________
ERROR in
action number 3
of  Step Event
for object oPlayer1:

Error in code at line 861:
                               trap.status = 1;
                               ^
at position 30: Cannot assign to the variable


This error occurs when you pick up the golden skull from a ceiling trap when both of the side-walls are gone (which prevents the exits from shutting down). Is this just my spelunky acting weird, or does everyone have this issue? Its not very critical though, just click ignore and everything is ok.

Another thing I'm not sure about, but which might be bugged, is the interaction between the entrance of the golden city and the 'statues' in the background. Now this only happened to me once and it was such a surprise that I'm not entirely sure what happened, or even if it really did happen. But it seemed as if my staff suddenly disappeared and the entrance to the golden (open) city popped out of nothingness. I noticed that the entrance was placed at the lower half of one of the two-tile background statues, so I figured it might have been hiding behind it. Perhaps I was sleepy though, or just not paying attention. Still, I found it interesting enough to mention it.


F
Logged

Moloch
Mosskid
*
Posts: 565


View Profile WWW
« Reply #1 on: July 20, 2013, 05:34:17 PM »

Just encountered a new bug, or at least a new one for me:


___________________________________________
ERROR in
action number 3
of  Step Event
for object oPlayer1:

Error in code at line 861:
                               trap.status = 1;
                               ^
at position 30: Cannot assign to the variable


This error occurs when you pick up the golden skull from a ceiling trap when both of the side-walls are gone (which prevents the exits from shutting down). Is this just my spelunky acting weird, or does everyone have this issue? Its not very critical though, just click ignore and everything is ok.

You deserve some kind of playtesting/debugging trophy, dude. It's surprising this one hasn't been found yet in the past 5 years, though.

Reproduced and working fix tested.

Search for 'oDoor' in the oPlayer1 Step 'Action' code block.

Current code: (is the same in 1.1 and 1.2 source)
Code:
trap = instance_nearest(x-64, y-64, oDoor);
trap.status = 1;
trap.yVel = 1;
trap = instance_nearest(x+64, y-64, oDoor);
trap.status = 1;
trap.yVel = 1;

Should be:
Code:
trap = instance_nearest(x-64, y-64, oDoor);
if (trap)
{
   trap.status = 1;
   trap.yVel = 1;
}
trap = instance_nearest(x+64, y-64, oDoor);
if (trap)
{
   trap.status = 1;
   trap.yVel = 1;
}

Although since there can only be one idol trap room in a temple level, you could probably just use:
Code:
with (oDoor)
{
   status = 1;
   yVel = 1;
}
I guess it's rare that the player destroys both stone doors without disturbing the idol.

Haven't looked into the second one you mentioned but you're probably right on about it being a depth thing.
« Last Edit: July 20, 2013, 05:42:43 PM by Moloch » Logged

TyrOvC
Mossbaby
*
Posts: 424


This text is not random :(


View Profile WWW
« Reply #2 on: July 20, 2013, 08:43:36 PM »

I merged the trap bug fix into the community update repo, cool find.


I looked into the possible depth bug, and the depth for the Temple of Gold door is 10000 unlike the 9000 that all other doors have, BUT as far as I can tell aren't the background statues that you mentioned actually background tiles instead of objects? Shouldn't be any way for those to appear over an actual object then I think.
Logged

Moloch
Mosskid
*
Posts: 565


View Profile WWW
« Reply #3 on: July 20, 2013, 09:55:27 PM »

I'm pretty sure tiles can be set to any depth as with object sprites, like the grass 'frill' tiles in the jungle levels appear in the foreground with the player behind them.
Logged

TyrOvC
Mossbaby
*
Posts: 424


This text is not random :(


View Profile WWW
« Reply #4 on: July 20, 2013, 10:22:54 PM »

Hmm, yeah you sure can. And looking into something I've actually used them that way before in a game, so no idea where that notion came from!

Going to test out what setting the door to 9000 like the other doors does.
Logged

Moloch
Mosskid
*
Posts: 565


View Profile WWW
« Reply #5 on: July 21, 2013, 07:39:30 AM »

Depths:

other doors 9000
bgWanted, bgDiceSign 9004
bgStatues, bgTrees 9005
oGoldDoor 10000
bgKali*, bgTiki* 10001
bgExtrasTemple, bgExtras* 10002

I don't know if there is a reason for oGoldDoor to be lower depth than other doors...would the safest fix be to change it to 9001?
Logged

TyrOvC
Mossbaby
*
Posts: 424


This text is not random :(


View Profile WWW
« Reply #6 on: July 21, 2013, 01:01:06 PM »

As long as the depth for the door isn't referenced for some reason in the code, which I searched through and it isn't explicitly, should be no problem changing it to 9001.


Bet it was just one of those overlooked little things.
Logged

Pages: [1]
  Print  
 
Jump to: