ramones's Forum Posts

  • Try creating a .htaccess file on your server and adding this line:

    AddType audio/mp4 m4a

    Or if .htaccess already exists just add that line to the bottom of it.

    <img src="https://dl.dropbox.com/u/8367729/construct/pics/htaccess.png" border="0" />

  • You can't just load a json_encoded array into a C2 array. It has to be in a specific format for C2.

    {"c2array":true,"size":[5,1,1],"data":[[[0]],[[0]],[[0]],[[0]],[[0]]]}

  • Ashley It's a simplified version of the OP's capx. When he spawns a rat he has the action 'rat: spawn ratArray' that throws the javascript error. My capx shows the same thing.

  • You have to set the correct mime type for m4a on your server.

  • You're subtracting 1 from Seconds every tick. One tick is one frame not one second so your Seconds variable will = 0 after 10 frames (a fraction of a second). And you don't seem to be setting a text object to display the Seconds variable.

    I wrote a tutorial on timers a while ago - it might be helpful:

    https://www.scirra.com/tutorials/450/timers

  • That's right for adding the score but the 'every tick -> set text' should be it's own event and not part of the 'on start of layout' event.

    For the speed change the impulse value. In the example the impulse is set to

    distance(Self.X, Self.Y, CatapultBlock.X, CatapultBlock.Y) / 4.5

    Just change that 4.5 value.

  • You need a condition to pick one particular Character01. Like you might use the pick nearest condition to heal the one nearest the player:

    +Character01: Pick nearest to Player.X, Player.Y
       -> Heal Character01
    

    Or to heal the one the mouse is over:

    +Mouse: Cursor is over object Character01
       -> Heal Character01
    
  • Yeah that looks right.. is it not working?

  • The Else follows the 'Is animation playing'. They're both sub-events of 'on clicked'.

    Reversing the order will have the same problem when trying to unselect. The second event would set it back to selected.

  • Nah that won't work because your second event will undo the first one. If it's the "unselected" animation playing and you click - the first event will set it to "selected" and then second event will set it back to "unselected". Try it like this instead:

    On left button clicked on WPawn

    ---Is animation "Unselected" playing

    ------Action: WPawn- Set animation to "Selected" (play from beginning)

    ---Else

    ------Action: WPawn- Set animation to "Unselected" (play from beginning)

  • "There are NOT any bullets on the screen" should return true.

    See it's not really "There are NOT any bullets on the screen", it's more like "There are (one or more) bullets that are not on the screen".

    You're not asking "are there no bullets on the screen?", you're asking "are there any bullets not on the screen?".

    It's like the condition "Player: NOT Platform is moving" will be false if there is no player object. It's not "are there no players moving?", it's "is any player object not moving?".

  • Oh yeah, if there are no bullets the first condition will be false.

    I guess it's kind of confusing but "Bullet: NOT on-screen" will only be true if there are bullets that aren't on the screen.

  • The problem with that is that it will keep spawning bullets if there's any bullet off-screen.

    You could have:

    Bullet: Is on-screen
    
    Else
    Keyboard: Space is down
       -> Create bullet
    

    or give your bullet 'destroy outside layout' behavior and only fire when

    Bullet.Count = 0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's on the download page when you click download license.

    <img src="https://dl.dropbox.com/u/8367729/construct/pics/downloadLicense.jpg" border="0" />

  • The index menu is generated automatically based on your headings.

    The code thing is probably a bug with the new design

        x = 5;

        y = 6;

    shows as

        x = 5;    y = 6;

    Code in old tutorials displays correctly though.

    *edit* Actually I see you have headings in your tutorial and BluePhaze has the same problem here.