vee41's Recent Forum Activity

  • Or just use pin behavior.

  • Sounds good, but

    1.You can be hit by your own bullets

    2.There are some obstacles that also spawn bullets/hurt you

    Add a variable to the bullets that defines who shot the bullet, you can use that to compare whether you should increment the 'accuracy' variable :)

  • You could add variable 'Player1HitCount' and action 'add 1 to Player1HitCount' to your 'on collision' event.

  • Here is what I came up with:

    Forest generation

    Mostly just tidied up what you did (it had few bugs that caused some unintended behavior), it's a really cool system you got :)

    I removed some of the looping, added some variables for control, made trees be destroyed outside the layout + some minor tuning. Also made them not overlap, which causes most of the slowness here, you can tinker that if you wish :)

    EDIT: Just noticed your second question, that's how carefully I read peoples posts... :P

    Anyway, added an event to handle the Z order as well. Basically after all trees have been generated we go through them in order of their Y position and send them to bottom of the layer.

    EDIT2: Few notes on performance; you could try creating 1000 trees in editor and set their position in events instead of spawning new ones during execution, might be quicker. And if you do not want the player to see threes going swooshswooshswoosh during generation you could add a loading screen that you hide after the map has been generated.

  • dsarchy and shinkan:

    1) What you said makes sense, I'll try that. Thank you both.

    2) I am still confused after reading your replies to number 2 several times. Unfortunately, your examples you've supplied are both from version 117 and the free 114 version I have will not load them.

    Are you saying that the function object has a name, but it needs to be referred to by yet another name? This doesn't make sense to me.

    2) The name of function object is that, name of the object. You need only 1 function object in your project and you can use it to run all your functions. In event sheet you pick the function object and call function with `on function` name, not with name of the function object. Name of the function object is quite irrelevant for anything :-)

  • Sure, containers are in official release now so you probably won't need.. :)

  • You got different variable in second event, is this intentional?

  • This should not be possible without setting up information of the sprites immediately after the spawn (which is apparently not possible in Construct2 if the spawning sprite is the same as the sprite being spawned).

    It is possible, you could do it by varying this example a little bit:

    Snake demo

    Most of the example is not by me, only the few fixes. Check the final events for spawning and setting the sprite positions in events above. The point here is: divide your problem to few small, simple functions. :)

    Solving your problem here could be done by applying approach taken there.

  • rexrainbow

    Thank you for the great plugin!

    It seems that 'On created' triggers are not being triggered when creating objects through this plugin(r117). I am using the 'insert into family' version of creating things. Is there something I'm doing wrong or perhaps a bug in the plugin?

    Thank you again, this plugin has been huge help for me :)

  • Your problem is in the way you pick the objects, 'pick Nth instance' selects from pool of currently picked objects and as you are running it inside for loop, there is only one selected by default.

    Here is one way to do it, simplified your solution a bit:

    Snake demo

  • Your project contains rex_rainbows container plugin, could not open it. Anyway, seems like your problem might be somewhere else than in imagepoint angle calculation, as this test I created seems to work as expected:

    Imagepoint angles

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > Unless I misunderstood the question you just need to run a loop.

    >

    > +For "" from 1 to 5

    > -Create object at <x> + loopindex("") * <distance apart>

    >

    > then maybe set IDs to loop index and go from there.

    This would work handsomely (as per the link to the topic in my second post) if the X,Y of the instances was the only thing that I wanted to change (as position can be passed as a parameter to spawn and create).

    But if you want to change any of instance variables or things like mirrored/flipped, once again you run into the problem of not being able to pick the newly created instance.

    When you create a new object it is automatically picked, so you can refer to it straight away in the loop.

vee41's avatar

vee41

Member since 12 Apr, 2012

None one is following vee41 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies