Zelda AI Issues

0 favourites
  • 15 posts
From the Asset Store
Mini boss music in slight retro style, reminiscent of Metroid and Zelda
  • I'm making a short Zelda Fan Game, just so I can work on my Construct 2 ability without having to worry about graphics. But, I've been having an issue with the Octorock's AI. First of all, they won't shoot the rocks, and I can't figure out why. It worked earlier, but I went and worked on some new things in the game, and they just stopped. Second, they all shoot at the same time. No idea how to stop that. There are a few other things, such as some issues with the bombs, so just feel free to play around and see what you can do. Here's the .capx: Zelda Demo (The Spin Attack is unfinished, just ignore it)

  • If it helps, here's a .capx of an earlier build in which the Octorock did shoot rocks. OldZeldaVer.

  • If anyone's just, working on a solution, could you post a reply so I don't go insane?

  • I'll give some feedback since no one has answered, but I'm not experienced enough to solve everything.

    First off, I only see one Octorock. If you want them to behave differently, they need to be a different sprite. I had the same issue with my game. One enemy gets triggered to attack, and they all do it.

    So yeah, you can right click on him and click "clone object type" and get another one easily with animations and everything. You'll need one sprite for each different enemy. Any repeats of Octorock number 1, and they will behave the same.

    Of course, you'll need to work the new sprites into your code so they actually appear when you want them.

    The second thing I want to mention is that those images are way too large. There's a reason why you're using 1200mb of memory with just that small area. 7000px wide images are killer. Maybe go 1000px or 2000px at most, but since this is pixel art, you should be thinking more like 32px or 250px and not having to scale them so much.

    I didn't have time to figure out why things are not shooting, but maybe you accidentally added some trigger or condition that prevents them from doing so. Compare those two capx files and see.

    And like I said, I'm not a major expert, so if someone else can add something, please do.

  • You shouldnt need multiple instances of the same sprite - just be sure to use picking to make sure you're dealing with the sprites one at a time. I am a noob myself so im not the best at giving advice, but I do know you dont need multiple octorocks.. set one octorock then on your actions be sure you're using something like "for Each" that way no matter what octorock, it's following it's own set of rules independent of it's brothers. Ill get more into it when i have more time, but Look at the manual for "For Each (Object)" and also for picking, for example - pick the instance nearest to link and do something.

  • Hey, I tried what you said, and it works! At least it seems to so far. I'll keep testing it to make sure, but it seems fine. The AI is attacking individually with two of the same sprite.

    All I had to do was create a new event: system > for each enemyhitbox (or octorock in your case), and I moved my enemy AI under it as a subevent.

    It looks like you just saved me quite a bit of work! Why didn't someone mention this when I posted for help in my own thread....

    dpyellow you can ignore what I said about multiple sprites.

  • Haha I try to keep up with posts on here, but sometimes they slip through - this one had Zelda in the title soo...... :) Glad I could help for once instead of just be the one being helped (like always). :)

  • I don't know if this can help but here's a noob "ai" with states...

    dl.dropboxusercontent.com/u/45711709/noobAI.capx

    Quickly hacked together so it might be buggy ;D

  • Hey, thanks guys, I'll try all this. DrewMelton, My sprites are that big because they were extremely blurry before, but yeah, they probably are quite a bit too big. I'll play around with that and see how small they can be without being very blurry.

  • dpyellow, I also made small change to AI CAPX

    About overall design of the game.

    • I think there is way too many events and object. Button icons for example you could make one sprite called icon and just but different animation frame to them.
    • There is own event for almost every combination of conditions.
    • There is object called Tiled background object.
    • In an isometric game it would be better practice to make invisible collision box for all characters, walls and such and just but graphics over them to show animations (also collision box for melee attacks)
    • Also not sure why it takes 39 MB (that is a lot considering what there is).

    I say this because in a long run it makes things a lot easier and more functional.

    This actually made me to think about releasing one platform CAPX for new people to see one option how to make stuff. Single example usually doesn't give very good picture about the structure. Better users than I could then make improvements to it.

  • Hey, thanks guys, I'll try all this. DrewMelton, My sprites are that big because they were extremely blurry before, but yeah, they probably are quite a bit too big. I'll play around with that and see how small they can be without being very blurry.

    I think that's because you weren't using point sampling. It looked like it was set to linear sampling instead. Try point sampling, and maybe turn on pixel rounding as well.

  • Katala Thanks Man! I like how you made everything work in that .capx! About your suggestions, I agree with most of them, but there is a few things I`d like to clarify. For the Button Icon thing, the HUD needs multiple sprites for when you`ll be able to switch out items. and for the file size, ... that`s `cause I was dumb and made sprites too big instead of linear sampling and pixel rounding likeDrewMelton said.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • and made sprites too big instead of linear sampling and pixel rounding likeDrewMelton said.

    Point sampling, not linear. But yeah :)

  • > and made sprites too big instead of linear sampling and pixel rounding likeDrewMelton said.

    Point sampling, not linear. But yeah :)Heh, oops! that's what I meant. <img src="smileys/smiley9.gif" border="0" align="middle" />

  • Nice

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)