Alexixiv's Recent Forum Activity

  • Yes, I had a similar delima recently. What I did was create a dictionary to store the values that I wanted set in the other layouts. The dictionary content also became the foundation of my save system. JSON is pretty simple to understand.

    1. Create a dictionary object (this is a global object)

    2. Create what I call a "validate button"

    -Create text box called validate

    -Create event "On left click of object 'textbox validate' download DictionaryasJSON AND set textbox value to DictionaryasJSON

    3. Launch your game and click on the 'validate' object and download the JSON file. This will provide you with a template for adding values by hand instead of having to push them all initially.

    4. Find the JSON file and put in all your keys and values (you will need to set it to open with notepad)

    5. Save the JSON notepad text file and in construct2 right click on the "Files" folder on the project list typically on the right hand side and select "Import files" then select the JSON file you just modified. (from now on you can doubleclick the JSON file in the project to modify it and blow the other one away.

    6. Set your "on layout load" to set the dictionary to the contents of the JSON file (this is to initially populate it, these values will remain as long as the game is running as it is stored in RAM)

    7. Now you can use the Dictionary Set key and Dictionary.Get to call upon values like to set and start the name of an animation stored in it.

    Let me know if I need to be a little more clear and I will capx it for you.

  • I would create an object that is invisible and sets its position right behind the main sprite then have the rescued sprite constantly move to its position.

    Just to put the concept simply...

  • I am keeping everything dynamic in a Dictionary object... which is a global object... is that bad? What kind of "trouble" did you run into?

  • I wanted to share my method for accomplishing 4 way rpg top down style movement in which each direction has its own animation (no rotation). The problem I was running into was while default controls for 8 direction movement were enabled it would cause the animations to get out of sync with the movement when more than one direction key was pressed, which does not scream quality to me.

    For this to work "Default Controls" must be set to "No" on the sprites 8Direction properties.

    Here is the capx file, simply use the arrow keys to move the sprite.

    docs.google.com/file/d/0B4hvjRyB7pvBUDhYdDQ3TmlHZGM/edit

    Here are the events:

    <img src="https://lh6.googleusercontent.com/-VWAnGrFcS2U/UPhoMZK8dqI/AAAAAAAACfc/QTFt9ziqkbc/s800/KeyMoveEvents.png" border="0" />

  • Totally getting my vote and my fiancees vote as well, this program has kept the developing doors open for me when all my coders gave up. I don't care if I ever finish my game because it is fun to make and construct 2 keeps the ball rolling.

  • You should totally make a multiplayer version where you could wash other peoples stones and see how they have progressed. Oh you could call it "Rock Quarry" People could even pay to have their stone relocated closer to friends stones!!!

  • Sumo Paint - Free web-based image editor, cool symetric tools

    DeviantArt Muro - Free web-based image editor, great sketch effect

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I used CustomMovement to create this effect.

    I made object variables for the player target X and Y. When the mouse is clicked I set target XY to the mouse XY.

    Then I just compare the players XY against his target XY and if they differ I turn the player sprite towards the target XY and give him some acceleration.

    When players is near the target XY I stop the movement.

    Example capx here

    I guess you can use bullet behaviour also the same way.

    For your example TheLure I would suggest adding one more action to your Mouse Click event "Set CustomMovement Overall Speed to 0"

    This prevents the player sprite from circling the target when a second click is performed before the previous move has been completed.

    Though I did find it quite fun to try and get the player to stop moving with more clicks before I implemented the speed cancel. Your example helped me a lot :)

  • Alexixiv

    I think this thread is about swapping objects in the event sheet inside C2, and not during runtime.

    Also, you've already posted this question in the "How do I" section. Someone will help you if they have the time, there's no need to double-post.

    Yes you are right, I found this post after I had created my topic and just wanted to maximize visibility. I was confused about the purpose of this topic, sorry for the spam, and thank you for pointing that out :)

  • Ok so I am using a hybrid or the two concepts. I have the cards as one object with each card as a different animation. Then I have all the transformations as one object with each form as a different animation.

    -On Left Click of card-X:

    A. set array1,1 to animationName

    B. sprite start animation array1,1 "&Idle"

    Each animation starts with frames 1-4 to show the transformation then loops back to frame 5 from that point on.

    What I am hoping to do is to use the value pushed to array1,1 to track stats for each of the individual transformations. But I haven't gotten that far yet. Just wanted to confirm that I found a solution, and hopefully that it will function with the rest of the design down the road.

  • You are right, I have more peace of mind now that I have bought the license.

    I went to a family system; however, I ran into a problem it seems many others have where you cannot "create" a specific object from a family or create an object using its name.

    Currently the only method I have working is where I can put all the "transformations" into one object and just reference the animation name to make it happen. However I still have some problems with that method. I will post a capx file soon once I get it all cleaned up. Noobishly messy, was trying a lot of diff things.

  • This may not be the best way to go about doing this, if someone has a better way to achieve this function please share :)

    so right now, it is seeming like the easiest way to do this is to do this

    1. Card Clicked

    2. Send Card animationName to array1,1

    3. Set sprite animation to Array.At(1,1)&"Idle"

    which would mean I would store all the different forms in one object... which means I could put make all the cards the same object also and try to set a random animation between certain values or something for the cards, so the same object drops for the player but it is a random animation... not sure if that random part is possible in C2 or not...

Alexixiv's avatar

Alexixiv

Member since 29 Jun, 2012

Twitter
Alexixiv has 1 followers

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies