Evil_Toaster's Recent Forum Activity

  • I just want to say I also think Kayin's problems should be looked into some more. I don't think I had any problems like this when working with my shmup but if I ever expand on it I don't want this to be a problem for me either. Plus having Construct's name on IWBTG would be a pretty big deal.

  • "Game Constructor"

  • Take a look at this http://dl.dropbox.com/u/3314752/chessboard.cap

    For the chess board, I made a 8x8 grid of boxes, each with a private variable called "Position." Each one labeled a1 through h8 (I hope I did that right) So this way, if you want to move a piece to a certain position, just move it to the box with the private variable matching that position.

    Another thing that might be useful that I also used in that cap is the Grid Movement behavior. You set the size of a 'tile' and in an event you can tell it to move 1 tile up or down or whichever and it will move the same distance each time.

    Hopefully that will help answer some of your questions.

  • What methods have you tried so far?

    This is what I got: http://dl.dropbox.com/u/3314752/lasers.cap

    It works fine when there's just one laser shooter, for the most part. But all the weirdness happens when there is two or more because some segments move to the other line instead of staying where it should be.

  • Like these:

    They shoot out, but don't instantly create a line from the start wherever the end is. The laser keeps moving until it hits a wall. And if something gets in front of it, the laser stops moving wherever the new wall is.

  • I've finally came up with the solution.

    http://dl.dropbox.com/u/3314752/Movingbar.cap

    Works perfectly and realistically.

  • So I'm making a shmup right? Well, I'm gonna try using a timeline for enemy spawning. My problem right now is spawning say 9 enemy ships going in 9 different directions. How could I do that with a timeline. I know how to use the timeline, so I guess just how do I do it with anything.

    Here's an example

    Subscribe to Construct videos now

    Spawning a bunch of the same sprite, but in different directions.

  • Very cool solution. Custom Movement, why do I never think of that?

    Regarding your problem: if they should stand still when moving in opposite directions, you could compare the movement angles of the 8 direction movements of both sprites. If it's equal to 180 you set both speeds to 0. Could look like that:

    <img src="http://dl.dropbox.com/u/2306601/opposite.png">

    So that's a system compare. If you care to test it yourself just copy this to compare to 180:

    round(Anglediff(Sprite[8Direction].movangle,Sprite2[8Direction].movangle))[/code:1v0uryvq]
    

    Close, but the problem with that is that it will stop the ends from moving even the bar is not being pushed in the right two directions.

    Uhh, for example. If the bar is like this

    [L] <--

    |

    |

    |

    [R] -->

    And I make the left end go left and the right end go right, as shown with arrows, it won't move.

    The end goal is to have it so each of these ends that I pulling with the 8Direction sprites act as if they were pulling the bar physically. So if I pulled it in one direction with one sprite and the opposite direction with the other, they would align in those two directions. You know, as if you were really pulling two ends of a stick. The two 8Direction sprites are forces on the bar between them. At least, that's how I'm trying to make it.

  • I think I figured out a couple of ways to do this with much less scarier event sheets.

    http://dl.dropbox.com/u/3314752/bar.cap

    I control the ends of the bar with 8Direction and and fix the distance between the two with CustomMovement. For the most part, it works just fine. The only problem I really have is when both ends move at the same time. Because of the way the code is ordered, if I make the ends go in opposite directions, it doesn't stay still. I'm still thinking of a few ways to fix it, or different ways to do this entirely. At the end of the day, it has to be done in a way that's easy to control and makes sense, so I can make intricate movements with the bar with just two sets of keys or two analog sticks. And I think what I got is on the right track.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First I thought I would be able to do this with the Orbiter plugin, but as it turns out that one doesn't like setups where two objects orbit each other, so to speak.

    Anyway, my first tries at achieving something new are usually pretty bad, but I came up with the following:

    http://dl.dropbox.com/u/2306601/sticky_002x6.cap

    If I understood correctly what you wanted to achieve, this should at least come somewhere close.

    A and D rotate around one end of the stick and left and right arrows around the other. I don't know really how this should act, but rotating both ends at the same time in opposite directions results in the whole thing moving. You could also block this kind of behavior if it isn't wanted...

    Ah well, just tell me if this was useful.

    This is very useful. It's almost exactly what I'm looking for. I'm gonna study it and mess around with it to see if I can get exactly what I need.

    Something I didn't explain well before was that I also want the bar to move in any one direction if both ends are moving that way. So if I held W and Up arrow than the bar would move up no matter what orientation it was. Then there's more complicated things like if I held W and Right arrow, then it should move up but one end move right. Or something along those lines. I'm not quite sure how the more advanced movements will control. I just need it two control in a way that makes sense.

    But for right now, I'll work with this cap. It's very helpful. I'll sort out all the controls and stuff later and check back if I run into any road blocks.

    But if anyone else has anything insightful, don't hesitate to let me know.

  • Why don't you just use the rotation behavior on a sprite? That's all your doing isn't it, rotating it one direction or the other?

    Not exactly, because that would make it rotate at the center, so it would have both ends moving at the same time. I need both ends of the stick to be in control.

    Imagine playing this with a Playstation controller. You have two analog sticks. One analog stick controls the left end of the stick, and the other controls the right. If I move the left stick in a direction, the left end of the stick goes that direction, but the other end of the stick has to stay still.

    It's not like - / | \ - kind of movement. It's more like _\|/_. If that helps at all.

    Maybe another visual example. Look at this game

    Subscribe to Construct videos now

    He's controlling two boats with a line in between, the only difference between that and the thing I need is the line between needs to be the same length at all times. So the two 'boats' are at the same distance away from eachother all the time. (cool game btw)

    If you want a physical example, take a staff or something and hold both ends. And just move it with one hand at a time. Move your left hand up, but your right hand still. And then the other way around. I don't know a better way to explain it than that.

  • So here's my dilemma. I'm making a game that involves controlling a bar. One set of keys, WASD I guess, will move one end of the stick. The other set, arrow keys or numpad, will control the other. The goal is so that I am controlling a bar, like a stiff iron rod, where I control the movement the two ends separately.

    That might be hard to picture so here's an example.

    [L]------[R] <-- bar, with two ends.

    If I press W, that makes the left side of the bar go up. So then it should look something like this

    . . . . [L]

    . . . . .|

    . . . . .|

    . . . . [R]

    And after that, if I press left arrow and down arrow, the right side moves in that direction. Like this

    . . . [L]

    . . ./

    . ./

    [R]

    Problem number one is getting the line to stay rigid. If I used a Line object, then it'll stretch and stuff and I have no idea how I could get it to stay a certain length and still be able to control it the way I want. Problem number two is that the bar rotates on each end the right way. So if I only move one end, the other end stays still, like it's just moving in a circle. I only want the bar to move completely if I move both ends at the same time. This also means that if I do complex motions like, move the left end upwards and the right end to the side, it still works right.

    You can get an idea of what I'm doing by putting a line between two sprites with 8Direction movement and just, move them. The only thing I want different is for the two sprites to always be the same distance from eachother.

    So if anyone has any ideas to help me with this, I'd greatly appreciate it.

Evil_Toaster's avatar

Evil_Toaster

Member since 15 Nov, 2009

None one is following Evil_Toaster yet!

Trophy Case

  • 15-Year Club

Progress

15/44
How to earn trophies