rk123's Recent Forum Activity

  • I have a simple drag & drop game where I use photon to update the position of an item after drop. There are only 10 items in the layout and 2 players, however the connection always gets lost after being in the layout after some time. Is this the concession we have to make when using photon? In other words, is this something we have to live with? I can't imagine that being the case for 100$ a month.

    Another problem I got is when a room is made, other players have to join quickly, because after 1 or 2 minutes or so it becomes impossible to join the room.

    It would be great if you (thephotons) could help with these 2 issues. Thanks in advance!

  • All is working now. Thank you so much for the effort you took to post and help

  • Another holistic question/approach:

    Is there any way where all changes that happen in the layout are updated automatically at every 0.2 seconds.

    Like I wrote earlier, the only changes that could happen are positions of sprite instances, text changes (score) and opacity changes.

    Maybe I am too stuck on the idea that after every action a message has to be reporting everything about the actor that had undergone interaction/change, and there could be a way where all positions, angles etc. is mass processed the whole time?

  • Thank you so much for the tips.

    Would you please also take a look at my last example, where do you think the photon.eventdata 3 has to go?

    Right now I set is as a condition (see screenshot). But it doesnt work

  • Wow, that was very well explained, thank you so much! So it is possible to send multiple states of the instance along. I knew it! So would it mean that you could send the animation frame nr. as well in this manner? Which would be: Tiles.AnimationFrame for index 4?

    So now I understand the data communication, but still struggling with the logic... sorry. Where does the int(tokenat(Photon.EventData,3,"|")) for the UID go?

    I tried this for example

    but it did not work so far

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The problem is that you can not specify the family, UID of an instance and X,Y position in the same expression. Therefor there is a middle step needed here and I am just not familiar enough with everything to be able to write it.

    Edit:

    Well actually it is photon dependent, because the data that you send and that is received is notated differently than what I am used to in Construct. What kind of syntax is that? Is it a specific language that we can learn/see the IDE of somewhere?

    So for example when I send the position there is:

    Tiles.X&"|"&Tiles.Y

    Then when you want photon to take over the data there is:

    int(tokenat(Photon.EventData,0,"|")) for X and

    int(tokenat(Photon.EventData,1,"|")) for Y

    I guess that I need a certain kind of data notation to write into the raisevents and onevents. Where can one learn such practices/syntax? Can anyone just help me out with just this for now by posting a screenshot or pseudo code? Please? I am super desperate

  • So far I know exactly the things you just mentioned. The thing I am struggling with is syntax of the expression fields. So HOW do I specify which instance using UID, global/instant variable, comparing value etc. etc.

    I just have touch/drag drop, so no fancy mechanisms

  • Thanks. Do you have any link to a specific tutorial? Where should I search for on youtube?

    So the sprites inside the family have to be specified? I learned that you could pick an instance from a family, have seen some examples where people could pick an instance like that without specifying the independent sprites in the family. Just can't reproduce it right now myself....

  • I have still not found any solution now after 3-4 days of trying tons of possibilities, reading through this thread and other documentation forms.

    I just know it must be something simple I'm missing/overlooking that has to do with picking instances.....

  • Is there any expression syntax where you can choose the X/Y of an instance of a family with a certain UID?

  • I need to be able to tell in the expression which instance needs to be repositioned.

    Right now with "isdragging", it again drags all instances at once and puts them on the same spot.

  • Sorry for reposting, but at the end I think my question should be here.

    So I have a family called Tiles with different objects and their instances. I am struggling a lot with being able to figure out which condition I need and the corresponding expression (how, what to fill in) to be able to pick only the instance of an object inside a family that is being dragged/dropped. I am dragging/dropping an instance of this Tiles family itself. So where touch/drag,drop starts/ends it should be exactly where the picked up instance of Tiles is.

    If I do the following, of course all instances in the family move along:

    Also to be honest, I have no idea how this syntax exactly work that I filled into the data when raising the event and the other syntax of setting the position (rl2x&"|"&rl2y and int(tokenat(Photon.EventData,0,"|"))). I just took them over from someone.

    Any help would be much appreciated!

    Edit:

    Basically what I'd like to achieve in the end is that whatever a player does in the layout, others are able to see it. There are just a bunch of instances that can be moved around and options to toggle on/off instances and score text input fields that everyone can access (and that also need to be updated when input has been made). So each change in instance position etc. needs to be made visible to all players.

    Think of it as if it was a jigsaw puzzle where all players can move the pieces and the position would be updated to all players after a player has moved a piece

rk123's avatar

rk123

Member since 6 Apr, 2019

None one is following rk123 yet!

Trophy Case

  • 5-Year Club
  • Email Verified

Progress

6/44
How to earn trophies