Sup with that?'s Recent Forum Activity

  • Just to make sure, if you're worried about performance impact from using too many layers, don't be. Number of layers shouldn't affect performance. In fact, moving all the objects through events rather than letting them sit still on their own layer would probably be less efficient.

    That said, depending on what you're using to move the character, you can possibly use the character's movement speed and angle of motion to nudge objects in the opposite direction at different rates. E.g. something like,

    Character is moving

    --> move Object A [Character.Speed/2] at angle [Character.Angle+180]

    --> move Object B [Character.Speed/4] at angle [Character.Angle+180]

    This means Object B will travel at half the speed of Object A in the opposite direction that the character is moving, thus making a sort of parallax effect.

    You can also have a look here at Somebody's effects, namely the Seamless and Scroll effects. They can be used to achieve similar things, albeit per object.

  • That sounds like it'd work, I'll try it out and report back if I get any problems. Thanks!

  • Thanks for the advice guys, I had varying degrees of success but it seems the more complex the project got the more trouble I was having with the loops. Right now I've got a kinda ghetto setup where each sprite spawns a "breadcrumb" after an action, so that the next sprite in line moves over it, does the same action and spawns another crumb for the next sprite, etc. Surprisingly it's giving the best results (visually) out of all my other attempts, even if it's kinda inelegant. Oh well, I'll see what I can do.

  • If it's even possible. Or, how can I insert a delay within a For Each loop that works for each object?

    The premise: I have several sprites moving in a chain, the logic for which is basically the same as in the default Pin Chain Style example. I want to make it so the leader sprite shoots, then after a short delay the 2nd sprite in line shoots, then the 3rd, then the 4th, etc. thus creating a sort of "stuttering" volley of shots. I've been trying to make this happen by making the sprites spread a value (a "shoot" signal) amongst themselves using a For Each loop, starting from the leader and working down the line, but I can't seem to figure out how to delay said value's spread. Right now all the sprites effectively shoot at the same time because the value spreads instantly.

    I tried using the Wait function but this doesn't seem to repeat itself within the loop. Instead it waits X number of seconds at the very start, then runs the loop continuously without ever Waiting again. I was hoping it would repeat the Wait on every pass, so that each object had to wait a while before shooting. How can I do this (with or without the Wait function)?

    I mean, maybe I'm coming at this from the wrong angle, so if anybody has a better solution I'm all ears.

    Thanks for any help.

  • Might be simpler to just use the Persist behavior to make sure the stars don't respawn when you change layouts. That way you can just add 1 to your variable every time you collect a star, since you won't be able to recollect them.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are you using the Pin behavior? Pinning it by Position & Angle should move it on both the X and Y axes automatically.

  • Objects have the expression "Count" which counts up the number of existing objects of this type, so you can use that. Something like,

    Start of layout --> Set score to Stars.Count

  • Yeah just use it the same way as your current jump control.

    On any touch end --> Player simulate jump

  • Perhaps you can use the "On any touch end" condition to do this.

  • I'm not really experienced with the video object, but perhaps you can mute the video and let it play in the background when the layout starts, then set it to replay when you get the the cutscene?

  • Sorry, I had a quick look at the image but wasn't able to fully understand it because I was in a hurry, buuut... A quick and dirty workaround is to reposition the sprite if it's overlapping another one. Something like,

    If Sprite overlaps Sprite + Pick 2nd instance of Sprite --> Set position to random

    This way it'll keep moving the sprite if it's overlapping another, so eventually it'll end up with them not overlapping.

  • First two things that come to mind: 1) There's a Destroy Outside Layout behavior that'll automatically destroy the object if it's out of bounds. Only issue is if you need objects to spawn outside layout and come in from the edge of the screen. 2) Destroy the object using On Start of Layout event, this will remove it at the start but later instances can still go outside the layout.

    For the other events you'll need to add another condition that checks if the object is outside layout. So e.g.

    Object distance to X is Y + Object is not outside layout --> Do X

Sup with that?'s avatar

Sup with that?

Member since 30 Aug, 2010

None one is following Sup with that? yet!

Trophy Case

  • 14-Year Club
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies