tulamide's Forum Posts

  • You can't duplicate it without being able to access the alpha channels of the textures. If it is possible with javascript (or whatever is the language) to hook into the rendering process, then paint everything black where no object is placed on a certain layer, but paint the background where those objects are. That's basically it.

  • 1) Yes, but it's about microseconds with such small range of values, so you don't need to take it into account.

    2) I never stopped pointing towards my example game "Verve!". It covers so much and of course it also shows how to sort an array. It uses a more complex but time-stable algorithm. http://www.scirra.com/forum/example-verve-a-mini-game-of-skill_topic41461.html

    You could do a simple bubble sort as well. It will get slower the higher the count of values to sort, but that's negligible with the count you have in mind.

  • I'm not quite sure what causes the problem. I admit, the two pictures are not enough for me to find the cause. But the loops itself are very confusing. Maybe there's one of the issues. If I understand it right, you're looping through every 'NonPlayers', which is an action per tick. But as a subevent you're running 'every x milliseconds', which is an action over time (-> several ticks). I doubt this works. You would only get the first (time + 0 milliseconds) loop of it. All other loops are subevents of that 'every x milliseconds' event.

    If you get rid of the 'every x milliseconds'-event, deactivate the super-loop of s and move the 'DebugText'-action up into the 'for each Players'-event, does it show all 'ClassID' then? (You may need to alter to "Set Text to .Text & Players('ClassID') & ", " )

  • Thank you, zyblade :)

    I hope it still is of good help for all our new developers here.

  • No, I don't mean families. You can directly test against the attribute solid.

    Select the bullet sprite and use its "on collision with another object" condition. On the parameters page click on "pick an object". The list that opens is catagorized. Further down the list you will find the category "Attributes", where you can select "Solid". Of course, this option only appears if at least one of all the objects has the attribute "Solid" (which you can activate under Properties/Groups/Attributes of the sprite's properties panel).

  • Use the group attribute "Solid" in the condition:

    + bullet: On collision between bullet and "Solid"

    -> bullet: Destroy

    This definitely only destroys the instances that are colliding.

  • While Unreal Engine 4 recently attracted with some fine videos that are hopefully realtime renderings (e.g.

    Subscribe to Construct videos now

    ), I am much more fascinated from the fact that engine 3 now runs from within flash. They somehow managed to encapsulate the engine, it works, and it is soooooo cool what you get to see in realtime within flash within a browser:

    epic citadel

    (use wasd for moving/strafing, e to jump, left mouse button down to drag view)

  • also, to make things more interesting, how can i make a random value between two values?

    for example if i want to give a sprite a random size between the sizes 50pixels and 90pixels?Just add the offset to random() and use the range+1 in random. For example:

    50 + random(41) => creates a random number in range [50, 90]

    23 + random(101) => creates a random number in range [23, 123]

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, you can. Use the "File" object. The condition "for each file" is pretty much all you need.

    Create a text variable (e.g. 'soundpath') and set it to the path of your sound folder.

    Then call "for each file" with that path, create a button and store the path to the current file somewhere (I would use a sprite with a pv 'filepath' as a button). When it comes to play a file linked to a button, pass the stored path to either "autoplay file" or "play music from file" of XAudio2, depending on the sound format.

  • Any picking done by the alias is forgotten when the alias returns (I initially thought that "inline" would change the SOL of the event that called the alias, but it's not the case).Ah, now I see. No wonder I had no success. It's completely the other way round.

    The wiki is awfully wrong at describing the workings. Here's from the wiki (most interesting part in italic):

    "In Inline mode (comparable to Remember), all currently picked objects are passed to the On Alias event, which can then pick other objects, and pass them back to the calling event again. In other words, with Inline aliases, object picking affects both events."

    I was relying on that and never thought in another direction^^

    Thank you, rojohound

    Shindoh

    Here is another method using two conditions.

    + Sprite: Value 'test' Equal to 0

    + System: CountMatching(Sprite.OID) Equal to Sprite.CountNow that's a compact, efficient way to do it!

  • tulamide could you explain, how that "isolated" stuff works oO.

    I see 'that' it works, but even after reading the wiki, I didn't get it 'why' it works ><.It doesn't work. I couldn't ever get it to work.

    If you try the examples from the wiki, you will see that they don't work. Simply forget about picking in aliases...

    ...at least until rojohound comes along and belies me <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Can't think of a really easy way at the moment, but here's a comfortable one:

    test_all_instances_match.cap

  • When you apply an effect to a layer, that effect will always work in screen space, not object space. That's why you have the impression of it being linked to a "camera".

    You could try to compensate the camera speed by adding/subtracting it to/from warp's speed by an appropriate factor, but that's right from my head without having actually tested it.

  • joxer

    I recommend reading the Construct wiki. It helps a lot understanding the concepts of "tick based" and "time based". The key to time based actions is "TimeDelta". http://sourceforge.net/apps/mediawiki/construct/index.php?title=TimeDelta

    Jayjay

    Just in case you're curious, there's another way to move something over time by combining "lerp" with "TimeDelta".

    lerp(a, b, t) interpolates between a and b at t, with t ranging from 0 to 1. t=0 results in a, t=1 results in b.

    If you add TimeDelta to a zero-initialised variable on every tick, it will be 1 after one second. To let it reach 1 after two seconds, you would add '0.5 * TimeDelta' instead.

    This would move the sprite horizontally from 200 to 100 in two seconds (pseudo code):

    + myVariable less than 1

    -> Add 0.5 * TimeDelta to myVariable

    -> Set Sprite.X to lerp(200, 100, myVariable)

    EDIT: And if this is too confusing, it might even give you more accuracy if you'd let myVariable count to the needed seconds. But then you need to divide myVariable by the correct number in "lerp". This example would move horizontally from 64 to 211 in 3 seconds:

    + myVariable less than 3

    -> Add TimeDelta to myVariable

    -> Set Sprite.X to lerp(64, 211, myVariable / 3)

  • You're welcome <img src="smileys/smiley1.gif" border="0" align="middle" />