ERROR in
action number 1
of Collision Event with object obj_sword
for object obj_heart:
Error in code at line 5:
if(self.hearts<self.max_hearts)
^
at position 18: Unknown variable hearts
~work on your code. I can see from the error that you need to work quite a bit on your code. If that line of code is in your Link object, you do not need to use self. you could rewrite the line as: if hearts < max_hearts Then again, I am inferring based on what the error says about your code.
@theforeshadower I fixed the sword/heart collision now! Lol, I do make silly mistakes sometimes. If you find any more bugs please let me know. Scrolling for me is more of a graphical thing. Plus after playing it on the TLoZ on GBA I have to say not having screen scrolls is cool sometimes. (I may make this feature optional for speed runs and such.) The sword has no animation, in TLoZ it actually slides directly forward maybe a pixel or two and then just vanishes. Also, in TLoZ the sword can be swung that rapidly, I timed them, and I got it pretty close, TLoZ might swing a fraction of a second slower, to be honest. Finally, for the enemies being on the edge of the view, I see that this is a problem. I need to program the enemies to randomly spawn, so when I do that, I'll be keeping them from blocking the hidden side of transitions between rooms.
okay, um.. let me rephrase a few things.
I don't actually use a bunch of rooms. It's one large room subdivided with a view.
I haven't programed the "scrolling animation" yet. That's more visual for me. Like I said before. I played TLoZ and I honestly prefer no animation, so it doesnt pause for 1/2 a second between rooms. I do plan on adding that feature though, and as for Link's sword animation, I haven't added that either. I will add that though! Thank you.
ha ha yea, i did use a built in fade, i was gonna make it with pixel-y goodness, but spriting is something I easily get sidetracked on.
What are you thoughts for the movement?
As far as I can tell, in TLoZ there are no diagonals. Right now, its only the first key you pressed affects movements. TLoZ seems to be the last key you pressed.
the items don't despawn yet! I need to fix that, maybe tonight or this weekend, I gotta be at work in an hour, and I will be checking on the movement again.As far as items despawning(rupees, hearts, etc.) one simple if statement in the step event of the object:
Link is locked to a grid, albeit a strange one.
He doesn't take a final step like he does in TLoZ. I would like to see about implementing that sooner rather than later.
The current build still has some graphical glitches.
Please let me know if anybody finds anything interesting.
edit: yea, the sword being misaligned is one of the graphical glitches for now.
if (x < view_xview[0]) || (x > view_wview[0]) || ( y < view_yview + 64) || (y > view_hview[0])
{
instance_destroy();
}
Of course, I don't have the exact size of your HUD object in terms of y values. So replace 64 with whatever the height of you Y object is.Why thank you for that.Good idea but don't forget: When you move from area to area, it still removes them. If you just have a timer, someone could move between areas quickly and still see the hearts and whatnot. Of course, that would be the person trying to find bugs/glitches in the game :)
I do believe that I'm going to have them on a timer. I think they take 10 seconds to despawn. After I get home from work I'll play TLoZ again and see how long those things stick around.