silkc2's Forum Posts

  • Thanks guys

    I was trying to spawn in lots of different shaped windows, hexagonal, circular, Anthony you can think of, without design-time hard coding.

    I don't think there's anything at the moment that allows sprite within sprite "bounding box" constrained random points.

    Once I figure out how to make plugins I might look into making one for this.

  • Link to .capx file (required!):

    dl.dropbox.com/u/116137178/Bugs/Random/EveryRandomSecond.capx

    Steps to reproduce:

    1. Just see the capx

    Observed result:

    Random(2,8) not working as expected on "Every x seconds) event.

    Expected result:

    "Every x seconds" triggers at correct random interval

    I know we can get around this using variables, which I am doing for now.

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Operating system & service pack:

    Win7 64bit sp1

    Construct 2 version:

    119 (64-bit)

  • Hiya

    Any ideas how you'd make enemies randomly spawn within a circular (or any irregular) shape?

    I don't want to hard code spawning locations if possible.

  • Thanks for help so far. I've stripped the functions out and tried to follow a similar structure to yours. Was almost getting somewhere but now I am scratching my head over event number 4 in this one.

    It isn't getting the Source peg, even though it was created in top level event #1 and I'm looking for it in another top level event #2.

    Have debugged a bit more and Dest Peg gets picked fine.

    dl.dropbox.com/u/116137178/GamesDev/Bridge3/Bridge3.capx

  • I appreciate the comments so far but still don't understand.

    I've looked at the issue highlighted in that post ramones but as far as I see my code doesn't do that. It uses nested functions, all effectively fired "within" event 4.

    Mouse Click (event 2)

    Sub-event 4 create peg, pin to wall. Call Create Brige

         "Create Bridge"

            "Add Bridge" (loop)

    Do functions not work like this? In my head they'd have the above nesting. In the event sheet they show as top level events.

    I've also looked at your bridge example (thanks btw) and if need be I'll try rewrite mine to work the same (assuming I can with dynamic pegs), though I'm still stumped over why it isn't working through functions.

  • I want ropes to fade/destroy once they aren't pinned to a peg anywhere down the entire set of ropes.

    But for now I'd be happy if I could just see a rope bridge appear between two points, with each rope segment affected by gravity (for e.g. for a player to walk across and it would bulge).

  • I've bought a license and written a version using families to pin each rope section to the last. Still no joy though :(

    dl.dropbox.com/u/116137178/GamesDev/Bridge2/Bridge2.capx

  • Hi All

    I'm experimenting with making a game where you can place two pegs to create a physics-enabled rope between them.

    I have been going round in circles and wondered if anyone could take a look?

    dl.dropbox.com/u/116137178/GamesDev/Bridge/Bridge.capx

    As far as I can see the while loop is not executing.

    I'm trying to make it loop until I have spawned enough rope pieces between the two pegs, and stop once I'm over the destination peg.

    So the logic I've tried to use it "do whilst the most recently added rope segment is not overlapping the destination peg"

  • Bullet behaviour should cause them to destroy outside layout, and I'm not sure when behaviours are triggered.

    According to a dev it's always returning false, because there are no instances of a bullet for the engine to check the rule against in the first place.

    Anyway it just doesn't work this way, so I can use the else or I can use bullet count.

  • Thanks for the reply. :)

    I do understand you wouldn't want to make any engine changes for such a minor case. Have to make similar decisions myself all the time.

    If it will never return true / never do anything, would it be better to disallow us from setting it to inverted? Otherwise it gives the illusion that something is broken; it isn't doing what I tell it to do.

    Also just out of interest, could you not put in the very code you suggested as part of the negative check?

    NOT On-Screen

    Instance.count = 0?

    Return True

    else

    On-screen = False?

         Return True

    Endif

    Endif

    Return False

  • Yup that would work too, though it's debatable if it makes more sense to do it that way ;)

    I've reported a possible bug with the "negative on-screen" check and am using ramones "else" approach in meantime.

  • Link to .capx file (required!):

    dl.dropbox.com/u/116137178/Bugs/Construct2/BulletNotFiring.capx

    Steps to reproduce:

    Just look at the events for mouse fire. According to the logic a bullet should fire when:

    1, The mouse button is held

    2, There isn't one on the screen already (inverted on-screen logic)

    But nothing fires.

    ramones came up with an alternate method using an "else" which works and I'm using for now, see:

    scirra.com/forum/topic63526.html

    I suspect negative logic for "on-screen" isn't working as intended.

    Observed result:

    No bullets are fired.

    Expected result:

    Mouse fires bullets, only one can be on screen at a time, thus fire rate is quick for close targets, slow for far targets.

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Operating system & service pack:

    Win7 64bit SP1

    Construct 2 version:

    119 64bit

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • But that's my point, it isn't confusing at all. I inverted the statement to be a NOT condition, thus the question;

    "There are NOT any bullets on the screen" should return true.

    I'll submit as a bug just to see if it's me being silly or not. I hope not after 20 years of programming, lol. :)

  • Yeah your way works, thanks! I have to say I don't fully understand why mine doesn't work, I can't see a logic error. Do you think it should be recorded as a bug?

    * NOT Bullet on-screen   < is true!

    * Spacebar down   < is true!

    = Spawn Bullet < doesn't happen!

  • Ah ok so for now I am not being silly, this is the current way it's done? Just wanted clarification so thank you. :)