Jalopes's Forum Posts

  • I have to apologize for having so many questions these past few days - I don't mean to clutter the forum, but I'm very much an amateur when it comes to this stuff, haha.

    So what I'm looking to do is determine turn order for a turn-based kind of game. The idea I have is taking all the speed stats of the players/enemies and storing them in an array at the coordinates (1, 1), (1, 2), etc. I want to make the value at (1, 1) the largest, then (1, 2) the next largest, and so on. Then, I'd have a value called "Turn" which stands for whatever the turn number is - after each turn, I'd add 1 to it, and the game would check which value in the array is at (1, "Turn") to find out who goes next (obviously it'd need to be a bit more intricate than this, since the values need to refer back to whoever has that particular speed stat, but... this is just a start, haha).

    This is my current idea, anyway. Regardless of whether I stick with this method or not, I'm going to need some way to order the speed stats - I'm figuring an array would make sense here, but I'm not entirely sure.

    Also, so I don't have to make any other topics for this (and the questions are sort of related), I've been looking into the "S" plugin because it sounds like something that could be very much helpful to my cause of making an RPG... but I'm not entirely sure how it works, it seems fairly detailed and complicated. Are there any caps out there that demonstrate its functionality or anything? Or tutorials or something? I couldn't find anything particularly helpful through searching, but maybe I just wasn't looking close enough.

    Thanks guys, appreciate the help you've been giving me.

  • You might not need to keep track of an invisible sprite.

    Try the overlapping by offset condition for your player.

    For x and y use cos(Player.Angle)*distance and sin(Player.Angle)*distance.

    For distance you just do however wide your character is i guess.

    I'm thinking of doing the same thing in my game, and I was going to try it out today.

    Good luck, I'll report back if it works in my game.

    Seems like an interesting solution. What I ended up doing was putting a "trigger once" on all of the else's - so they conflict with each other on one tick, but that's not really enough to make any significant difference.

    The line of sight behavior sounds interesting, too, I've never tried it. If my system for this starts giving me trouble, I'll definitely look into it.

  • That's something I considered, but I've been trying to avoid using trigger objects like that, mostly because I think it'll be good practice for me to come up with other ways, haha.

    That might actually be more efficient than the way I'm doing it now, though. Oh well. <img src="smileys/smiley17.gif" border="0" align="middle" />

  • NEVERMIND. That was stupid - the Else's are conflicting, duh.

    But I guess I'm still not entirely sure what to do here for this. I can't figure out a way to set "Facing" back to 0.

    I'm sorry this problem is going to end up being really specific... I'll try to go into any more detail if need be, but hopefully I'll figure something out.

    EDIT: yaaaay I figured it out! Or, at least, I got something working. So... I guess nevermind completely then! I'll post if I run into some other snag.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been trying to figure out what I could possibly be doing wrong here for a very long time so I'm just gonna go ahead and ask...

    My problem is interacting with NPCs - everything works fine except for the events that are supposed to determine if the player's sprite is facing the NPC. Here is essentially what I have...

    After picking the right NPC object that's closest to the player, I have a long list of events that are supposed to detect the player's position compared to the NPC's. In other words...

    <img src="https://dl.dropboxusercontent.com/u/29310757/thing.PNG" border="0" />

    So, if the player's ("AlienBox") X position AND Y position is higher than the NPC's, the player should be somewhere along the bottom right corner of the NPC. Then, if the angle of the player is appropriate, a value for "Facing" is set to 1.

    The issue I'm having isn't that this doesn't work - it's that when I add events for each possible position (three more, for the other three corners), only the first two that I've listed do anything. So, if I have the events for bottom right and bottom left up higher on the event sheet than top right and top left, only bottom right and bottom left will function. I've mixed and matched all 4 events, and regardless of what they say, only the first two I've listed work.

    I'm really stumped by this one... no clue what could possibly be going wrong. The only other way I can think to test positioning would be to add a detector object, but I would really prefer not to do that. Anyone have any idea what might be going on here?

  • I figured as much. I guess I'll get down to working on a custom engine for it, then.

    I'm not too familiar with how Construct handles loops and such, and my memory on how MMF2 did is a little fuzzy... any idea where I could look to figure out a good way to go about this?

    EDIT: Actually scratch that - I've come up with a way to do it. It's probably horribly inefficient, but it's at the very least functional, so there's that. <img src="smileys/smiley1.gif" border="0" align="middle" />

    Thanks for your input, I appreciate it!

  • Hey guys, just got Construct Classic, looking forward to working with it... but I'm pretty new to this, so bear with me <img src="smileys/smiley2.gif" border="0" align="middle" />

    I used to use MMF2 a little bit, and coming off of that I kind of have a negative attitude towards automatic movement behaviors... all of the ones in that program were notoriously imprecise and unreliable. I'm wondering if in Construct I should have the same fears. I'm programming something fairly simple at the moment - a basic 8-directional movement engine for an RPG, something like Earthbound or Mother 3 - so I'm wondering if it'd be smarter to use one of the behaviors or if I should go ahead and do it all via the event editor.

    I tested the 8 direction movement behavior already, and it didn't seem very accurate with collisions. Plus, the acceleration/deceleration couldn't be switched off, and the alternative of setting them both to like 100000 seems kind of... not ideal.

    So what are your thoughts? Should I bother with programming it all myself or is there a way to use behaviors efficiently?