R0J0hound's Forum Posts

  • Centra

    The two issues you are running into are newly created object picking and dealing with picking multiple instances of the same type separately.

    Created objects become the only picked object for the the rest of the event. In the case of event 1 and 2 the 2nd spawned sprite will always have "isanswer" toggled. Also the created object object won't be able to be picked as normal until the next toplevel event (event that isn't a subevent) however a triggered event such as "on created" or a funtion call doesn't count as it's more like it's run right when it's called. Your on created event as it is has only one sprite picked (the new one) which can be somewhat solved by adding a "pick all sprite" system event, but you still won't be able to pick the other spawned sprite until the next toplevel event.

    And that leads nicely into issue #2, picking multiple instances of the same type separately. There are two ways to deal with this:

    * The first way is to pick one of the instances and save the values you want to compare into local variables and then pick the 2nd and do the comparison. It would look something like this:

    + Some event that picks two sprites
    ---local number inst0frame=0
    ---+pick sprite instance 0
    ------ set inst0frame to sprite.frame
    ---+pick sprite instance 1
    ---+compare inst0frame = sprite.frame
    ------ do something

    * The second way is to use single object type family. So you can pick two objects of the same type separately using two different names. You can think of the family name as an alias to the object name. Events would look something like this:

    + Some event that picks two sprites
    ---+pick family1 with uid of sprite.uid
    ---+pick family1 instance 0
    ---+pick sprite instance 1
    ---+compare family1.frame = sprite.frame
    ------ do something

    Ok, and in respect to what you're trying to do you can simplify it by putting the sprite into a family and call it say family1.

     +every 3 seconds
    ---create sprite
    ---set sprite frame to random
    ---create family1
    ---set family1 frame to random
    --- +while
    --- +compare sprite.frame = family1.frame
    -------set family1 frame to random

    cheers

  • Hi,

    Here's your original capx with commentary on the problem events and what they do.

    https://dl.dropboxusercontent.com/u/5426011/fixed/tobye_orig_comments.capx

    And here it my cleaned up version.

    https://dl.dropboxusercontent.com/u/5426011/fixed/Tobye.capx

    Finally here's a simple capx that shows a feature of picking that was causing you issues.

    https://dl.dropboxusercontent.com/u/5426011/examples18/picking_behavior.capx

  • I do think this happens to everyone. If you look at the "website issues" section of the forum there is on average one topic per page about the issue. The oldest is on page 30 of the 31 pages, which shows that it's been around for a while.

  • Well doubt what you may. I'm willing to be impressed if this project is successful.

  • The lowest you could set it would be about 0.016 (or 1/60) seconds. That and anything lower would be the same as a "every tick" condition.

    Back to the question as to if it's accurate: it runs if the time passed since the last time it ran is greater than or equal to the value you used.

    Here's what "every 1.0 seconds" does:

    global number old_time=0

    +old_time + 1.0 >= time:

    -- set old_time to time

    -- do actions

    3) It will likely be a bit lower than 1000. Of course you could test this if you wanted.

  • For the physics behavior set gravity to disabled and manually apply a force with events in whichever direction you want.

    For the platform behavior you can use the "set gravity direction" action.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Copy and paste is now automatic for me otherwise 9/10 times my post is lost. My main complaint is it has been this way since the forum was switched over at C2's launch. I'm hoping for a fix too but my guess it's caused by some inherent flaw with the forum software that is not trivial to fix.

  • Sure it does. For example to scroll right at 100 pixels per second:

    Set scrollx to scrollx+100*dt

  • bitworks

    You can make layers invisible from python. Here's the syntax:

    # to make it invisible

    System.SetLayerVisible("Layer 2", 0)

    # to make it visible

    System.SetLayerVisible("Layer 2", 1)

    Events that had a combo in the event sheet such as invisible|visible will be just a index number in python 0|1. All actions are implemented, just no system conditions as most of them have no context in python.

  • Use the imagemanipulator object with the "copy from sprite" action. Then you can save it with the save action.

  • The file format the array uses is unique to it. Basically it can only read files saved by the array object. For xml you could use python though.

  • Just to point out that you will end up rewriting the editor and runtime from scratch to reach your goals of a multi-platform gui and using opengl instead of directx. I don't mean to discourage but that's a lot of code on top of needing to make it still reproduce the same behavior so as to not break existing caps.

    Perhaps it would be better to make a simpler project that makes games in a similar way to Construct and can read cap files as one possible input?

  • Hi Kicks and kayin,

    I missed this topic.

    You'll need the full version of the profuis lib to be able to build the ide. Jayjay while I can build the ide I have one issue that I can't solve that makes the builds unusable, namely comboboxes don't work.

    As for the second question the runtime exes have the game data inserted as a resource when CC exports.

  • Off hand you could try the rotate method I used in this topic.

    scirra.com/forum/resize-handles-example_topic54023_post378368.html

    There may be other topics that have ways to rotate knobs that may help.

  • Joannesalfa

    For interacting with solid objects you just need to check to see if a solid object is at it's destination before it moves. Yann made an example of grid movement with walls that should give a good idea how it could be done.