SoldjahBoy's Forum Posts

  • You might need to post your capx for someone to take a look at.

    It's most likely just a conflict between how you're calling the animation to change, or perhaps somewhere if you are setting the initial frame, or something like that.

    ~Sol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Shameless *bump* for great justice.

    Any more news on the latest status?

    ~Sol

  • I can't look at your project because I'm at work, but I did play your example of the game and look at your backgrounds...

    You should be able to simply create the transitional instance and align it's position to the normal background using;

    set x position transition.object

    set y position transition.object

    -> to background.x+background.width

    -> to background.y

    This will simply "tag" it onto the end of your background as it scrolls along... once you are ready for the transition that is. I'm not sure how you're triggering the requirement for the actual transition, but let's say it's score based or time based... when the score or time reaches the desired amount, use this to trigger the creation of the transitional layer... it will already be in position (at the end of the current background).

    Once the transition has left the screen by (0-transition.width) then you can create the next background to appear in the same way.

    Hopefully that made some kind of sense

    ~Sol

  • Ah, ok... I 99% use only NWJS when I'm playing around with file stuff. I can't help you unfortuntely because I don't have much experience with using browser storage... but I'm certain someone here will know. Maybe 99Instances2Go will have some ideas... that guy seems to know how to do most stuff

    ~Sol

  • Sorry S1mon I'm at work so I can't check it now...

    If you have two variables; one to define the entire instance of all combined objects, and a second one to define the individual parts of each instance...

    So the first instance that is created, have a var called something like "UniqueID" and the second instance called "PartID" or "PositionID"or something like that... when you spawn each part for one particular instance, the unique ID would be the same (IE, all would be 1 for the first instance, but each PART would be 1,2,3,4,etc).

    THEN you can compare the UniqueID (for the entire instance) and each Part/PositionID...

    For each "thing"

    -> UniqueID = UniqueID

    ----> Set position to PartID imagepoint.

    In this way you have a "global" identity for which parts belong to which instance, as well as the positional identifier so it knows where to join on to the instance.

    Kinds wish I wasn't at work... I've done this so many times with making several instances of the same "blank" character that use multiple parts... in almost every prototype or project I've worked on, I have a single "blank" that is instanced and used to make as many players or enemies as I want - all without using families or containers.

    Speaking of containers though... you COULD easily use a container to create all arts at once, and easily reference all parts at once since they will automatically belong to the other objects in the same container. (Look up containers in the construct 2 manual) 8)

    ~Sol

  • If your image points are numbered exactly like that, then you can just give each "part" of your object an instance variable called something like "PositionID" and set it to the object.count of the instance upon creation.

    You can then use a comparison of the instance variable value, and the image point you want to join it to.

    It looks like you have all variances in a single sprite, so it should be really easy to set the positional ID as each part is created.

    If you have multiple instances of this entire object, then you may need a second variable to identify the individual "master" instance, with the "PositionID" as the placement for the master.

    Hopefully that all made some kind of sense...

    ~Sol

  • Every X seconds

    -> set bg.width to self.width+1

    -> set bg.height to self.height+1

    That's the simplest way to do something like that... it becomes more complicated if you want to maintain aspect ratios and stuff like that, but for simple explanation you just want to change the width and height every X seconds perhaps?

    ~Sol

  • Scaling an app to different screen sizes is a bit of a pain - especially when crossing different aspect ratios.

    You will need to set your scaling mode to letterbox to ensure everything fits on any screen, but at the cost of having ugly black bars down the sides or along the top and bottom.

    I made a small prototype project that allows dynamic scaling to any screen size and aspect, but you have to position all objects in the layout using a set of 4 global variables (the vars change depending on the canvas size, which in turn changes to suit whatever window size is detected).

    I'm at work at the moment, so I can't link you to the file in question - but send me a PM if you like and I will try to remember when I get home to send you a link. I did post it somewhere already on the forums here, but I can't remember the thread title! LOL. If I can find it, I will come edit this post and put a link there.

    *EDIT*

    Found it - DOWNLOAD

    ~Sol

  • What platform are you building your app for? The answers you might get would vary depending on the platform... NWJS is quite different to Browser storage, for example.

    ~Sol

  • You'd have to use canvas to take a capture of the map, then hide the actual map plugin and have canvas in it's place... then you can draw sprites on top of the canvas plugin.

    Basically you use the maps plugin as an off-screen buffer and draw it to the canvas plugin.

    It's been a while since I used canvas for stuff like this, but that was the jist of the method to use.

    ~Sol

  • No worries.

    I've come un-stuck a few times with these very same issues... you have to be tricky with it. I find using the canvas plugin made by one of the R-Wizards (rojo or rex - I can never remember who made that thing) to replace the elements on the page when I need to draw something over the top.

    ~Sol

  • Construct 2 converts everything to 24bit PNG with alpha channel when it's imported into C2.

    I always just save everything as 24bit PNG with alpha so it doesn't have to do any conversion... and also so there's no compression on the original images.

    Try to make your graphics at the "native" size of your game/app so that you aren't having to resize them larger or smaller in the game itself (unless you're adding a zoom feature that would scale the entire layout instead).

    Also, make sure that if you're doing retro-style artwork (no anti-aliased edges, etc) that you set your resize sampling to POINT, otherwise leave it as LINEAR if you're using "soft" or anti-aliased artwork.

    ~Sol

  • Can you disable solid behaviour for the object when you detect that it's actually crushing the player?

    You can set a boolean instance variable for the player perhaps, and when they're being "crushed" then disable solid on the crusher - and use other events to control the position/size of the player to control the crush "mechanic".

    I guess it's a little difficult to make a suggestion without seeing how your current mechanics are working, and what you're wanting to achieve cosmetically.

    ~Sol

  • What size are your sprites? Are you up-scaling them once you import into C2 or do you keep them at the same size you drew them at? What project properties are you using for scaling? Do you have a screenshot of what your sprites look like before you add them to your project, then what they look like while running in your project?

    ~Sol

  • I think he wants to place it so if the screen or aspect ratio can scale to outer/inner - that it will still be central.

    You can try using:

    Set x -> (ViewportLeft("layer")-ViewportRight("layer"))/2

    Set y -> (ViewportBottom("layer")-ViewportTop("layer"))/2

    Just replace "layer" with the name or number of your HUD layer...

    ~Sol