mindfaQ's Recent Forum Activity

  • Check the origin of your alien sprite ;)

  • find(text.text,"yourword")

  • That's like wondering why something costs less in shop A than shop B, when shop A has a sales action - you can see that all the time.

  • Hmm the fix only opens Construct 2 for me and starts the open file dialog.

    So I've created my own bugfix.

    What you need:

    autohotkey.com (free macro program)

    After you've installed authotkey:

    • rightclick in explorer -> new -> autohotkey script
    • name it how you want, remember the file location (for me it is D:\Games\Steam\construct2.ahk)
    • rightclick on the script, edit the script

    paste the following below the default first lines:

    <font color=blue><font face="Arial, Helvetica, sans-serif">IfWinNotExist, Construct 2

    {

    run, steam://rungameid/227980

    WinWait Construct 2,, 120

    }

    WinActivate Construct 2

    WinWaitActive Construct 2

    sleep 1000

    send ^o

    sleep 400

    send %1%

    send {Enter}</font></font>

    • save it
    • open a text editor of your choice (like notepad)

    pase the following

    <font color=blue><font face="Arial, Helvetica, sans-serif">"D:\Games\Steam\construct2.ahk" %1</font></font>

    Note that D:\Games\Steam\construct2.ahk needs to be the location of your autohotkey script I told you to remember earlier.

    -Save it as something like construct2.bat

    • next time you want to open a .capx or .caproj, select "open with" and use the construct2.bat you've created.

    What it does:

    If Construct 2 is not open yet, it runs steam://rungameid/227980 (it is the command for steam to launch construct 2, you can find that out when you create a shortcut of the program on the desktop via steam). It waits at most 120 seconds for the Construct 2 to start.

    After that it sets the Construct 2 window as active (in foreground), opens the "open file" dialog, pastes the file location into the field and confirms it. If it is not working as expected for you, try to adjust the sleep lenghts.

    Hope it helps if someone wanted to do something like that for himself.

    If you want icons for your .capx-files in the explorer, look up Bat To Exe Converter and convert/compile the .bat into an .exe-file and set the icon file to one of those in the Construct 2 directory.

  • Okay thanks. I use Steam a lot, but still would have liked to use the the program outside of it.

  • Is the steam licence usable with the versions that can be downloaded over this site here? (copy over the license file to an existing normal installation and use it with that)

  • You don't really need the CSV plugin to use the CSV2Array plugin, BUT the mentioned examples use the CSV plugin, so that's why they would not load.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you are storing your texts in an array, it could look like this:

    dialogmode = 0

    function "displaydialog": set dialogmode = 1, system set timescale = 0

    • system create object dialog box
    • system create object text
    • text set text to array.at(x,0)
    • set (instance variable) text.nexttext to array.at(x,1)

    mouse clicked AND dialogmode = 1

    IF text.nexttext not equal to -1:

    • set text to array.at(text.nexttext,0)
    • set text.nexttext to array.at(text.nexttext,1)

    IF text.nexttext = -1:

    • destroy dialog box
    • destroy text
    • set dialogmode = 0
    • system set timescale = 1

    When you call the function you pause the game (timescale), we set a variable to identify in which state the game is in (dialogmode = 1), which you could add as condition to other events that might interfere with the dialog.

    then the dialog box and text are created. I assume we only have 1 instance of those in the layout - if not, you'd need to pick the correct instance each time you wanna work with it.

    It sets the text to the proper tex to display and in the array we also have stored which text to display next. The next text to display is stored in the text's instance variable nexttext and when we press on it the text gets changed accordingly. If nexttext is -1, it means the dialog is over and the game continues, so the dialog box and text are destroyed and game's state is set to the way it was before.

  • 1D array

    recording = 0

    event that starts recording: set size array to 0,1,1

    set recording = 1

    every tick AND recording = 1: push array at back x-axis, value = touch.AccelerationX (or whichever value you are interested in)

    to stop recording set recording to 0 again.

    to plot it, by using the canvas plugin:

    ~event that starts the plotting~: canvas begin path

    canvas path move to start point

    • for 0 to array.width-1: canvas line to x=loopindex y=300-array.at(loopindex)
    • canvas draw line

    If you want a continuos plot, you probably need to draw the (complete) line each tick instead and if there are more than maybe 200 elements in the array, you delete the first array OR for a more simple approach spawn a small pixel every tick with the bullet behaviour at the right and let it move to the right and destroy when it is off the graph.

  • same problem as mostaafa here (also tried setting the animation to "Idle" or "Posture"). Tried to save it again in spriter with the new file options, but no success.

    edit: okay, saving as scon and scml with the same name made it play the idle animation once, after that it stops. Using the stable release of Construct 2.

  • "PS: To get the second layout and event sheet I pressed new project. Does this have anything to do with it. Also its for HTML."

    This is where you went wrong. New project creates something separate from the current project, so you end up with Game A and Game B.

    Create the new layout inside of the project and you'll be fine.

  • The features implemented/working are:

    ? a fully functional menu (mouse controls)

    ? adjustable A.I. difficulty

    ? adjustable game duration

    ? adjustable detail level for graphical effects

    ? toggleable sound effects and music

    ? a simplistic menu background music

    ? your typical pong gameplay based on the physics behaviour

    ? keyboard controls (arrow keys)

    ? gameplay speeds up the longer you play

    ? if the ball is moving too slow horizontally, it gets a boost

    ? a short delay after the ball resets, before it starts moving

    ? messages for both win and lose states, a shortcut back to menu

    ? a nice 8-bit soundtrack and fitting sound effects

    Pong's typical gameplay is not based on physics, but simple rules. Reflection at the outer walls: angle of incidence = angle of reflectance (that works with the physics as long as we ignore friction, yes). But the most important thing that spices up Pong's gameplay: if the ball hits the upper half of the paddle it will go upwards, if it hits the lower half, it will go downwards; further on edge means it "higher" angle (EncryptedCow tried to emulate it with sculpting the paddles accordingly, although the result is still different).

    At game start, near 90?angle is not used, but probably only like up to 60?. Together with the paddle reflection stuff this will prevent the ball from ever going very slowly horizontally.

    Also another AI variant would be moving the paddle into the middle if the ball is moving away from it. This way it covers the biggest range when the ball comes back (especially relevant if the ball moves fast in relation to the paddle AI speed).

mindfaQ's avatar

mindfaQ

Member since 12 Oct, 2013

None one is following mindfaQ yet!

Trophy Case

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

Progress

13/44
How to earn trophies