Solomon's Recent Forum Activity

  • Hi, I am a graphic designer and an animator.

    I have been using Construct 2 for the past week or a bit less maybe. Very cool to say the least.

    Hopefully will have something to show in the near future! See you around

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think you need to post either a screen with your code or share the capx file, otherwise people don't see where the problem lies.

  • Set Global Variable: Invincible = 0

    After collision with enemy, set Invincible = 1

    Wait 3 seconds (or how many second you wish for your player to be invincible)

    Set Invincible = 0

    If invincible = 1 then do not make dmg to player (you need to get this into the part of the code where player takes dmg)

    --or--

    If you have the part where: player collides with enemy event, add another event: Invincible =0

    So it would be: if player collides with enemy and invincible =0 -----> player takes damage

    Or you could use true/false instead of 1/0.

  • Hi, I have been working in Construct 2 for the past week and its really great. I am intending to buy a personal license in the upcoming month to test out, what Ive done on mobile phones.

    I was wondering, if Construct 2 is capable of supporting 20 animated sprites (with a looping animation) at the same time on the screen, when exporting to a Samsung tablet or an Ipad, and still maintain a good FPS rate?

    I will get to test this out surely anyway and will report back, just trying to get some opinions and test out the waters.

    Now I know that it depends on the phone etc. but I was just curious overall. In the end I will cut down on the amount of sprites if I have to surely.

    I have been already reading about exporting options and I am psyched to soon see something I have done, run on my mobile platform

    Thanks and cheers.

  • Solomon - another way is to use a global variable:

    On Start of Layout B --> set NextSpawnTime = Time + 5

    then, instead of every 5 seconds:

    System Compare two values ( Time >= NextSpawnTime ) --> spawn box, and set NextSpawnTime = Time + 5

    The only thing to watch out for is if you pause the game (or open a settings menu, or display a message) - you would have to save the remaining wait time:

    TimeToSpawn = NextSpawnTime - Time

    then when you unpause, set NextSpawnTime = Time + TimeToSpawn

    OH WOW! Thanks a lot for your time! Now I have to wrap my head around it

    How much simpler would it be to have the ability just to toggle the "Every 5 seconds" condition to either start counting at beginning of game, or start counting at beginning of each layout?

    Construct 2 is great don't get me wrong, but it is seemingly simple things like this that just put me off for a bit once in a blue moon.

    Anyhow once I get this working by your example I'm sure this logic structure will come in handy in some other part of my game.

    Once again thanks for your time

  • shinkan

    I see... interesting.

    Basically, I want a box to spawn every 5 seconds after a layout is loaded.

    I have a title screen on 1 layout, during which I don't want anything to happen. I have it set that by clicking on it the player goes to another layout, which upon entering, after every 5 seconds a box is spawned.

    Edit: Only thing I cant set up is the part where the spawn timer starts only once the player enters the second layout.

    So basically:

    _____If Layout B is loaded

    ________Every 5 seconds spawn box

  • "Every X seconds" don't work as "per layout". It counts using the game time from the start.

    Oh wow... Really? Thats a bummer... any other simple condition to wait until a layout is loaded? Could you please share any other tips on how I can solve this matter?

    Thanks!

  • Solomon

    do the layouts share the same event sheet?

    there is an event "On Start of Layout"

    I had a similar issue that I thought might be some kind of bug, but turned out it was an error in my code. So, I would think there is something you are doing that is causing this - and it is impossible to say what it is without seeing your code.

    Hmm interesting... didn't know that layouts can share 1 event sheet. I am going to do some reading on this now.

    Sorry what I mean I cant find an "If Start of Layout" event or how to implement it as such.

    Thanks for the tips will do some more reading and if I dont manage to solve my problem will post a snippit of my code.

  • Create a global variable like Can_Sine. Use 0 for false and 1 for true.

    Create 2 conditions:

    Can_Sine = 1 > Box > Sine Active

    Can_Sine = 0 > Box > Sine InActive

    Box > On Collision with Object A > disable sine etc...

    Box > On Collision with Floor > Set Can_Sine = 0

    Thanks! Simple and elegant!

    I ended up making sure that the objects arent colliding with object B, only the floor instead, but this will come in handy. Still getting used to the mechanics.

  • Hi,

    I have a Main Title Screen Layout, and once clicked player goes to Layout 02.

    At the beginning of Layout 02 I have a condition: "Every 5 seconds" - spawn a box.

    Problem is, when I wait in the Main Title Screen Layout 5 seconds or more, and then click to go to Layout 02, the box is spawned already.

    So it seems that the timer - the "Every 5 seconds" condition is counting when the player is still in the Main Title Screen Layout

    How can this be? Am I doing it wrong? Is there another way to to make the "Every 5 seconds" condition work only after entering a layout?

    Thanks for the help.

    Edit: I tried to look for a condition: "On entering layout", but in the end couldn't find it.

  • "Thanks for your example, a lot to learn there" - mainly how not to do it ?

    Haha, nah

    Lot of nice mechanics going on there, always good to see something new to learn! So once again thanks!

  • Hi, I am having problems with sine behavior and object colliding. The object is not bouncing off an object upon collision but sliding down it because of the sine behavior.

    I thought of an alternative but I'm having problems implementing it in code:

    On collision with object A

    ......If not colliding with floor B

    ............disable sine

    ............wait 1 second

    ............enable sine

    ......Else

    ............disable sine

    ............do not enable sine after 1 second

    Basically if the box with sine behavior collides with object A, in order to override the sine behavior I am turning it off for 1 second and then turning it back on.

    But I'm having a problem, because when the object falls on the ground I want the sine behavior to stop, which works until the box hits object A then hits the floor straight after. This causes the sine to stop upon hitting object A, but then when it hits the floor it is already stopped, but after 1 second it turns on again.

    I'm not sure how to cancel the action of turning it on after 1 second after it hits the floor.

    Thanks for you help.

    Cheers.

Solomon's avatar

Solomon

Member since 22 Aug, 2015

None one is following Solomon yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies