tulamide's Forum Posts

  • > Btw I think "S" has a built in function to rotate its arrays as well.

    I thought something did, but I couldn't remember what. I think it was S.

    Again, I'm sorry, but this is not quite right. The function indeed is called rotate array, but it shifts a 1-dimensional array to the right or to the left (aka the equivalent to moving, not angular rotation), so

    ABCD

    rotated by 1 gets

    DABC

    or rotated by -1 gets

    BCDA

    Also, when using any free rotional functions, wether from 's' or just sin/cos, you can't make sure you will always keep all values on the grid (because of the rounding, that needs to be applied), leading to overwriting or doubling values.

  • EDIT: Also when reporting a post, on validation of my reason message I get this error:

    Error
    The email failed to send. Please contact the Forum Administrator with the error message below.
    
    Server Error Message:-
    
    The server rejected one or more recipient addresses. The server response was: 550 No such user here
    
    

    And I don't think the post is being reported.

    I confirm this. Just wanted to report a spam post. Got the same message.

  • I'm sorry, but this is not correct. Apart from the 1-based index issue, that code would mirror vertically on the horizontal axis. But Tokinsom wants to rotate in 90 degree steps.

    Here is an example. Click on the sprites to color them then use the buttons to rotate clockwise or counterclockwise. Of course, you would need to integrate offsets if you want to rotate only a part of the array.

    Feel free to ask, if it troubles you.

    http://www.mediafire.com/file/mz0cv4sm5x7bt5j/rotatingarray.cap

    EDIT: Ups, there was an redundant event, causing the array to be calculated two times. New link.

  • Ah, yes, that is disturbing as long as you are not used to it.

  • if your layer is set to transparent, it makes no sense to set the background color. Toggling transparent enables/disables setting the background color.

  • It's not the LOS behavior but an error you made in the cap. You will get a more detailed answer and the corrected cap soon

  • Getting angles between objects is part of the system object.

    You should familiarize yourself with the most important ACEs using the wiki: Construct Wiki

    The expression is called "Angle between points", or Angle(x1, y1, x2, y2)

  • Ah, now I see what you are aiming for. There is a simpler way to achieve this.

    In the LOS behavior, set Obstacles to "Custom"

    In the event sheet, whereever needed, use the behaviors actions "Clear obstacles" and "Add obstacle" to build your own list of objects to be treated as obstacles.

    Download: http://www.mediafire.com/file/f1rq4dgb9g64p7g/LOScustom.cap

  • I would prefer people would create a simpler example cap, where only the issue is focused. It's hard to go through a complete project, install dozens of plugs, etc., just to care about one issue...

  • I downloaded your cap, but there's too much going on. Noone but you knows the concept, so I can't say what exactly you are trying to achieve. Could you please do a simple example cap with an explanation where exactly it does not work as intended?

    About ScrollX and ScrollY: They return the center point of the current view. If you don't scroll your layout, then those values never change.

    Example1:

    Window size 640x480, layout size 640x480

    ScrollX, ScrollY will always return 320, 240

    Example2:

    Window size 640x480, layout size 800x600

    ScrollX, ScrollY will return 320, 240

    If you now scroll your layout, using System: Scroll to X 420 then

    ScrollX, ScrollY will return 420, 240

  • Example:

    animation.cap

    Hope it helps <img src="smileys/smiley1.gif" border="0" align="middle">

  • Most objects have a condition "Is on layer"

    If an object is picked you can use an inverted "Is on layer" to exclude the ones from the layer you want to be ignored.

    EDIT: Didn't read correctly. No need for inverting. Just test for the same layer with the normal "Is on layer"

  • Python always checks for escape sequences, which start with a backslash (e.g. \n for newline). To be able to use the backslash as a char just double it (e.g. "myfolder" + "\\", becomes "myfolder\").

  • Check your keyboard and maybe clean it. Seriously. It might be the shift key getting stuck.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The tutorial is posted. Hope it helps.

    http://www.scirra.com/tutorials/47/xaudio2-peak-and-rms