R0J0hound's Recent Forum Activity

  • It's pretty straightforward with the "is clockwise" system condition. I through the anglediff in there to make a threshold so that the Sprite isn't always thought to be turning.

    + Sprite: Pick by anglediff(.angle, 'oa') Greater than 1
        + System: Angle Sprite.Angle is Clockwise from Sprite ('oa')
        // turning right
        + System: Angle Sprite.Angle is Anticlockwise from Sprite ('oa')
        // turning left
    + System: Always (every tick)
    -> Sprite: Set 'oa' to.Angle
    [/code:2zibx2e6]
  • [quote:39wryl1a]Is global varible 'timer' equal to 140 - Create object.

    Which works however it creates as many of those objects as it can for 1 second, and I'm unable to fix it. Does anyone know a fix?

    Add a "trigger once" condition to that event.

    [quote:39wryl1a]Alternativly can someone explain how I can give each enemy a % chance to create an object upon death(There health varible = 0)

    Add a subevent to the event that destroys the object and add the condition system -> compare.

    + System: Random(2) Equal to 0[/code:39wryl1a]
    That would be a 50% chance of being true.
    [code:39wryl1a]+ System: Random(10) Less than to 9[/code:39wryl1a]
    And this would have a 90% Chance.
  • It's actually less height. You need to change the order of actions so that the variable vy is changed after the object is moved instead of before. Then the jump will be the same as the calculated.

  • Are global variables broken in python? They work for me. The crash related to text global variables was fixed a few builds ago. I made a typo with the syntax of accessing global variables in my other post. I forgot the "System.".

    System.globalvar('ip')[/code:1gtlnmm4]
    The name of the variable is case sensitive.  Is the name "ip" or "IP" in your cap?
    Also globalvar doesn't show in the right bar, it's just not listed.
  • Global variables can be accessed like this:

    globalvar('ip')[/code:1ptszih6]
    
    System.Close does work but you have to put parenthesis at the end since it is a action:
    [code:1ptszih6]System.Close()[/code:1ptszih6]
    
    And that bug is because scripting is enabled, 700 objects created and no scripts being run.
    There are two ways to avoid that bug:
    1 If you aren't using python at all but uncheck "enable scripting"
    2 Just run a script every frame.  It doesn't even have to do anything, a comment will work.
  • Hi,

    A posted cap along with a description of the problem always gets a solution faster than just a description.

    I recreated what you described in your second post and it work fine.

    + MouseKeyboard: On key Shift pressed
        + Sprite: Value 'crouching' Equal to 0
        -> Sprite: Set 'crouching' to 1
        + System: Else
        -> Sprite: Set 'crouching' to 0
    + Sprite: Value 'crouching' Equal to 0
    -> Sprite: Set height to 50
    + Sprite: Value 'crouching' Equal to 1
    -> Sprite: Set height to 25[/code:1ziy5fze]
    
    In your cap is the initial value of the crouching variable set to one of the two 0,1 or is it another value.  It may just be something that's amiss with the order of your events, although I can't say for sure.  If you post the cap a solution should be found fairly quickly.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To be able to restore the window change the script to:

    from ctypes import *
    hwnd=Window.AppWindow
    region=windll.gdi32.CreateEllipticRgn(0,0,640,480)
    oldRegion=windll.user32.SetWindowRgn(hwnd,region,0)[/code:297le7j1]
    then later when you want to restore the window shape run this:
    [code:297le7j1]windll.user32.SetWindowRgn(hwnd,oldRegion,0)[/code:297le7j1]
  • Python doesn't work too well in 0.99.62, you'll need a newer version since python support has gotten better in newer versions. You can install multiple versions of Construct at the same time, just install to different folders.

  • I did some tests to shed some light on the cause.

    The max y position reached when jumping can be calculated with the following formula:

    StartingY - (jumpStrength^2)/(2 * gravity)[/code:1lcbmjqd]
    It seems that the platform behavior goes about 20 pixels higher than what is calculated when running 60fps.
    I switched to unlimited framerate and it was only higher by 2 pixels on my computer.
    
    The platform behavior seems to have a more accurate jump height with higher framerates, and a less accurate one with lower framerates.
    
    Here's my test of the platform movements jump height with two other methods of computing motion.
    [url]http://dl.dropbox.com/u/5426011/examples3/JumpTest.cap[/url] made in 0.99.96
    
    A workaround could be to set gravity to zero and manually change the vertical velocity every tick with a more accurate method like Verlet.
    
    Hope some of this is helpful.
  • chrisbrobs,

    Method 1 is all that is needed to get it to run: Just extract the zip file and run the cap.

    The fact that construct crashes when you try to open the cap usually means that you are trying to open a cap file made in a newer version of construct than you have installed.

    The example was made with Construct 0.99.96, so you need at least that version to run the example.

    If the crashes occur after opening the cap file when you click "run layout" then it is perhaps another problem. In which case what are the error messages, as they will help me figure out what the problem is.

  • What are the crash messages? Also what version of Construct are you using? The example was made with 0.99.96. If you can't open the cap then either you're opening it in a older version of Construct or the cap is corrupted.

  • Uncheck the Application property "Enable Scripting", unless you are using python scripts.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound