neutrinox's Recent Forum Activity

  • Hi!

    I'm trying to create a map-system from which the player enters new levels.

    My approach so far has been like this:

    -Create a global variable for storing the number of levels passed

    -Create doors on the map as instances of one door object

    -Give the doors a boolean instance variable called "unlocked" and set it to False by default.

    -Try to loop trough the doors and toggle the boolean if IID of a door is smaller than the global "levelsPassed" variable.

    The last part is giving me trouble (and I'm not even sure if my whole approach to this map is a good one).

    Here's what I tried for the loop:

    Condition 1: For each door order by door.IID ascending

    Condition 2: levelsPassed > door.IID

    Action: Set unlocked to True

    I'm still a newbie and that might be a very bad approach

    So in a nutshell, what would be a good way to loop trough my doors and toggle their instance variables based on the number of passed levels?

    EDIT:

    Turns out I was making a simple mistake and was setting the boolean to false instead of true. So this actually works!!

    I guess my only question would be that do you think this IID-dependency will give me trouble later on? Is there a smarter way to assign unique identifiers to the instances?

  • Thanks, this was helpful!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi!

    It's an animated door sprite. When the game starts all doors should be closed. However the animation plays when the game starts and the doors open. Couldn't find an animation property that would say something like "play initially". I know I can create an event that runs on start of layout and stops the animation. I was just wondering if there was a way to keep the sprite animation stopped in the beginning that doesn't require an event.

  • Hi!

    I need my animations to not play in the beginning. Is the only way to make an event that stops the animation on start of layout? Or is there a setting somewhere, that I can tick so that the animations only start when commanded to?

  • Hi! Thanks for the replies! I tried switching to box2d asm but the problem persisted. Might be a logic error too, I'm making those all the time.

    The animation in which the spring contracts is not playing, unless you set the speed of the "backwardsTension"-animation to 60.

    Could this have something to do with dt?

    EDIT:

    I think it's a logic error, will troubleshoot some more on my own

  • Yes, this is one of those situations in which it would be nice to be able to write custom code.

  • Hi!

    I'm suddenly faced with a situation in which my sprite animations don't seem to play at all, unless I set the animation speed to exactly 60.

    My best guess is that this might be somehow related to using physics, since this is my first game using the Box2D web physics in Construct.

    Has anyone else faced a situation in which animations refuse to play unless set to a certain speed?

  • Ok, thanks for the quick reply!

  • I'm trying to create the following logic:

    If Touch is touching mySprite

    OR

    If Mouse Cursor is over mySprite

    AND

    If Mouse Left button is down

    --> doStuff

    My attempts so far lead to the "AND" part being replaced with "OR". In other words I get two "OR"s when I only want one "OR" and one "AND".

    Basically I'm asking if it's possible to have two different conditions launching an event so that the second condition checks two things?

  • Thank you very much, it works!

    Would it be correct to summarize that the key to using instance variables in this case was to deploy sub-events?

  • Hi!

    I'm trying to wrap my head around instance variables.

    I have ten instances of an object. Each of the instances have a unique instance variable. I would like to compare the value of the instance object overlapped by the player to a global variable.

    How do I capture "this", or in other words how can I set it up so that the instance variable being compared is the one being overlapped?

    Here's what I tried:

    player Is overlapping myInstance

    and myInstance.myInstanceVariable > globalVariable -->do stuff

    But nothing happened so I think I'm failing to compare the correct instance here. In javascript I would call it "this".

    In a nutshell:

    How can I compare the instance variable value of the instance currently overlapped by the player?

  • Hi!

    I just created a sprite strip and imported it to Construct 2, then made all the animations and their animation frames correct. Now I realize I need to fix some things in Photoshop. Is there a way to update the animation strip in Construct, without losing all the work? I tried to use the "reload files from disk" setting but that somehow changed my animation in a weird way..

    I guess my actual question is: how do I properly use the "reload files from disk" -function when I have created animations from an animation strip? What Windows folder should I save my updated file to?

neutrinox's avatar

neutrinox

Member since 17 Jan, 2014

None one is following neutrinox yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies