sho_nakano's Forum Posts

  • So, I have a card object that have a default animation as a back side of the card, and each card will have an element and a power. These elements and power are represented as an animation in the card object.

    The elements are fire, earth, water, air

    The power is a number from 1 t0 10

    so, the animation can be fire_1, fire_2, fire_3, all the way to fire_10. The same for other elements like water_7, earth_6, air_10, etc.

    The cards are not all created yet, since in the game they are still in the deck. The cards are created after the player (or enemy) draw the cards from the deck. I can set the correct animation to play so if the player draws 5 cards fire_1, earth_3, water_8, water_3, air_10, they all show the correct image.

    The problem starts when I want to assign the element and power to the card's instance variables (power and element has their own instance variable). At first, I imagined it'd be similar to JavaScript's split() function where I can split a string to several strings based on the separator. But I just realized I can't do this in Construct 3.

    I already look at the manual and the best thing I can find is search if a string has "fire", "earth", "water", or "air" in it, I can do this to get the element, but I can't get the power value.

    Can anyone help? Thanks.

  • ah I thought I could use peerState. I will try to do your suggestion, I'll update if I found new problems.

    edit: I tried that, and it worked! Thank you.

  • okay, so I'm making a multiplayer game and I'm working off from the Pong multiplayer example. That example waits for 3 seconds before starting the game, but what I want to do is to have both the host and peer to press "ready" button before starting the game.

    I keep getting problem here, I imagine I have to make the peer send a value to host indicating it's ready, and then I have to start the game after both the host and peer are ready. Somehow I fail to do that.

    I use

    is Host |
    is ReadyInRoom | (start game here)
    Multiplayer.PeerState(peerId, "ready") = 1 |
    

    the ReadyInRoom variable indicates if the host is ready, and the peerState indicates if the peer is ready.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks, I'll check caniplaythat out.

  • I'm still in the beginning process of making my game, but I'm thinking about how to make my game more accessible with people with disabilities. Like making sure my game can be played with only one hand, I'm also using visual cues in addition to audio cues when there's something going on with the game.

    This is something I came up myself in the middle of designing my game, I'm curious if there are more resources about this? Either blogs or Youtube videos? Especially something about making my game accessible to people with color blindness and other disabilities that they may have.

  • it worked, thanks! I didn't realize there is another trigger specifically for fade.

  • so I have a sheet like this:

    Audio On "rhymes" ended -> Audio Fade "nursery BGM" to volume to -100 over 2 seconds, then stop

    Audio On "nursery BGM" ended -> system go to rhyme_level_1

    but the game doesn't go to level 1 even though the nursery BGM ended. Does someone know why?

    Edit: I heard the nursery BGM fades out, so the first trigger did run

  • I'm making a game that was published for web for my client, the game uses iFrame objects to show the client's site and AJAX to send data to a server. Now my client asked if I can export the game for Windows. Of course, I know that windows publishing is possible, but I have concern about iFrame and AJAX objects.

    I want to know can the iFrame and AJAX object work as intended if I export the game to Windows, either using NW.js or Webview?

  • To simplify it, the game you're talking about basically have a function read/write data to server. Construct can already do that, to retrieve a JSON data from a server. However, you need to do some backend side programming to achieve what you want.

  • 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.