deadeye's Forum Posts

  • Ok fixed i just changed the "Distance(Box.XY,Sprite.XY)" to "Distance(Box.X,Box.Y,Sprite.X,Sprite.Y)"

    http://www.mediafire.com/?fjib9tdytm9

    Oi, of course it's something simple like that. I even used (Box.X,Box.Y,Sprite.X,Sprite.Y) to detect distance to slow down my flat-speed test, but I never thought to change it in the action.

    Good job, Doppel

  • deps: the renderer renders from back-to-front. So if you have a bunch of particles sharing the same texture, so long as they're on the same layer or are at least contiguous in the Z-order, there won't be any texture changing. If you intermingle other textures (say, other particles) in the Z order with a high degree of randomness, you will give the GPU more work since it will keep changing texture. At the moment, Construct makes no such optimisations on its own. It's up to you to organise your Z ordering.

    That's helpful to know for tiled games.

  • I couldn't really figure out containers. I assigned them and got the yellow box and everything, but it doesn't seem to register. I don't think it assigned them correctly, since I didn't really understand what you meant by:

    > + objectBody condition
     - objectSprite: Set position to objectBody
    [/code:38bwfd1i]
    
    Did you mean "always - set position"? because if I do that the containers seem to rapidly switch between sprites.
    

    I meant something like this:

    + objectBody.Value('status') Equal to "alive"
    [ul]
    	[li]objectSprite: Set position to objectBody[/li]
    [/ul][/code:38bwfd1i]
    
    The condition doesn't really matter as long as it's something that references objectBody.  It could be "objectBody.Y Greater than 0" or "objectBody is visible" or something like that.  If you want it to have an Always like effect, use a condition that will be consistent each cycle.
    
    And yeah, you can do simple stuff to detect whether your sprite is on the ground.  I use y position to detect whether my jack-in-the-boxes were jumping or standing still.  I suppose you could do something similar for x position to detect walls, but it might just be easier to use detectors.
  • Flamewars Get Threads Locked.

    No flamewars, I was just joking around with Doppel.

  • I've fiddled with it for a bit and I can't seem to get it to work the way you want. I'm assuming that you want the box to move faster the farther away from it's target it is? I can't seem to work out how to slow it down from an unknown speed and distance that way.

    If I set your box to a constant speed each time I can get it to slow when it's within a certain range of the target, and stop on target, but it starts at the same speed no matter how far away the next target is. And unfortunately if two consecutive targets are very close (within 100 pixels) then the box will overshoot the second.

    Sorry, I'm not that good at math. Maybe someone else can help you out.

  • I edited my post, sorry. I really need to read whole posts instead of just jumping to conclusions.

    I'll try your .cap now...

  • You need to "set speed to speed -/+ something." If you "set speed to (distance between stuff)" then it might not behave properly. Try "set speed to speed - (distance between stuff)"

  • Thanks, it seems like playing with the heirarchy did the trick.

    Can you think of any alternative way to detect when a platform object hits a solid? putting a detector on the bottom for each enemy seems redundant, and making an event that says "when <enemey> hits solid - set animation" doesn't work for some reason, until the sprite changes angle, then it's triggered. it's probably a bug.

    Nope, not a bug. It's an "undocumented feature."

    The reason plaform movement doesn't trigger "On collision" events is because they never actually collide as far as your event sheet is concerned. All the platform calculations take place in between cycles (after the end of your event sheet, and before the beginning). So all the pushing out of solids and such has already happened whenever your "On collision" event rolls around. Sucks, I know. As a general rule I always use "Is overlapping" rather than "On collision."

    So yes, even though it's redundant, you should make detectors for your enemies if you want them to have detailed interaction with the environment. A foot detector for contacting the floor, side detectors for walls, etc. You can make it easier on yourself by setting them up in Containers. Click here to read my description of Containers (and be sure to read Ashley's response too, it's important).

    Edit:

    Wait... what? It only happens after your sprite changes angles? I'm going to need more details on that, you've confused me now.

  • I'd join SA, but it costs money. It costs money to join a forum. Sheesh.

    At one time I would have said it was worth it. That was a few years ago. And back then it really was.

    Eh, I don't mind having given them ten bucks (at least back then I had a job

  • BUMP because we posted at exactly the same time and you might not see my post.

  • the second one wasn't quite what I was asking.

    Let's say I set the enemy to walk left when the player is to the left of him (detected by comparing X positions) and vice versa blah blah blah

    I don't know how you have your conditions set up but here's a quick 5-second cap that shows instance picking based on comparing x position:

    http://www.mediafire.com/?1dnymyyt92t

    There are two purple sprites to either side of one green sprite.

    The condition:

    + purpleSprite.X Greater than greenSprite.X
    [ul]
    	[li]rotate purple sprite[/li]
    [/ul][/code:bgk40431]
    
    Only causes the right-hand purple to rotate.  So it is possible to pick instances based on all sorts of specific conditions.  If you have more than one condition for picking enemies to move, I'd check the heirarchy.
    
    And you can always pm the .cap and I'll take a look (I know you don't like to make your stuff public ahead of time).
  • Yep. That's about the only other forum I post on any more. Sometimes SA, but it's gone downhill big time.

  • if it truly wasn't a joke then an official post or statement from adobe needs to be produced. unless theyre in on it too xD.

    besides. april first isn't exactly the best day to post such information of this magnitude on without it being interpreted as a joke.

    I don't think there's a rolleyes smiley big enough for this post.

    <img src="http://i26.tinypic.com/2v3pv01.gif">

  • it was posted midday today April 1st.

    and theres no news of it on adobes' site.

    im 99.9% sure its a joke.

    You're really that sure, huh? I dunno...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • this looks enough like MMF2/TGF/etc that it should be relatively straight forward.

    Read the tutorial.