Unconnected's Recent Forum Activity

  • 99Instances2Go It took me a few minutes to realize what was going on. Why map already placed objects on the layout into an array only to destroy them and then recreate them?

    The only reason I thought of was, by placing objects in an array you are preventing duplicate objects from being on the screen. Is an array really needed for any reason other than having 1 object on screen instead of 24. Is that the only reason?

    Assuming the path is set beforehand and no other objects are needed to be placed in the array.

  • Problem Description

    Avast Antivirus prevents installation of Construct 2 r229 and prevents the opening of Capx Files.

    Attach a Capx

    Any Capx.

    Description of Capx

    N/A

    Steps to Reproduce Bug

    • Have Avast installed with "Hardened Mode" Enabled
    • Have Construct 2 r229
    • Try to install and/or open Capx

    Observed Result

    If trying to install Construct 2 r299 or opening a Capx a Window says:

    "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item."

    Expected Result

    Installing or opening of Capx

    Affected Browsers

      N/A

    I am not sure if this is in the right area or if this is known. I did do a simple search and didn't find anything. There is a chance I didn't type in the right thing.

    Versions:

    Windows 10 Pro, 64-bit (x64) Version 1511

    Avast Antivirus 11.2.2262

    Construct 2 Beta r229

    Construct 2 r229 can not be installed and Capx files are blocked from being open when "Hardened Mode"(Moderate or Agressive) is enabled in Avast.

  • Each Tile needs more than 1 piece of info inputted into it. Each ArrayX, ArrayY coordinate can only hold one piece of info in the ArrayZ.

    What 99Instances2Go is suggesting sounds like giving every tile an X value and than using the ArrayY values for info. That sounds like it will work and actually be less complicated and smaller in size. I was asking how to get ArrayX and ArrayY on mouse click not how to compare to existing or change an existing Array Value, I know how to change/compare value. I was asking if there was a function or an easier way to go about getting ArrayX and AraryY on touch/click. I probably have asked wrong or implied something I didn't mean to, I have a habit of that... I suppose I could make an instance variable on each tile and get the ArrayX based off of the Instance Variable and then change the ArrayY needed on touch/mouse/event. I know about how a 3dArray is structured, I was asking if the ArrayZ stacked on top of another ArrayZ was automatically associated with the one below it, or if it is free to be modified. I believe I now know it is just a separate piece of info and only the location is different, it can be used in anyway one thinks of.

    Thank you both.

  • Now That I posted this.. I just figured that I may be able to Blend and Spin Game Objects to make it looks like it is a timer. What would be the best way of doing that if it is in fact a solution?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry about the title, I didn't know how else to explain what is needed in the space allowed.

    Basically I need a Timer that is shaped like a circle. There are two lines from the center of the circle to the edge. One line doesn't move while the movable line slowly spins away from it. The lines origin points are at the center of the circle, it looks like and acts like a circle clock with an hour hand and a second hand. "Area A" starts off as the small area between the Lines. "Area B" starts out as the larger area on the other side of the lines. I need transparency to stay in "Area A" even when "Area A" gets bigger than "Area B". When the two lines touch each other and "Area B" is gone, it will be destroyed.

    In other words I need transparency between two lines and it needs to follow a circular path. The two lines are only touching at the origin point. The transparency needs stay on the same side of the lines even when they spin above 180 degrees. When it gets to 360 I need the whole object to be destroyed.

    Almost like the Super Mario 64 Health Bar, but without segments. It would be as a whole that slowly goes away.

    This needs to be done in an event sheet, as the movement of the movable line can be adjusted due to triggers in the game. The movable line will sometimes slowly move and other times it will jump x%. It is unpredictable due to how the player plays the game. This is an in-game timer, a long term timer. It barely moves unless the player effects it somehow. I also would like the visible part of the timer to be able to overlap objects, if possible.

    I know this is kind of an odd thing to ask. I only asked for a circle timer because I assumed it would be easier than a square. A square Timer will work as well. With a square I can hide the unneeded parts. I have no idea where to start on this. It is why I am asking... I wouldn't know how to even look it up. I was wanting to avoid making it an animation. If the end of the lines need to go past the circle's edge it should be okay. I am aware there may be the need for many lines.. Maybe some type of points are used as well.

    Thank you. sorry for any complications.

    Will be a small while before I am able to reply.

  • I am not talking about the examples I've seen where player inputs text and then the text changes a value. On those the values are always known. I am talking about the ability to auto select ArrayX and ArrayY values based off of in-game actions. Like a player placing a building on random objects(tiles) that are already mapped to an array.

    I am aware I will have to implement a 3d Array. I am not 100% sure how that works. From my understanding (X0,Y0,Z0) has one value and then (X0,Y0,Z1) would just be second piece of information for (X0,Y0)? Do new Z layers "stack" above or below the current existing layers? When using a 3d Array can I add a new Z layer on an existing Array without effecting it's existing values and more important messing up code? I am thinking I can but want to be sure before I end up messing something up and not realizing until it is to late.

    I currently have a single layer array that remembers the objects on a layer(Similar to Tiles). If a newly placed Building is covering 4 objects(Tiles) how do I collect the corresponding ArrayX, ArrayY coordinates so I can change the correct ArrayZ value? I want it so the Map loads the same way if the game is saved and reloaded.

    I know I may have to have a building only take up one Tile upon placement and then mathematically change the other effected ArrayX, ArrayY and ArrayZ values with an event. There is also a chance I may be able to implement an overlapping event. The only issue is not knowing how to get effected ArrayX and ArrayY values.

    A few more question. Is it possible to only use one Array for every level/map? Just on start of layer have it load the corresponding JSON file and auto adjust accordingly? From my understandings a JSON file is a readable string of text that Arrays can read and translate.... [X0,Y0,Z0][X0,Y1,Z0][X0,Y2,Z0].. etc. I assume all I would need is a Global Variable that changes on startup and to adjust it's size as well. Correct? Do JSON files work on all devices, P.C., mobile devices, consoles etc? The game generates a file and then the device handles it? If a device is not supported what happens?

    Capx for this project is nearly empty and can be redone easily. I don't mind if the set-up for this is a small bit tedious. I am more about performance and ease of workflow after it is set-up. Plus once it is set up the chances are small that it will have to set it up again, possibly just a number change here and there.

    I have read a lot already, these are just questions I haven't caught the answers to. I know this is a lot for one post and it may be all over the place. Sorry about the length of the post, the width is average.

    I will be away for a while.

    Thanks in advance.

  • I admit I got the X and Y coordinates backwards for a small bit.

    X0Y0, X1Y0, X2Y0

    X0Y1, X1Y1, X2Y1

    X0Y2, X1Y2, X2Y2

    The formula loopindex("x") + loopindex("y") * 3 for the array value does work. The 3 is in fact the Width of the TileMap. By multiplying the Y by 3 it is correctly placing the values of the array in ascending order.

    It sets the values of the X to

    0,1,2

    0,1,2

    0,1,2

    and the values of the Y to

    0,0,0

    3,3,3

    6,6,6

    Any number multiplied by 0 is 0. So that explains how the top 3 tiles can stay 0,1,2 . When X and Y is added together it creates:

    0,1,2

    3,4,5

    6,7,8

    Thanks, the example you gave was very useful.

    I just figured I would explain in case more people need to know.

    I forgot you could view the Array Values in the Debugger as well.....

  • I am not understanding the 3 then. Because 0 + 0 *3 = 0 and 0 + 1 *3 = 3. I am not understanding it fully. I understand that loopindex is how many times to loop. What I am missing is, by multiplying by 3 it seems the array values would be multiples of 3, which should throw the tile order out. I understood what Loopindex means is what I meant by the above post.

  • I understand now. I was misunderstanding Loopindex

  • When I changed the number and ran it I saw that it is needed for the proper order of the tiles. I am not sure of the reason however. I could only guess it has something to do with the Width of the Array.

  • Why did you multiply the Value by 3? When setting up the Array values? Is that just something you did for an unrelated reason or am I missing something.

  • I have the basic knowledge of how arrays work, how you can set info and then call it when needed. Almost like a spreadsheet. I am wanting to know how to connect tiles to an array. I have square tiles that are placed near each other to make it look like a normal square grid. I would like to associate a/an (3d) array to the tiles so the array can tell the game what frame to display and what object is on the tile so it can decide if the area of the tile is taken. I'm not asking to use an array to make a grid, I just need to know how to implement an array so that each tile can have a few numbers attached to it.

    I am wanting to do this so when the game is saved it only has to save an array along with a few global variables.

    I may be completely wrong on what I am asking so advice would work as well.

    The grid will be used to project onto an isometric grid. I already know how to do this for the most part. I am only having trouble with the array.

    I guess I may be thinking of Cell Size if that can be implemented somehow.

    ***********

    Also would it be possible to add a row and column to an array on all four sides at once during game-play without messing up the layout of objects on the grid? As in having the level grow when certain goals are achieved, or would I be better off just having the Array set to max size and manually blocking out the area that isn't available to the player yet.

Unconnected's avatar

Unconnected

Member since 6 Apr, 2016

Twitter
Unconnected has 1 followers

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies