TwinBlazar's Recent Forum Activity

  • The reason that it stops after you delete the layout is because C2 could no longer find that layout and would not do anything. In fact, I see that C2 will automatically remove "Go To Layout" action, if the layout it is referring to got deleted.

    Are you going around in the game using "Go To Layout (By Name)"? If so, how do you create your string to be used in "Go To Layout (By Name)" or how do you actually go around? Something is definitely wrong in your event sheets and you probably set it somewhere in the game to go the end-game layout. Search all of your event sheets where the game go to different layouts, and check for those strings if you are indeed using "Go To Layout (By Name)".

  • I have a feeling you are having a problem on mouse coordinate and parallax coordinate, and I forgot one thing (sorry). See Mouse expression (https://www.scirra.com/manual/114/mouse):

    [quote:14s7i079]Mouse expressions

    AbsoluteX

    AbsoluteY

    Return the position of the mouse cursor over the canvas area in the HTML page. This is (0, 0) at the top left of the canvas and goes up to the window size. It is not affected by any scrolling or scaling in the game.

    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)).

    The formulae above want the coordinate of the mouse that are absolute on the game screen. Could you try Mouse.AbsoluteX, Mouse.AbsoluteY and please check for their values?

  • Simulate 8Direction pressing left is already in there and you just updated it to work with touch control? Does this mean you have some other control schemes? If so, are the other control schemes conflicting each other? Ex. do you have anywhere in your event sheet that sets the speed of the 8direction to be 0?

  • There is this plugin

    Does it fit your bill?

  • EDIT: You should use mouse.AbsoluteX and mouse.AbsoluteY !!

    [quote:1y5qhylh]My minimap is at x 20, y 525 and is 175x175 pixels

    My layout is 4500x4500

    That's why I mentioned the minimap is at (0,0) for simplicity reason. If you have minimap elsewhere on the screen, you will need to take its position into account.

    Assuming the hotspot of the minimap is right at the top left corner of the minimap sprite, you can use this:

    minimapXCoordinateInPercent = ((mouse.x - minimap.X) / minimap.Width) 
    minimapYCoordinateInPercent = ((mouse.y - minimap.Y) / minimap.Height)[/code:1y5qhylh]
    
    Then, take the numbers into my second set of formula in my previous post to get the coordinate on the layout.
  • I just checked your capx and also your C2 project file. (same project, so why do you have to upload both? Just upload only capx next time.) Anyway,

    I have seen your event sheet and I have a feeling that you will have to learn lots of things before you can do what you want in the Youtube link. Before I dive down further, since you mentioned you are new, have you checked out the tutorials such as https://www.scirra.com/tutorials/37/beg ... onstruct-2 yet? If so, then I assume you are ok with C2's basic. But let's split this into two problems:

    1. Match 3

    First of all, you may wish to take some tutorials first for the match 3:

    Here is one: http://gamedevelopment.tutsplus.com/tut ... medev-8071

    While this might not be the exact thing that you want, it will give you a rough idea on how to tackle match 3 mechanic.

    2. Sliding

    For sliding tile color, you will not be using Drag & Drop behavior. Drag & Drop behavior is ok for moving around objects from single point at a time. You should use Touch events and control all objects using events. Suppose the player is touching the screen, you can use "Is In Touch" event and check for coordinate of Touch.X and Touch.Y and then see which row/column you are on (This requires some mapping in event.), then move the objects (you could use variables to identify which object is which) with respect to the player's touch movement.

    ...all these could be quite complicated if you are not familiar with programming. And no, I don't expect you to understand everything I wrote in the previous paragraph.

    -----

    SUGGESTION

    I suggest splitting your problem into smaller problems and try tackle each of them one at a time. This is so you understand what do you have to do. Perhaps, try just the match 3 first but not the sliding yet.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • From your links, MediaFire complains the following:

    [quote:1fflvj6y]Invalid or Deleted File.

    The key you provided for file access was invalid. This is usually caused because the file is no longer stored on MediaFire. This occurs when the file is removed by the originating user or MediaFire.

    Still have questions, or think we've made a mistake? Please contact support for further assistance.

    Your links are invalid in your post. It probably got cut out somewhere and you copy and paste them. Get original valid URLs first, and change "http://www.abcde.com" to "_http://www.abcde.com". Because you have reputation below 500, all of your links will be cut off, so you need to do this too.

  • There is this plugin

    Does it fit your bill?

  • In that case, scrollto behavior is not what you are looking for. ScrollTo is for camera.

    What you want to use is probably Bullet behavior, and then use events to limit the players to their areas.

    One possible way (not the best way but an easy one) is:

    if player1.x > LayoutWidth / 2

    player1.x = LayoutWidth / 2

    if player2.x < LayoutWidth / 2

    player2.x = LayoutWidth / 2

    This will make player 1 not able to move to the right half of the screen and make player 2 not able to move to the left half of the screen.

  • Hi,

    [quote:3jextksf]I have made screenshots but I have no clue how to include them to this post... Bit silly I guess. But I will try to explain my problem with words.

    Try imgur or dropbox link, perhap? <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    [quote:3jextksf]So the question I had... Is there a way to disable the other cards behind the chosen one for a moment?

    Assuming your logic is correct and the order of the card is at fault, what event are you using to do this? On Object Clicked or On Click? On Object Clicked will go for all objects. I've tried creating 3 Sprites on top of each other and I have this event:

    On Click Sprite -> Sprite.X = random(500)

    When I click on a Sprite, all Sprites go into random x location. One possible fix for this is to use the condition: pick top/bottom.

    [quote:3jextksf]Pick top/bottom

    Pick either the top-most or bottom-most instance, taking in to account layers and Z index. For example, the instance at the front of the top most layer is the top instance.

    Source: https://www.scirra.com/manual/131/common-conditions

    I've tried insert this condition right into the On Click Sprite event and only the Sprite on top will be selected and moved to a random x location, leaving all other Sprites as they are.

    Does this fix your problem?

    Kind Regards,

    TwinBlazar

  • Could you please elaborate more what do you mean by limited area?

    On the basic, any object with scrollto behavior will have the camera centered on. If two objects have scrollto behavior, the camera will be centered at the midpoint between the two objects. However, if these objects are so far apart, you won't be seeing these objects.

    Personally, I would prefer to have only one Camera object and control everything myself with events. But before we could help you validly, could you please elaborate more about your game? This is so we could help you validly.

  • Why do you have to do this? Can't you just set those setting in C2 and re-export?

TwinBlazar's avatar

TwinBlazar

Member since 14 Apr, 2013

Twitter
TwinBlazar has 1 followers

Connect with TwinBlazar

Trophy Case

  • 11-Year Club

Progress

11/44
How to earn trophies