sho_nakano's Forum Posts

  • that sounds like a good idea. I think it'll need a bit more than just adding for each, but I'll know for sure when I test it.

  • this is a very good idea! It's nice to know what the engine has been used for!

  • I hope I word the question correctly, I don't know how to correctly call it.

    I have a MoveTo event on a cards family, and basically I want to move them to player's hands.

    Here is the event sheet.

    It works if I return only one card to player's hand. The problem shows up when I return 2 cards (possibly more than 2 too, but I haven't tested that far). The actions on event 51 only run on one card and not the other. Making one card floating above the player's hand, can't be selected.

    How do I make it, so that all the cards returning to player's hands are destroyed and then the game makes a new player hand?

  • make a variable named "score"

    add a value to it everytime something meaningful happen

    add an event >> system >> compare variable

    set score equal to 100

    and then add action >> event >> system >> go to layout. Go to the layout where you have a "YOU WIN" screen.

  • That works! I don't really understand how that saved the data to an array of objects, but it worked!

    Thanks a lot dop2000!

  • okay, that was close to correct but still not quite. I am sure it's because the data I saved to saveDataArr array were strings (from JSON.ToCompactString). I still send the data to the server in an array of string, what I need is to send the data in an array of objects.

    Is there any way to save an object data to an array? I've been trying but no success. using a JSON's Get expression only gives me 0.

  • I haven't tried it; I actually need the data in an array of JSON objects. I will try your solution later.

  • I'm making a game for my client and in this game, I have to collect user's data and game scores (with their permission of course). That part is already done and what I have to do next is to send it to the backend so that the data can be saved to a server. This is where I encountered the problem, I'm using array object to save the data and array's AsJson expression to send the data.

    the problem is: AsJson sends the data like this

    while what I need to send is only what's inside the data. I've been trying but Construct 3 doesn't allow me to write AsJson.data (it will give me a syntax error). I've checked the documentation but other than using for loops, I don't see any other way to get what's inside the data property.

    Can someone help? Thanks.

    Tagged:

  • That looks like a great solution, let me try it out

  • yeah, but the number of functions would be huge. I was asking to know if C2 can do something that I don't know it can.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm making a game very similar to TCG where players have a set number of cards in their hands, and they can play it when they put the card in the play area. There are also several phases in the game like reveal phase, damage phase, cooldown phase, etc. I want some of the cards to have an ability that can take effect when certain phases start (something similar to "On reveal, heal x points to your life point")

    I don't know if C2 allows us to create a custom event that will trigger when we want it and if we can define a listener for said trigger, so I use a signal and wait for signal actions. However, I can imagine that this will make the event sheets big and unmanageable if every card's effect is several lines of code waiting for a signal. I want to know if there's a better way to manage card's abilities in a TCG?

    Maybe I can use functions somehow, but I want to ask first.

  • Hi Kenney, I wanna ask do you have cards template for digital TCG or something like Slay the Spire's cards? I didn't see it listed at the first page.

  • This is a great news! And I'm thinking of making a multiplayer game too, what a right time to prototype my game.

  • I can't find the "Export file structure" in the advanced section in project properties.

    Or maybe I just misunderstand you when you said the project's properties?

  • so, I've made the game and exported it for the web. The problem is my client asked me whether I can change the structure or not, so if you see the below image

    my client wants the index.html file in the jspsy/program folder, the css in the jspsy/css folder, and the image in the jspsy/program/image/game_name folder

    I don't think the exported folder's structure can be changed and I already told the client that it might be hard to do so. I just want an opinion from you guys who maybe have this kind of situation before. If it really can't be done, I'll have to talk to my client.

    Thanks in advance.