KFII's Forum Posts

  • Hi Valentin,

    First you need to add the touch object and the audio object to one of your layouts, so that they can be used inside C2 (just like keyboard as well)

    Then use something like this:

    Condition: Double click on the touch object, and choose "on touched object ": choose picture1

    Action: double click the audio object, and choose "Play" then choose the name of the audio file (song1 for example,) and give to it a tag, it can be any word, so that you can use the tag later instead of anything else (like, you can change the audio once later if you need, but wouldn't need to change in every event)

    So what happens so far is that your first sound plays when you touch image1

    Do the same for image2 and song2

    Then, if you want a song to stop, you siply tell it to stop where you need it to be stopped:

    You could use this:

    Condition: On image1 touched:

    Action:

    stop song2

    play song1

    And in in another event:

    Condition: On image2 touched:

    Action:

    stop song1

    play song2

    You should be fine with this, I hope I didn't forget anything! explore the tutorials section as well for more details.

  • Hi,

    it would help if you post a screenshot of your events too, so that you can receive some suggestions to make them better, and so that you can get them more normally : )

  • Hi there alvarop,

    Thanks to you I "abandoned reality" lol (Daisy's Dog is dead haha,) I would like to suggest you join the C2 Skype chat group created I think by EncryptedCow (not sure about his username around,) just follow this link to join the group: skype:?chat&blob=zbNkIZO6mvPG2fFDHE-D_2NowmTlBYNfUea8p7VIZk7JOz0YUUo42oS1cLp_9Xdxl3W4XhHyRaq8CxhxGPFn45xzYVkPIu-b07Ry2pNUjCCixEZo5jp3XcNM_SuIU1mcE3fIj42MgLUVjCk81p9qW3YRPhhrPpGtG4EpmXV2v56Uuknj_Kp0yX5_SRNAoXs7WbYuNLyMjIkfH_qxRgNkL89DL37A-R0VKSnTS8duhskBV7d4

    Or just PM me to add you on Skype and to the group. It's a cool place to discuss anything related to C2 ^^

    Another cool place (no chat though) is this Facebook group: https://www.facebook.com/groups/construct2/

    Welcome any time <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • lucid

    Found another bug: the Spriter object shakes a bit (tested by two persons with the same results in capx from scratch) and it it way more visible if you use a complex enough object with bones etc (the scml/scon I used doesn't have bones):

    Capx: https://www.dropbox.com/s/1pi2a5p0xf42f3y/shakingSpriterb7ScrollTo_C2r168Stable.capx

    The situation is:

    Using a PlayerBox sprite object with platform behaviour, in a runner game with scroll to X instead of using bullet behaviours for solids (and unbounded scrolling set to yes on the left layout properties)

    Every tick:

    • simulate control PlayerBox platform pressing right
    • scroll to PlayerBox.X+200 pixels
    • set spriter position to PlayerBox object

    There's also a little bit of lag on the X axis this time in addition to the lag on the Y axis, it seems to be caused by the "scroll to X."

  • Try Construct 3

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

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

    You have two quick ways to publish your game to a website:

    Let's say you have a blog site with the following URL: mysite.com

    1- First method: direct access:

    First, you need to host your game (all the files you exported) somewhere, let's say you hosted it on a directory from your own site called mygame (you zip everything as a *.zip file, upload to your directory of your choice, then unzip there.) Then the address of your game would be mysite.com/mygame/index.html

    Now, you could access your game directly from that URL, so that was the first possibility.

    2- Second method: using iFrame:

    The second possibility is using it for example inside of a blog post, or anywhere you could add content to, for that you can paste this piece of code: it's called an iFrame: just replace the URL with your actual one:

    <iframe style="" src="http://www.mysite.com/mygame/index.html" height="480" width="640"></iframe>

    Try it, works like magic

  • Pin or not the logical order of objects updates determines the reaction of SetPosition.

    So let's break down what is happening.

    scml.setPosition( ply.x, ply.y )

    ply.setPosition(newx, newy)

    so what happens here?

    the first object updates the position to the current player position. Then the player is updated. This leaves the scml(or any other object) 1 tick update behind. Is this a bug? no it's an architecture design issue. The solution.

    ply.setPosition(newx, newy)

    scml.setPosition( ply.x, ply.y )

    ok ok, but of course there is a problem. I'm aware of it too. The player is likely to be using a behaviour like Platformer. Which means we can't actually control the order of position. And as a >>>hunch<<< it goes like this.

    EventSheet

    Behaviours

    And of course we can't actually control that order <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad"> So instead try

    wait0

    scml.setPosition( ply.x, ply.y )

    So is it a bug or is the result of design architecture. How can we create a fundamental change mixing plugins and ES code? The best we could get is the toggle ES/Behaviours order. But that won't fix the problems for PIN. How do we order which behaviours go last in the order structure? This is kinda the thing that just has to be. We get a massive awesome tool, but we need to accept the design architecture.

    If Ashley decides to put the actions of PIN after all other updates. Then that breaks up the speed flow. As the object updates, other objects update, then goes back to PIN objects. This would reduce performance as this increases object loop update size.

    Your noticing this on the SCML. I've seen it on a lot more. It really depends on some other form of object ordering. For now try the Wait 0 and see if that fixes up the problem. However it's still not an SCML issue.

    And just assist you a topic made two years ago.

    viewtopic.php?f=152&t=67260&p=572493&hilit=pin+delay#p572493

    About that lag issue on every tick, well in my project I build an way to Set Animation action ever tick below the main every tick that set the position of the player.

    https://www.dropbox.com/s/8nhrxd39el5zcnv/sample.png

    Here I have 2 vars: animationSet (With the name of the animation) and animationType (A number to chose from the animation possibilities)

    With this, there is no lag at all.

    But in case of this been actually a bug from the .scml/.scon file, I will implement the normal way of set animations anyway and let deactivate.

    I hope I could help, sorry for no .capx file, just took the picture from my project.

    So basic, If you set the animation every tick below the main every tick where you set the position of the .scml/.scon to the rectangle, will be no lag.

    jayderyu, Ronei Alves thank you both for all your explanations and suggestions <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> I'll test and see what happens.

  • conmanish thank you for your suggestion

    Honestly I never played with RSS feeds, I wouldn't mind learning and practicing, but it's just that i'm so busy with more art-oriented types of work. Besides, it would be easier and way more practical to all users if this gets modified at the source, i.e by the webmaster, or whoever is managing this emailing system, unless there's a need to keep this thing on purpose so that people don't feel they can spam easier with it (with misleading email titles etc,) but that wouldn't be a real problem compared to the benefits

    Thanks again for your suggestion!

  • jayderyu

    My bug report was not mentioning pinning, but rather setting position to another object every tick, or setting position to a particular X, Y every tick. I just mentioned that I tested pinning as well as an alternative test.

    Do you mean that the pinning behavior does exactly a "set position to x,y" every tick as well?

    Edit: jayderyu but i'm interested to know why you think this would not be a bug report: I mean, if you pin an animation to another sprite object, then there will be no delay at all from what we can observe, it's just that the scml object has currently some important delays on the Y axis, compared to any other type of object that doesn't have such a delay problem.

  • Hi Bass_X

    I have sent you a private message : )

  • tgeorgemihai

    You can change the size of the scml object on the screen easily, make sure you study Brashmonkey's videos: setting scml scale ratio :25 in this video:

    Subscribe to Construct videos now

    Now I remember that lucid addressed a first part of the delay problem by eliminating the delay that existed on the X axis, he did so while working on Spriter B6 or B6.1 I think. But the delay on the Y axis remained, yet one good thing is it is more limited than before.

    Now regarding image points, I wonder if it will be possible to use the "points" inside Spriter animation editor, as an alternative to bones (and also hit boxes.)

    I am also interested to learn more about image point control for the scml files.

  • Laurent yw, glad it helped : )

  • Laurent

    Why not use a simple iFrame?

    Upload your exported html5 game somewhere first, then

    You can put this code on your WordPress blog post, and edit just the URL

    of the game:

    <iframe src="http://www.siteaddress.com/foldername/index.html" height="400" width="800"></iframe>

    Or did you intend to use something more complicated? Sorry if I'm not getting the purpose right.

  • Hello Laurent,

    I am not proficient with WordPress (or web dev in general,) but I was wondering: what are you trying to make exactly? I mean, what would this plugin do actually?

    (By the way, the link doesn't load, I had to take a look at the cached version on Google)

  • Hello!

    I am subscribed to "new tutorials" email notifications, and I find it would be awesome to know the subject of the tutorial without having to check each and every email.

    Right now, each email contains two informations only: name of the author, and the fact that it's a tutorial, that's it. And all the title real estate is wasted by the same default text that is not helpful to the reader, particularly if you have a lot of emails to check.

    Here's how it looks like:

    So if possible, please replace all the default text by hints to the actual subject of the new tutorials. Thanks in advance!

    Karim

  • Also lucid

    Bug report (i'm using C2 stable r163, Spriter B7, latest plugin 14-04-2014, Win 7 64 bits)

    Not sure if this problem was addressed yet or not: there's still the delay in scml object position when it's set to a C2 box sprite every tick (platformer, when the player jumps: if you keep the player box visible then you'll see what I mean, also pinning does the same delay)

    Hope it can be fixed, thanks in advance!

    : )