evillair's Forum Posts

  • I created a simple way of generating nodes, but I can't figure out a way to connect them in a logical way.

    Here's the capx of what I have for the nodes: https://www.dropbox.com/s/on1krbh60y58u ... .capx?dl=0

    I'm going to use the first node as my start and the furthest away as my exit later on.

    I want to get something like this:

  • Awesome, thanks TwinBlazar!

    Yeah, the Mouse.AbsoluteX, Mouse.AbsoluteY worked.

    You're right, It was because the first time I was clicking on the minimap I was on the screen area but the second tiime I wasn't.

    edit: I also changed the mouse click to left button is down so I can drag on the minimap and the camera scrolls.

  • Hi TwinBlazar,

    I almost got the mouse.x - minimap.X part!

    It works good, but only the first time I click on the minimap. After that the camera goes to the bottom right corner of my layout.

    I'm using a camera sprite (with a Scroll to) for the camera movement since I'm using 3 differtent types of camera styles.

    I'm looking into maybe I have something in my event sheet that is messing it up.

  • Hi TwinBlazar, thanks for the input.

    I've tried what you said but it's not working, most likely cause my minimap isn't at 0,0?

    Some info:

    My minimap is at x 20, y 525 and is 175x175 pixels

    My layout is 4500x4500

    If I do Mouse.X-Map.X & Mouse.Y-Map.Y I get the mines at the same size of the minimap on the layout.

  • I'm using this for middleclick drag, you may be able to change it to make it work for you.

    You need 5 number globals,sSX, sSY, sMX, sMY and dragging

    http://postimg.org/image/40eg4yayp

  • I got a minimap working with this:

    Map.X+player.X*Map.Width/LayoutWidth
    Map.Y+player.Y*Map.Height/LayoutHeight[/code:2qq0j5jj]
    
    Now I've been trying to go in reverse, when I click on the minimap I want to spawn a sprite in the location on the world. (I'll be using this sprite for the camera)
    I've been trying every which way but can't get it to work. I'm not the best at this math stuff. 
    
    I'm currently using this to make sure I'm not changing anything else in the game when trying to create the object:
    mouse->cursor is over [b]Map[/b]
       mouse-> on [b]left[/b] button clicked on [b]Map[/b]
    
    Hope that makes sense.
  • Awesome thank you!

  • I have a bit of a problem, I have a player standing on a sprite with a solid behavior and when I disable the collision from that block he still able to stand and move on it until he jumps.

  • Thank you it works great! I'll be able to work off this.

  • Hi, thanks, but I cannot open the project.

    It says it was saved with version 160.2 but I have version 158.2 (the latest on the website)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm trying to create a chain reaction of destroying blocks that respawn after 5 seconds.

    When the player touches a block it gets destroyed, if that block is touching another block then that block gets destroyed also etc.

    Now I managed to get this working, but, I need to respawn the destroyed block 5 seconds after they've been destroyed and this is what I cannot figure it out. <img src="smileys/smiley5.gif" border="0" align="middle" />

    This is how I have it setup, I tried without making another block but I couldn't get the chain reaction to work...

    bblock with a instance var of 0

    bblock2 also with a instance var of 0

    player -> on collision with bblock

    -wait 1 second

    -destroy

    -create bblock2 at x and y of bblock

    -set touched to 1

    bblock2 -> is overlapping bblock

    -wait 1 sec

    -destroy

    -create bblock2 at x,y of bblock

    -set touched to 1

    system -> every tick->bblock2 touched = 1

    • destroy

    Any help would be appreciated!

    Thanks in advance.