Wertle's Forum Posts

  • Sorry to dredge this up again, but i'm facing a similar issue and no answer is yet to be found.

    I did come up with a rather convoluted workaround that involves spawning invisible anchors to pin to so you are pinning to a different sprite type, but if there is a more elegant way to do this I would love to hear!

    storage.wertle.com/construct2/SnakeTrailExample.capx

  • doesn't the "pick by highest/lowest value" action already do this?

    That only lets you compare instance variables on the object, versus say it's x or y value (unless you just copied those into an instance variable beforehand)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So my theory about negative angles wasn't right, but I was able to get what you want using "Rotate Towards Angle" instead of "set angle"

    storage.wertle.com/construct2/SlopeAngleFixed.capx

    You can change the angle number to get a faster or slower transition

  • I may be able to help with this as I was facing something similar recently, something to do with weirdness about handling -angle values, but I have my own noob question first.

    It says the version of that capx was saved in release 141 or newer, so I can't open it. Where can I download that release version? I only see 139 on the site. Let me know so I can try and help :)

  • The player character in my game leaves a trail of footprints behind them when they move around, and the trail needs to stick around for the whole level, not fade away.

    For the prototype I'm just doing this by spawning footprint sprites, but since this ends up with many, many sprites, I'm wondering if there's a better way to approach this when I do it "for reals."

    Suggestions? Past related topics seem to only have to do with trails that fade, which is not what I want.

    Thanks!

  • Perfect! I was thinking I'd have to do something along these lines but did not know about the Replace Object thing.

    Thanks.

  • So I'm at a point where I've built a prototype with a player sprite getting things feeling pretty good. I've realized now after the fact that I should have done the player as a family (I'm going to try having different player characters with slightly different rules to them, but that share a lot of stuff).

    I'd like to create a Family with all the instance variables and behaviors from my one sprite and then change my events to reference the family instead of the individual sprite.

    However, I can't just make duplicate instance variables in the family (families can't have instance variables named the same as a member's instance variables). I can't delete the member's variables first because that will mess up my events.

    Are there any best practices for this sort of situation? Should I just set up an "empty" family with the instance variables and duplicate all my events with the new references?

  • Looks like that's the way to go for now, thanks :)

  • Greetings! I did some searching but did not find anything in past topics on this.

    Is there a way to use the LOS behavior to detect things *behind* a sprite? For example if my sprite is moving to the right, could I have the cone of view facing the left?

    My backup plan is to pin an invisible sprite with LOS to the main one and always set its angle to be the opposite of the main sprite, then just use that for my LOS checks, but if there's a way to do it with just the LOS behavior I'd like to do that.

    Thanks!

  • For a bit more clarification of what I mean, here's a screenshot of some debugging. The text set for Sprite0.Value is inconsistent on which instance it's pulling the variable from (sometimes it's the sprite being dragged, sometimes it's the one collided with).

    Is there a way to differentiate between these two instances in the Event sheet so that I can get both of their values?

    <img src="http://storage.wertle.com/constructQuestion.JPG" border="0" />

  • Hey folks, my question might end up being one of those easy things that's just difficult to figure out how to search.

    I have multiple instances of a sprite with an instance variable called "Value," which is a different number for every instance. I want to make it so that when two instances of the same sprite collide, I add their values together and store it in a variable.

    How do I differentiate between the two instances of the same sprite in the "is overlapping" event? If it were two different sprites, it would be Sprite1.Value + Sprite2.Value in the resulting action, but if they are both instances of Sprite1, how do I get the value from each? (Sprite1.Value + Sprite1.Value doesn't work)

    I'd know how to do this if it were two different sprites colliding or if I were scripting it traditionally, but I'm stumped here.

    Let me know if you can help, thanks!

  • This plugin is awesome, thank you so much!

    One note on a change I made to your drag-to-pan events. It's probably already on the forums somewhere but I'll put it here in case drag-to-pan searchers find this thread first :)

    In the original, if you drag, let go, then touch and drag again, the window will pop back to the center. If you want to retain the new window position (so you can keep dragging with multiple gestures without it resetting) make these changes:

    Make 2 new variables (I just called them StartingPositionX and StartingPositionY) and at layout start set them to WindowWidth/2 and WindowHeight/2 as default values. Use those in the Scroll To action, then on touch end, update those positions to where you've scrolled to.

    Basically change this:

    <img src="http://storage.wertle.com/construct2/dragToPan1.JPG" border="0" />

    To this:

    <img src="http://storage.wertle.com/construct2/dragToPan2.JPG" border="0" />