KFII's Recent Forum Activity

  • Jase00 there's a small bunch of C2 users on Skype: it's a chat group for C2, if you'd like to join, then simply open your Skype, and post this link inside the chat box (while you chat to anyone) and click on it within Skype:

    skype:?chat&blob=z02ONGJS6b27VloEk_UEuWo1bInKYCxX2dT4qEVwu9Zdf10cfPR2jC3z0NYueMqRv-H5a1T7H1CXprkmDTrE5_YgSkmo9YenVoJQpiLEZO7quGR5Btq4Ejdg0wh_kdvA8KpBCOA51OkJQ8_Rw0YkrDLRaRVmSBS_UUqRPBeGcPNMUMPZPnwzVolK-Fna4fyq15PoR9w3iAokzp8QpE5eaPjjz09KwDb3fm17jyRulajSsrpp5HAOxnal

    If you can't join just send me a PM with your Skype username so we could sorti it out, oh and everyone is invited :p

  • Oh sorry for confusion, glad it worked then

  • You could create an instance variable in the image sprite, by right clicking on it in the objects tab on the right, click on instance variables, then once the small popup opens: click on the "+" sign and type a name like: PlaySong1, give to it an initial value of 1

    What you'd want to do is: if PlaySong1 = 1, then play song1

    But if playsong1 = 0: do not play song1

    You can create an interaction that would add 1 to the value of PlaySong1 whenever you touch image1

    And then if PlaySong equals 2 then we reset it to 0

    What you can do:

    Create an event (by going to system, under General: compare two values) and it would say:

    First value:

    PlaySong1

    is greater or equal

    value: 2

    Then action: double click on image1 object, set value (under Instance variables section), and give to it the value of 0

    This will insure that whenever you touch image1, a value of 1 is added to its instance variable called PlaySong1

    Now you have to create the events for playing/not playing the song1:

    Condition: Touch object: on touched object, (choose image1)

    then create two sub events: one for PlaySong1 = 0 and another for PlaySong1 = 1 (you don't need PlaySong1 = 2 since it is automatically reset to 0 if it reaches 2, as you would have made it earlier)

    so while the condition of touched object is selected: add a sub event : either by right clicking and choosing subevent, or hit the B keyboard key

    first sub event condition: double click the image1 object: compare instance variables (under instance variables section)

    put a value of = 1

    Then, action for the first sub event: double click the Audio object, and choose Play (and choose the song1 as you planned)

    select again the main condition of the event, on touched object, and hit B again to create another sub event

    this time you can copy the first sub event and paste it here, then edit the value from 1 to 0, or you can follow the same step for sub event 1 and just use a value of 0

    then action for this value: double click the audio object, and choose "Stop" then choose the name of the file, in your case: song1

    That's the basic I think, I hope I didn't forget anything obvious? Also remember to go to tutorials section and search for audio tutorials to learn with better examples.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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."

  • 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 : )

KFII's avatar

KFII

Member since 10 Jan, 2013

None one is following KFII yet!

Connect with KFII

Trophy Case

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

Progress

12/44
How to earn trophies