R0J0hound's Recent Forum Activity

  • a)

    + System: Timer is Equal to 1000
    -> System: Create object Sprite on layer 1 at (400, 300)
    -> System: Create object Sprite2 on layer 1 at (Sprite.X, Sprite.Y)
    [/code:3napcu8k]
    Or if you will always be creating those two objects together, put both into a container so when one is created they will both be created.
    [code:3napcu8k]+ System: Timer is Equal to 1000
    -> System: Create object Sprite on layer 1 at (400, 300)
    -> Sprite2: Set position to object Sprite (image point 0)
    [/code:3napcu8k]
    
    b)
    [code:3napcu8k]+ Sprite: overlaps Sprite2 : offset (40,0)
    -> Sprite2: Flash for 2 seconds with 0.1 seconds interval
    [/code:3napcu8k]
    
    c)
    [code:3napcu8k]+ Sprite: Value 'color' Equal to Sprite2.Value('color')
    -> Sprite: Flash for 2 seconds with 0.1 seconds interval
    -> Sprite2: Flash for 2 seconds with 0.1 seconds interval
    [/code:3napcu8k]
    
    Hope that helps
  • That example was made with version 99.84.

    Here are the events I used

    + MouseKeyboard: Mouse is over Box
    -> Sprite: Set position to Minimap.MapToLayoutX(MouseX-Minimap.X), Minimap.MapToLayoutY(MouseY-Minimap.Y)
    
    + System: Start of layout
    -> Box: Make Invisible
    -> Box: Attach to object Minimap with 0 padding[/code:cmyymoiz]
  • The problem is that clicking on minimap doesn't work. The solution is to use a hidden object that can be clicked on, (box works well for that).

    Here's a quick example:

    http://www.filedropper.com/minimapclick

    PS: I forgot my box.net password, now where did I write it down.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the cookies. As for requests, the short answer is no. But as I get more familiar with construct's code I will be able to do more, time permitting.

  • Python

    - [FIX] Script editor action names now better match the runtime (R0J0hound)

    - [FIX] Crash accessing private variables from Python (R0J0hound)

    - [CHANGE] 'global' system expression changed to 'globalvar' since 'global' is a reserved keyword in Python; allows access to global variables by name and index (R0J0hound)

    Runtime

    - [FIX] Crash drawing Sprites on non-SSE2 processors (R0J0hound)

    - [FIX] Incorrect sprite rotation when setting a corner filter (R0J0hound)

    hmm... After a few tests none of these seem to be in there. They're in the SVN, revision 151 but the changes don't seem to be in this build.

  • Well it's finally all committed to the SVN.

    Had to rework some of the fixes, but now they're working good now.

    All that's left to do now is wait... or fix more stuff.

    cheers

  • Python access to global or private variables is currently broken, but here's a few related fixes that hopefully can be put into the next release: http://www.scirra.com/forum/viewtopic.php?f=7&t=5921.

    In the mean time you can use a hybrid method like this:http://www.box.net/shared/981crp7jvh

  • I have several more fixes here:

    #1

    Problem: Rotation is accelerated when using corner filters on sprites.

    Example: http://www.box.net/shared/565m9reptj

    Fix: "Runtime\RenderLayer.cpp" (line 213) "angle" was not converted to radians.

    	//quad q((r - hotspot).rotate_to_quad(angle, r.topleft()));
    	quad q((r - hotspot).rotate_to_quad(cr::to_radians(angle), r.topleft()));[/code:9dbubh4w]
    
    [h2]#2[/h2]
    [b]Problem:[/b] When using python many of the actions in "System" are different in the IDE editor than at runtime.  The "action" names as listed in the IDE are defined in "IDE\Structure\SystemObject.cpp" and the "action" names used at runtime are defined in "Runtime\System.cpp"(lines 209-265).
    
    [b]Fix:[/b] I tweaked the files so that the names match.
    Here's the modified  "IDE\Structure\SystemObject.cpp" file: [url=http://www.box.net/shared/uce9q0xxj6]SystemObject.cpp[/url]
    and here is the section of code to replace "Runtime\System.cpp"(lines 209-265): [url=http://www.box.net/shared/mggln3dmon]fixSystem.cpp[/url]
    
    [h2]#3[/h2]
    [b]Problem:[/b] I didn't modify any of the expression names in "IDE\Structure\SystemObject.cpp"(line 694-788) as it looks like they are the names used it construct itself outside of python.  In "Runtime\System.cpp" (lines 436-512) the runtime uses the same expression names as the IDE but in all lowercase.  Which is fine except for "global" on line 444.  "global" is a reserved name in python.
    
    [b]Fix:[/b] change "IDE\Structure\SystemObject.cpp"(line 444) to:
    [code:9dbubh4w]	{"globalvar", &SystemObject::eGlobalValue},[/code:9dbubh4w]
    
    [h2]#4[/h2]
    [b]Problem:[/b] Accessing private variables in python don't work and cause crashes.  Global variable are accessible but only by an integer.  It seems that for private variables the parameter type is checked and only works if the type is "EXPTYPE_VARIABLENAME" otherwise it uses "-1" as an index, which explains the crashes because python will never return a "EXPTYPE_VARIABLENAME" and "-1" is out of bounds.
    
    [b]Fix:[/b] I made it so variables can be accessed via vaiablename, integer or string.
    Outline of changes: [url=http://www.box.net/shared/ruecof4lqp]variableFixes[/url]
    I added 2 functions to simplify: 
    [i]GetVariableIndexFromName[/i]: which is just an overloaded function of the same name but takes takes CRunObjType instead of CRunObject as a parameter. 
    [i]getGlobalVarIndex[/i]: to group the type checking for global variables in one place.
    
    PS:
    I hope this is easy enough to follow, but if it isn't let me know.  Also is there a better or preferred method to submit fixes to construct's source code.
  • Just to let you know I tested it on my pentium III computer and it worked.

  • To the developers:

    There has been a bug in construct for awhile that if a "sprite" is added and the cap is run the runtime will crash instantly. It is only reproducible on a few machines such as one of mine and android-music's. The bug first came up after a renderer was updated and as of yet hasn't been fixed. Though this is understandable as most machines are not affected by this bug which leaves for no way to debug it.

    The runtime will not crash however if at the start of the layout the sprite is set to invisible, or a distort map is used on the sprite , or a color filter is applied to a corner of the sprite. Also the plasma plugin, canvas plugin and any effect causes construct to crash at runtime. But most of the other plugins such as 3d box, panel and the particles work fine.

    I was looking at the construct source and found what I think is the reason for the crash:

    In the file "/Common/Renderers/CDX9Renderer_Batch.cpp" under the first "CDX9Renderer::Quad" function on line # 586 it calls this:

        D3DCOLOR c = cr::sse2_D3DCOLOR_from_color(filter);[/code:1neifibi]
    My cpu a "pentium III" does not have "sse2" so no wonder it crashes.
    
    EDIT:
    My purposed fix:
    [code:1neifibi]D3DCOLOR c;
    		if(cr::support_sse2)
    			c = cr::sse2_D3DCOLOR_from_color(filter);
    		else
    			c = filter.getD3DCOLOR();[/code:1neifibi]
    Makes Computers that don't have sse2 work.  
    
    Edit 2X: was able to compile fix... will test tomarrow
  • NEW VERSION OF PATH MOVEMENT 1.3

    Download on cover page.

    Major Additions:

    +Smooth curve option

    +on endpoint triggered conditions.

  • It's working fine for me. Could you post a cap that shows the problem.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound