CROmartin's Forum Posts

  • Usually this means you installed the wrong version of the addon, and got one that's incompatible with your project. Make sure you really have the right version of the addon. I'm afraid third-party addons are outside our control - you'd need to contact the addon developer for further support.

    Thank you, but I would leave theses that addons are cause of problem, something else is happening, could you tell me other things that could cause such error(invalid construct 3 project)?

  • CROmartin

    Try this

    https://www.construct.net/en/make-games/addons/547/call-js-c3runtime

    I just published c3runtime,

    Supports c2runtime.

    use worker = no

    Thank you, but it didn't help, which makes me think that addons are not cause of problem.

  • The only reliable way to remove an addon from a project is to have the addon installed, open the project in Construct, and remove all references to it. If you delete things from the project files directly, you could easily corrupt the project.

    You can also use the 'Bundle addons' feature to ensure the addon is saved with your project, avoiding any problems with having to install the addon to open the project.

    Thank you on this information, but this will not help me at all in this case. I didn't expect plugin malfunctioning and didn't remove it on time, now I am stuck in quite bad position as I can't access my project. To explain little bit more: project was imported from c2 to c3, but I have successfully done that and everything worked fine for months, basically I have removed every old plugin expect one(callJS). Now that plugin malfunctioned and I can't open project anymore, probably some kind of update caused that. So only solutions for me is to manually remove this plugin from source code. It is really important that I can open this project again.

  • Hello.

    Plugin name: Plugin Call JS (cjs) by Joe7.

    Today I have opened project after 2 months inactivity and for some reason I got message addons callJS missing which to be honest made me mental. Why, how is now this addon missing? Of course after I have installed plugin again project couldn't be loaded, ok I am going to remove everything as c3p is actually zip file, but of course after I have removed everything related to that plugin I still couldn't open it. Luckily plugin doesn't play big part in the game's code, but for that same reason is annoying that it causes me problems now, I am hoping that I can remove it or fix it somehow.

    How can I properly remove plugin from project files, as I am guessing I did something wrong, but don't know what?

    Could I fix maybe plugin somehow?

    Thank you!

    Best regards,

    Martin Starešinčić.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello,

    Is it possible to send out data to particular url with AJAX? Yes it is, "Post to URL" action.

    How does "Post to URL" action work? If some can explain little bit from sending to receiving, maybe providing some kind of documents for that, I would be grate full.

    What could be solution for sending JSON data through AJAX "Post to URL" action?

    Thank you.

    Best regards,

    Martin Starešinčić

  • Hello!

    I am not to much familiar how things work in network communication, well I know basic theory, but how things are done in practice, not so much.

    I am wondering how is this done? With the AJAX? What does the XML have to do with all of this?

    How can I send information from game?

    Thank you!

    Best regards,

    Martin Starešinčić

  • > OnActorLeave fires when player leaves, but for every client. It would be good if there was some kind of equivalent of "join room" for "leave room", which seems to fire only for exact client that joined. Am I understanding this events good?

    You can get the id of leaving player via Photon.ActorNr variable and compare it to the id of the player which you need.

    Just to be clear about this you are telling me that ActorNr will change in "On event number" based on client which "Raises event"?

    YES, this is exactly how it works. I have tested it out.

  • Does anyone can tell me how i can make, that every Player sees the walking animation of a sprite and not just the sender of it?

    When you send data you should always pass ID of client(Photon.MyActorNr) and also you should assign that same ID to objects that present player, other vise locating correct sprite(player) on each clients side would be impossible.

    Set "Receivers" Others and maker sure that "TargetActors" are not defined(just ""), define TargetActors only when you want to target ONLY ONE client by his ID.

    something like this, also have in mada that data is send as strings, so have in mind that you will need separate data with something in my case "|" and extract exact information you need like this: tokenat(Photon.EventData,0,"|"), index 0 would extract data before first "|" and index 1 would extract after first "|" etc.

  • CROmartin BronzeBeardGames

    OnActorLeave is the event which fired when a player leaves. The master client should update slots in the room properties in this event. It makes sense also to use OnActorJoin for slots allocation.

    Allocating slots in OnStartOfLayout will fail if the client is not yet connected at this point.

    The client can't update anything in OnDisconnect because it's already disconnected.

    OnActorLeave fires when player leaves, but for every client. It would be good if there was some kind of equivalent of "join room" for "leave room", which seems to fire only for exact client that joined. Am I understanding this events good?

    I handle slots this way: when player joins already connected clients send theirs information to newly connected client information trough "OnActorJoin" and then he creates him self with "join room" event, he needs to get information about existing clients so that he would know which slot is take and which isn't, everything fine, but it makes is so clumsy to do same when leaving as there isn't any equivalent of "join room" for "leav room", but I did it this way: while loop in "OnAcotrLeave" I set before loop a "counter" to "ActorNr" as this variable is equal to biggest client ID. While loop decrements each time and checks if ActorNrAt(counter)*-1 is equal to any ID stored in slot if it is then it sets slot to free(0) and stops the loop.

  • CROmartin in regards to your prev question, I think the way i got round it was to give each player an id (instead of using MyActorNr)...

    4 players > on join > id = 1, 2, 3, 4

    Add a 'room variable' called 'availableSlot'

    player 1 leaves > availableSlot = player1.id

    player 5 joins > player5.id = availableSlot (player 5s id becomes 1, to replace the player that just left).

    Hopefully this makes sense, might be a better way to do it with arrays

    Thank you on your answer, but can you tell me how did you locate which player is leaving?

  • Hi again!

    I don't have any idea how would I deal with this scenario so if someone has idea(actually I do have one): so I have players connected to room and when games starts every player gets same random word, but thing is I want them to get same word, is there possibility to set up calculation on server? For now I would go with masterActorNr doing this part, which is sufficient enough, but still if someone has other thoughts I would love to hear it.

    Thank you!

  • > but when first player leaves everything is lost, everyone loses connection. What can I do to stop "main lobby" from shutting down?

    This is wrong. When the master player leaves another player becomes master

    You are right, but I didn't know that player disconnects while browser tab isn't active and that is why another player wasn't assigned as master. How can I turn this off?

    Here is new question: MyActorNr doesn't decrement when player bellow leave, but ActorNrAt updates and tries to fill it self from beginning, is it possible to decrement MyActorNr?

    Thank you!

  • Hello everybody,

    When player connects, it connects onto "main lobby" or something like that however player automatically ends up in lobby or does it?

    Here is a thing, first player connects to server and creates room, everything fine other players can also create and join room between each other, but when first player leaves everything is lost, everyone loses connection. What can I do to stop "main lobby" from shutting down? Is there work around for such case? Well basically I could have game opened on PC all the time, but that sounds silly and I am sure that there must be some kind solution for it.

    Thanks in advance,

    Martin Starešinčić

  • Thank you on information, my problem was that project contained old function plugin so that caused problems.

  • JavaScript functions and functions in the event sheet are different. Typing "Functions." in an expression only displays functions in the event sheet.

    Thank you,

    I have few more questions if you know answers on it pleas answer.

    So that means there is no way that I can call function via JS?

    I can still access built in function via c3_callFunction externally?

    When I call c3_callFunction should I call it as some kind of property, like runtime.c3_callFunction?