Nimtrix's Forum Posts

  • : It should work as long as the "Every tick" event is at the bottom of the event sheet (after any events that use the variables). I hadn't considered that before you pointed it out though. <img src="smileys/smiley17.gif" border="0" align="middle">

    ToggleLeftRight.capx (r107)

    An alternative/work-around could be something like this:

    ToggleLeftRightAlt.capx (r107)

  • Hmm, yeah I see now you will probably run into the same problem with that. How about this:

    +Right arrow is down 
    +Left arrow is not down
    [ul]
    	[li]> Set Right to true[/li]
    [/ul]
    +Left arrow is down
    +Right arrow is not down
    [ul]
    	[li]> Set Left to true[/li]
    [/ul]
    +Every Tick
    [ul]
    	[li]> Set Left to false[/li]
    	[li]> Set Right to false
  • You do not have permission to view this post

  • Well, if both keys are down, the conditions of the first two event will be met, so both of them will run setting "Left" and "Right" to who knows what.

    You could try this instead, but I don't know if it's really necessary since the "Key is down" conditions are pretty much "Left"/"Right" booleans themselves, you should be able to do it without using extra booleans:

    +Right arrow is down 
    +Left arrow is not down
    [ul]
    	[li]> Set Right to true[/li]
    	[li]> Set Left to false[/li]
    [/ul]
    +Left arrow is down
    +Right arrow is not down
    [ul]
    	[li]> Set Left to true[/li]
    	[li]> Set Right to false
  • You can use the "Pick nearest" condition to save the closest object's UID in a variable, then check if the UID of the object you click is the same as the one stored in the variable.

    Example:

    PickClosest.capx (r107)

  • Well, maybe if you had zoomed in just a small part of the screen (like a minimap or something), you might want to ignore that scaling/zooming for some events. There are probably some other uses as well, it's nice to be able to do both anyways.

  • X

    Y

    Return the position of the mouse cursor in game co-ordinates. This is (0, 0) at the top left of the layout. It changes to reflect scrolling and scaling. However, if an individual layer has been scrolled, scaled or rotated, these expressions do not take that in to account - for that case, use the layer versions below.

    X("layer")

    Y("layer")

    Return the position of the mouse cursor in game co-ordinates, with scrolling, scaling and rotation taken in to account for the given layer. The layer can be identified either by a string of its name or its zero-based index (e.g. Mouse.X(0)).

    It's like this by design and should work if you specify the layer like it says in the manual.

  • I don't see any gaps like that. There have been some issues with gaps in tiled backgrounds that were fixed by updating the graphics driver, maybe if you try that?

  • Hmm, I don't see any gaps in Chrome or Firefox so I'm not sure what you mean. Could you get a screenshot of it?

  • If you need more help, you can attach the file by signing up for a free dropbox account, and uploading it to your folder, then sharing the link. (or some other file host, but most of us use dropbox)

  • You could use the 'lerp' expression like in podpathos' example, it's a nice way of doing it. If you want the angle math you mentioned though, this should cover it:

    MoveAtAngle.capx (r106)

    To get the angle you can simply use C2's 'angle' expression, I've also used 3 variables to make it easier to see what's going on, but you could do it without them.

  • Something like this?

    SpawnAroundGrid.capx (r105)

  • Hmm, can't really say what's wrong without looking at the .capx.

  • You do not have permission to view this post