nutmix's Recent Forum Activity

  • Thank god you were here, I would have spent hours searching for a string function for this.

    Ive put in a ".":

    str(int(balance))&"."&zeropad(int(balance*100)%100, 2)

    Thanks again!

  • The text looks the same, its the position which is about 7 pixels too low in FF. The same project with the same layout looks fine in all browsers in R99. I have not seen this effect till 103.

    Ill create a capx.

  • If we have the players balance, which is a number set to 100 or 10.5 or similar, we want to show it as a text object to 2 decimal places. I can't find any way to do this, if you say

    Global number balance = 100

    ...

       txtBalance set text to balance

    it formats it to the min number of decimal places possible, e.g. "100.0" is displayed as "100" and 10.50 is displayed as "10.5" not "10.50"

    Any ideas?

  • Even with the origin set to 0,0, objects are not the same in the designer as they are in the browser. I have not seen this problem with R99 or earlier, I believe its a bug in R103. The result is I can get it to look ok in FF, or ok in IE, but not both which is a bit of a show stopper.

    See the following two screen shots:

    1: This is the layout in C2. I move the objects (e.g. "WON: ?100" too low to make them look ok in FF)

    <img src="http://www.ohds.co.uk/c2/wonPosC2.PNG" border="0" />

    2) Now you can see in FF, its moved the text up a bit:

    <img src="http://www.ohds.co.uk/c2/wonPosFF.PNG" border="0" />

    3) But now I check IE, and its the same as C2, So is too low:

    <img src="http://www.ohds.co.uk/c2/wonPosIE.PNG" border="0" />

  • I want to anchor a button to the bottom center of the screen.

    To set its position, I'm using:

    System Every tick

       set X to windowWidth/2

       Set Y to WindowHeight-100-(spin_btn.Height/2)

    The button has its origin set to the center.

    The result is that the X & Y values vary widly with the screen size. E.g the longer the window, the more it disappears off below the window. The shorter the window, the more the object launches into outer space. Same with the X value. Its only actually correct when the window size happens to be the same a the window size set in the project.

    Here is a 1 sprite capx file:

    https://www.dropbox.com/s/gx2e1gnfn1t1uyy/middleAnchorProblem.capx

    This is making life very hard...

  • Nice trick! Seems to work well. This will save some posts, thanks!

  • Hi, I cant find any man pages for variable scope, does anyone know if there is one?

    1) What are the scope of local vars? E.g. if I create local vars at the top of a group, are they local to a group, the event sheet, or just the next event?

    2) Are global vars global to all event sheets?

    3) To try and simulate objects for better encapsulation and reuse, I want to create vars local to one event sheet. Is this possible, as you only seem to be able to create globals at this level?

    4) I see objects have a "global" setting. This seems odd, as objects seem to be global even if set to "no". E.g. if I copy an object from one layout to another, then modify the copied one, when I create an instance of the object on the first layout, it actually uses the settings from the second layout.

  • I can never find what I'm looking for, and there is no search function for the manual. E.g. I was looking for lerp under expressions page, and didnt know to look under system expressions so had to waste everyone time asking in the forms how to find it. Doing a browser search in the manual page doesnt find anything. Using the "search scirra.com" box only returns forum posts it seems.

    Presumably it cant be hard to make the manual searchable, or downloadable so we can search it ourselves? I would even buy a printed manual if it was updated a bit so I could use an index.

  • Nimtrix, doh! I was looking under expressions:

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

    Which is where the in C2 expression help takes you.

    Its a real shame that you cant search the manual for things like this - I can never find what I'm looking for.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Interesting, I didnt now C2 had lerp. Its not in the manual or in the help on expressions so I didnt know it was there - how did the first person find it?

    Mipey - nice example, thanks.

    All this manual maths to move an object from A to B cumon C2, give us a built in MoveTo behavior with easing - you know you want to!

  • I have the same issue - this is my nr.1 desired function.

    I don't think you can do this without someones tween plugin which I am avoiding if I can as they wont be commercially supported.

    I am approximating this with the bullet behavior to send the sprite in the right direction, then stopping it when it goes over a certain coordinate. However, if you make the animation fast, it doesnt seem to stop exactly at the right spot - it seems to overshoot sometimes (which is to be expected). I then pull it back to exactly the right spot.

    I dont know if you can use ease-in with bullet behavior - havent' got that far yet, but I guess you could use the sine behavior at the end?

    Its a shame there is no access to the excellent easing functions in jquery easing plugin.

  • Ok, after many hours of scratching head, Ive figured out the problem. Most of the manuals and tutorials are out of date, and show System loops options which dont exist or have been renamed.

    So I assumed that for each = for each element, as I could not find "for each element".

    So for each element is an event on the array object, not the system object. Doh! half a day wasted.

    Its so easy when you know, and so hard when you dont.

nutmix's avatar

nutmix

Member since 16 Aug, 2012

None one is following nutmix yet!

Trophy Case

  • 12-Year Club

Progress

12/44
How to earn trophies