LittleStain's Forum Posts

  • a creative way would be giving the object instance variables.

    Dis1i, Dis2i, Dis3i, etc. and setting them to the distance to the player.

    then you can do a sytem compare 2 for every one:

    min(Dis1i,Dis2i, etc.) = Dis1i -> player pin to imagepoint1

    min(Dis1i,Dis2i, etc.) = Dis2i -> player pin to imagepoint2

    There are probably much better ways, but I'm trying to be creative here.

  • How many imagepoints are there?

    You can get the distance with distance(player.x,player.y,sprite.imagepointX(),sprite.ImagepointY())

  • You might also check the walls, make sure in the physics behaviour they are set to bounding box.

    The impulse at collision thing, might be a hassle to implement correctly.

    Is physics absolutely nescessary for your game or could bullet behaviour with gravity work as well?

  • I must say I'm very bad at arrays, so big ups for figuring them out. Saving the variables shouldn't be a problem. Retrieving them with int(WebStorage.LocalValue("unlocked")) should be do-able too. How to rearrange the array according to the variables I have no clue, but it should be possible.

  • The webstorage value you retrieve is a string.

    use int(WebStorage.LocalValue("currentLevel")) to set the number of currentlevel on load.

  • BTW, I'm a graphic designer myself and untill a year ago hadn't tried any programming for it was way out of my comfort zone.

    I think the visual approach to programming (it's still programming) that Construct 2 utilizes is far simpler to understand than anything I've seen before. It still takes a lot of trial and error if you need specific things to happen, but a lot of the basics are covered by the program itself. The many behaviours and plugins available make it so you don't have to invent the wheel constantly and have a visual result very quickly. As a graphic designer I know it takes a lot of time to make things look as if they are very easy, but C2 helps me a lot in getting where I'd like to go.

  • I thought the tutorial was very clear on how to set the local keys and to retrieve them. These are the basics of the webstorage.

    Probably I don't understand your question correctly.

    What is it that needs to be saved?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If people want to steal your game, see it as a compliment, for people wouldn't steal it if it sucked.

    As long as you have the original files and all the other stuff related to your game you should be able to prove the game is yours if and when other people are trying to profit from it.

    In this age it's almost impossible to protect anything completely, so why hide behind a fictional feeling of security. If and when your work is being (ab)used by others without your permission there are many ways to set things right.

  • I always learn software by using it as well, but that also means looking at examples (a lot of them are provided with the download and many others are here on the forums)

    Following a tutorial that isn't about what you want to achieve isn't a very nice thing to do, but it does provide you with basic (and as such) nescessary information about the use of Construct2.

    This basic information will help you also when asking for solutions to event-creating, because you have a far greater understanding of the possibilities and the way things are done. (and for the right names of certain aspects of your project.)

  • Sharing through Dropbox is what is most used on these forums.

    Making artificial intelligence is hard, very hard.

    You have to tell the computer what to do in every situation.

    If this move is possible do it, if not see if this is possible, if not try this, etcetera. You will have to decide which moves are preferred. In men's morris it is pretty clear that creating a line of three, or preventing the other player to do so are the best moves if possible.

    you should also try to randomize the AI movements a bit to not always play the same.

    Why do you not have another choice?

  • Maybe a strange question, but ..

    Why does the Scirra site have a tutorial section?

  • I'd rather you'd share your capx in another way, because I'm not going to install software to be able to download.

    Placing the pieces should be no problem. Just use drag and drop.

    Use a global variable and set it to 3,9 or 12 to determine how many sprites must be created.

    For moving I would create a boolean for selected and if selected set possible locations to move to visible.

    AI will be your biggest problem as is usually the case in strategic games. You will have to create events to make the computer choose the best move in the given situation.

  • If you get into more trouble with instances be sure to read the topics about Picking/selecting instance(s) in the FAQ

  • I don't know how you have your events set up, but add a variable to the object. Once moved change the variable and add a condition to the moving so the sprite can only be moved if the variable isn't changed.