Xocolade's Forum Posts

  • Sometimes it bugs out and says that a trigger event cannot be inside of a loop .

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • By putting a 0.1 second wait before the local storage gets the key , it worked . But what i am actually trying to do is more complicated .

    I am creating an RPG where a player can have up to 5 characters , and all of the data of these characters are saved to the local storage .

    If you delete a character , the entire local storage keys should change . For ex :

    If you have 3 characters and you delete your first one , your old second character will now be the first one , and your old third character will now be the second one .

    The data that will change includes all the inventory slots of the characters .

    So , in the example cited before , the now first character would have all of the data of the inventory slots of the old second character , and the now second character would have all of the data of the inventory slots of the old third character .

    To do this , i am doing a loop that repeats 24 times ( amount of inventory slots ) , but it's not working . The keys are not changing at all .

    PS : All the keys are already saved , so all the keys that are being get from the event already exist .

    Here are 2 prints ( these represent all the data that needs to be changed if the player just deleted his first character ) :

    I don't expect anyone to come up with a solution immediately , since this is really hard for me to explain and also for someone not involved in the project to understand .

  • Oops . I didn't notice , sorry

  • Thanks for the response .

    The "Wait for previous actions to complete" doesn't seem to exist for me .

    Here's a print : ( i tried putting the "Wait for previous actions to complete" action in the red box )

    I am running R269 .

  • I tried doing this :

    It didn't work out , i got these values :

    I can't think of any other way to do this . Any help ? Thanks in advance .

  • Thank you all so much ! I got a TURN server working using Xirsys :D

  • Thanks , ill look into creating a turn server

    Just for curiosity , is there any way i can connect players online using Hamachi ( LAN ) ?

    I tried to , but it didnt work out

  • First of all , thanks for the response :D

    I am in control of my network , just like my friends are in control of theirs .

    What are some of the other things i can do other than disabling the firewall ?

  • Hello .

    I've been messing a lot with Construct 2's multiplayer function recently .

    I used the chat room example by scirra as a foundation for my project .

    But , the connection is only successful on a local network . It fails whenever i try to connect with my friends across the country .

    The problems are :

    1 - The peer isnt able to see the host and vice versa .

    2 - The peer and host's messages dont show up for each other .

    3 - ~20 seconds after the peer joins the room , he gets kicked out .

    These problems are ocurring both in my project and in scirra's official chat room .

    Any help ? Thanks in advance !

    PS : Sorry for bad english

  • Thank you all so much ! I was able to fix the problem using rex's bbchat plugin :D

  • So i would need to create one text object for each line of text ?

  • Hello . I've been using Construct 2 for some time now , but only recently i decided to work on a text-based RPG adventure .

    I'm using a Text Box object , customized with CSS , for the main chat .

    One of my problems is that , from what i've seen , it's only possible to customize the color for the entire text that is being shown in the text box , meaning that i cant have different lines with different colors .

    Any help ? Thanks in advance :)

    Sorry for bad english .

    Tagged:

  • Thanks ! Very simple , but it worked .

  • So , i'm developing a game where an undead enemy has 3 abilities to choose from :

    1 - Normal Attack

    2 - Life Drain ( 25 MP ) ( Can only be used when < 50% maximum HP )

    3 - Dark Shield ( 40 MP )

    To select which one will be used , I created a variable .

    Depending on his current MP , some abilities might not be available .

    My problem is : If his MP is higher than 65 ( 25 + 40 ) he should be able to select any of those 3 abilities . So this variable sets its value to round(random(1,3)) . If the result is one , the game should pick a normal attack . If the result is 2 , the game should pick life drain . If the result is 3 , the game should pick dark shield .

    But what if the Undead has 100% HP , but enough mana to use dark shield ?

    So , the only abilities usable would be Normal attack ( 1 ) and Dark shield ( 3 )

    So i tried setting the variable to this : round(random(1,3))

    The problem is , by doing that , is also includes 2 ( Life Drain ) .

    So , in short terms : I need the game to only pick "1" or "3" , without including "2".

    How do i do that ?

  • Thanks , it worked perfectly :)