Jayjay's Recent Forum Activity

  • If you mean for rendering, then the project Properties bar does support Pixel rounding (change from Off to On). However, for calculations I believe you'll have to use rounding via ceil(your value), floor(your value), or round(your value).

  • Glad to hear <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> This page seems to be helpful for parsing the JSON in PHP: http://stackoverflow.com/questions/7986 ... est-in-php

  • toby3d Again, the best method is probably downloading Fre:ac and putting it in the same folder with the CC program, then calling it from the File object with the parameters in the command. This *should* work.

    Try playing around with Fre:ac as it has a command-line option for conversion, you can try to do it from Python too but if you can get it running from Construct then there's no need for including the dependency on Python (unless you're already using Python?)

  • Do you mean an example of running an external file from within your game/program made in Construct Classic? Otherwise, I don't believe anyone has made an example of using fre:ac to convert MP3 to Ogg in the forums, but it might have a readme.txt file on how to convert files from a command-line parameter.

    This is definitely not an easy task, and would almost be harder to code than to make a simple PDF guide for your users to convert MP3 to OGG themselves. Is it absolutely necessary to convert MP3 to Ogg inside your game/program?

  • With an AJAX post the data is a parameter in the action, not part of the URL. As for dealing with it once the data gets to PHP you can look at: http://www.ajax-tutor.com/post-data-server.html

    The manual has some info on sending POST from Construct 2 as well: https://www.scirra.com/manual/107/ajax

  • You do not have permission to view this post

  • Change Max HP to a variable if it's not already (PV means private variable?), if player is still alive and gets a health bonus, add that bonus to Max HP. When player dies if you want their Max HP to reset to 100 then just have it set to another variable like DefaultMaxHP.

    Hope that helps!

  • My last post disappeared after my login timed out so here goes a quick reply:

    For level transition, do you mean show the last level as moving to the next? A solution might be to take a canvas screenshot of the whole level (keep player over top of the canvas and don't paste them into it) with a global object, then change to next layout and have the player walk in over top of this canvas object, as it scrolls into the layout (unbounded scrolling)

    What do you mean music system? Making an audio object global will allow it to play continuously in every layout if you mean to keep the same music playing between layouts.

    As for entering the rooms/respawn, are the levels pre-designed and hardcoded, or randomly generated?

    If pre-designed, you can just add a new invisible sprite at each doorway with a private variable (eg: EntryID). Then when player dies or at start of layout re-position player to the sprite where EntryID = global variable PlayerSpawnLocation (set this at the end of last level).

    Hope that helps!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your best bet might be to run an external EXE from within Construct and pass parameters. I've read this might do what you need: http://www.freac.org/

    (as an alternative to the Linux dir2ogg)

    However, there is some special licensing stuff when it comes to MP3s and tools, so you might want to see if it's worth including a converter at all:

    http://mp3licensing.com/royalty/software.html

    http://mp3licensing.com/royalty/games.html

    Edit: Should be able to start another program with the File object action "Execute File"

  • They are part of the Sprite object expressions (same as how every Sprite automatically has Sprite.X and Sprite.Y) No global variables needed there

    If you go with option 2, TargetX and TargetY are examples of variables though

  • Sounds like a co-op game where you go to next level when teammates are all in the right spot? I'd do this in one event like:

    (option 1: An invisible sprite over the entire area that objects must overlap, code assumes there can be any number of players)

    Conditions:

    +PlayerSprite is overlapping ExitSprite

    +System Compare PlayerSprite.PickedCount = PlayerSprite.Count (all players here)

    Actions:

    -> Go to next layout

    (option 2: A distance check from a location)

    Conditions:

    +System Pick (By Comparison) PlayerSprite where expression distance(PlayerSprite.X PlayerSprite.Y, TargetX, TargetY) <= 32

    +System Compare PlayerSprite.PickedCount = PlayerSprite.Count (all players are within 32px of that point)

    Actions:

    -> Go to next layout

    Hope that helps!

  • Assuming that Sprite1 is always there (and is the only one of Sprite1 in the layout) and randomly sets its frame. Sprite2 is spawned and scrolls left, I'd do the following.

    Every tick -> Sprite set animation frame to random(Sprite.AnimationFrameCount)

    (spawning event) -> Create object Sprite 2 on Layer N at X and Y

    -> Set animation frame to Sprite.AnimationFrame

Jayjay's avatar

Jayjay

Member since 18 Mar, 2008

Twitter
Jayjay has 2 followers

Connect with Jayjay

Trophy Case

  • 16-Year Club
  • Email Verified

Progress

17/44
How to earn trophies