Jalopes's Recent Forum Activity

  • Awesome, I'll have a look at this. Thanks so much man!

  • The simpler comparing method would probably be fine - I don't think there will ever be more than 5-10 values I'm going to have to sort.

    It makes sense, but I'm having trouble imagining how to construct that with events - I hate to ask for more, but could you maybe give me an example or demonstration of how it could be done? Arrays are still kind of a new concept to me, so... yeah, haha. And Verve's events for sorting seem kind of above my level of comprehension at the moment... but I'm gonna keep looking at it, it seems like I could learn quite a bit from it.

    Thanks man.

  • Sure. Basically what I'm trying to do is determine turn order for an RPG battle system. As in, one character takes his move, then the next, then the next, etc. The order that they take their turns in is determined by a "Speed" statistic. Whoever has the highest takes their turn first, then next highest goes next, and so on. Once the last turn is taken, it repeats from the beginning.

    Using an array for this might not even be possible - I've never used the array object, and though I basically understand what it does, this might not be an ideal use for it. My idea was to take each individual speed statistic and order them in an array from highest to lowest. The value at (1, 1) would be the highest speed stat, the value at (1, 2) would be the second highest, (1, 3) the third highest, etc. In the game, I would check whose speed stat is at (1, 1) to determine the first turn, (1, 2) to determine the second turn, and so on.

    The biggest thing here is being able to take a bunch of values and order them from highest to lowest. If I could do that, then I think I would be ok.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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?

Jalopes's avatar

Jalopes

Member since 27 Jul, 2013

None one is following Jalopes yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies