dop2000's Forum Posts

  • Here is an example of Zelda-style dialog which uses XML file to store dialog lines:

    (there is a working link to capx in comments)

  • Yeah, try not to mix Physics with other behaviors like Platform, Bullet, 8-Direction etc. You also should only move Physics objects using Physics actions (apply force, impulse, velocity etc.), don't just change their position or angle directly.

    All these things are not strictly forbidden, but if you mix physics and non-physics, the object may behave in unexpected way, interact with other objects incorrectly etc.

    That being said, there is an example of physics platformer game on youtube. Nobody knows how it's done, maybe it's a clever mix of both behaviors, or the author made his own platform engine with physics. We discussed it here:

    EDIT: All of the above applies to Chipmunk too.

  • "Else" should be at the same level as the condition (Button var=0) and there should be no other events between them.

    You can select the condition and press X, this will create an Else event for it.

  • I told you how in my previous comment - either with a global variable or with Timer on a global object.

    Create a sprite, set "Global=yes", put it off-screen on level 1, add Timer behavior, start timer for 6000 seconds.

    You'll have much better chances to get help if you post your code here, preferably capx.

  • How did you do the timer for each level? Why can't you use the same method for 10 levels?

    You can create a global variable StartTime, set it to time on start of level 1, and add this event:

    Compare global variable StartTime<(time-6000) -> (game over)

    The problem with using global variable is that you'll have to adjust its value when player pauses the game.

    Or you can start a timer for 6000 seconds on some global object. Timer is a better option.

  • Simply remove the condition "On every tick" from event #2, but keep the event itself.

    So in your event #2 you should have an empty box on the left and "System Set..." action on the right.

  • Yes, you can see the list of objects on the right bar.

  • First, you need to understand the difference between objects and instances of an object. This a mistake that many people make - creating lots of identical objects instead of instances of one object.

    In tic tac toe all cells should be just one sprite object - tttSprite.

    Add 3 frames - one empty, second with "X" image and third with "O", set animation speed to 0.

    Add an instance variable to this sprite, name it "cellState", type text.

    Place 9 instances of this sprite on the layout to form a grid.

    Now when players click tttSprite, you can set its cellState to either "X" or "O" and then update either just this instance or the whole grid using this code:

    tttSprite -> Compare instance variable cellState=""  -> Set animation frame to 0
    
    tttSprite -> Compare instance variable cellState="X"  -> Set animation frame to 1
    
    tttSprite -> Compare instance variable cellState="O"  -> Set animation frame to 2
    [/code:3bwie8gx]
    
    First event will [i]pick [/i]all instances with empty cellState and set frame to 0 for them.
    Second event will pick all instances with cellState="X" and so on.
    
    Picking is also an extremely important concept in Construct 2/3. I suggest you read these tutorials:
    [url=https://www.scirra.com/manual/71/instances]https://www.scirra.com/manual/71/instances[/url]
    [url=https://www.scirra.com/manual/75/how-events-work]https://www.scirra.com/manual/75/how-events-work[/url]
  • In that tutorial events #3 and #4 are executed on every tick, which is not very good. Also, there are several ways to toggle boolean variable in just one event, then event #2 will not be needed, for example: toggle=(toggle=0)

    Anyway, here is the right way to do this:

  • Could you share your code?

    Are you using "On key pressed" events or "Is key down"?

    "On" events are triggered once.

    "Is" events are triggered many times a second, which could cause that problem of yours.

  • Try Construct 3

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

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

    First of all, why are you multiplying the angle of movement by 2? Angle and speed are completely different things. Angle could be 0 and speed could be 1000, you can't derive one from another.

    Second, applying force correctly may be difficult and it will set the ship off-course.

    I suggest you use angular velocity - it only rotates the ship without changing its direction of movement.

    You can still animate ship reactors (thrusters) if you want.

    See this demo:

    https://www.dropbox.com/s/j2v54a17gshr4 ... .capx?dl=0

  • 1. Watch more tutorials online.

    Personally, I don't understand everyone's obsession with youtube tutorials. Yes, they are often helpful and people who record them are heroes. But it's such a waste of time - watching a 10-20 minute video while reading the same tutorial would only take a couple of minutes. Even if I skip to the end, I often have to return to random parts of the video trying to find the pieces of information I need. Ugh...

  • Actually, I was not technically correct in my previous comment.

    Yes, "&" is used to concatenate strings, but this is also a logical "AND" which can be used in math formulas

    For example:

    newHealth = health- (armor<1 & shield<1)

  • Try this:

    "HIGH: " & (HighLevelStart-DropLossHigh-SplitterLoss)

    & is a concatenation symbol, used to attach two strings together. You should not use it in math formulas.

  • Then, like I said, you'll need to perform a ton of overlapping checks to determine object shape.

    If this can be done easier with Trace plugin, you should definitely use it.