R0J0hound's Recent Forum Activity

  • I've tried the physics approach before using a physics rope as a base. I didn't quite get it to have the feel of a cape. I probably didn't tweak it enough though. If you lower the density of the pieces of rope and reduce the gravity it can look close to what you want.

    The only thing that's lacking is for it to catch wind. If the cape were in a complete vacuum it would probably act just like the rope. To do air resistance it might be enough to apply a force 100*sin(anglediff(link angle, angle of motion)) perpendicular to each piece of rope. I haven't tested that but it should simulate more resistance when the rope moves perpendicular to it's angle, and allow free motion when moving the same direction as it's angle.

    This is all a rough idea but hopefully give you some starting points of how to tackle it.

  • Use the canvas object, it has a property "grab layout" that if set to "before drawing" takes whatever was drawn under it. You can then apply effects to that area.

  • Keepee beat me to it but here is another way to do it

    http://dl.dropbox.com/u/5426011/examples15/answers_from_a_set.capx

  • You won't see the bundled python files since they are embedded into the exe. I did a further test and this is a list of all the python libs you need to check when you export:

    __future__.pyc

    _abcoll.pyc

    abc.pyc

    copy_reg.pyc

    genericpath.pyc

    linecache.pyc

    ntpath.pyc

    os.pyc

    random.pyc

    stat.pyc

    StringIO.pyc

    types.pyc

    UserDict.pyc

    warnings.pyc

    I found this by running this script at the start of the layout:

    sys.path=sys.path[-2:-1]
    import random

    Then exporting to an exe, running the exe, and if it can't find a lib re-export with that lib included and repeat.

    Once you get it working you can remove the line with sys.path.

    Here is another way of finding out what files need to be included:

    http://www.scirra.com/forum/python-external-libraries-w-ai-speech_topic39525.html

  • From the manual:

    https://www.scirra.com/manual/78/expressions

    he expression Self can be used as a short-cut to refer to the current object. For example, in an action for the Player object, Self.X refers to Player.X.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This works if there is only one object type in a family:

    For each 3DSprite

    for each Sprite

    do comparison...

    In this case 3DSprite and Sprite allow for two separate picked instance of sprite.

  • You could perhaps use this formula:

    speed * time = distance

    but solve for time:

    time = distance/speed

    distance is 100 since you create the tiledBgs with an x of -100

    so you get this:

    100/40 = 2.5

    100/50 = 2

    100/60 = 1.666

    The last number you had is closer to 50/60 = 0.8333 which also works since the tiledBg texture is 50 pixels wide, you just end up with more overlap.

    You can get the same effect without the warmup time by just positioning the tiledBg's in you layout and setting their speed. Then replace all your events with one every tick event:

    Every tick

    set x to self.x%50-50

    Change the 50s to whatever the texture width is.

  • When you export to exe check the enable python checkbox and select all the python files you want included in your exe. Alternatively you can copy the python files you use to the same folder as your exe.

  • Animmaniac

    It's not possible at the moment. The plugin uses the non webgl renderer even with webgl enabled. I need to re-write a good chunk of the plugin to use webgl to make it work, but I currently don't have an eta for that.

    bjadams

    I did a change to the plugin after I made the example. Try the capx again I fixed the events.

  • It's a bug that it goes to the second layout when loading. That's why it's a good idea to do your own save/load system. You can use my example for any layout, just include the events in each layouts event sheet and change the "on button clicked" events to "on loop" events so you can call the save/load event from anywhere with the "Start loop" action.

    When you go back to layout 1 reload with events so the changes from event 2 are discarded. The save files the save/load actions use have no extension.

  • Add the mouse object then use these actions under the appropriate conditions:

    Set angle toward Mouse.X, Mouse.Y

    and

    Move Forward 100*dt pixels.

  • You could use the choose(1,3) function.