dos88's Recent Forum Activity

  • I keep having an issue where my image points keep getting rounded..

    I used to be able to simply set say for example x 1.5 y 1.5 but Now if I try to set a decimal to 1.5 it just rounds to 2... Is this a bug or am I missing something ?

  • If what you're trying to do is create and edit a player's individual "sacrifice" bar during gameplay, you need to add PeerID's to the objects belonging to each player, add those values when they connect, and then pick, by comparison of their PeerID equal to that of the peer sending the message, them when you need to check or modify a value associated with that player's instance of the object.

    I am attempting to have 1 bar update for all users currently connected as well as when new players connect have that bar update. For example, if peer 1 adds 10 to the bar and peer 2 adds 5 equalizing 15 and a new peer joins I need the bar to update to 15 for the new peer.

    It's meant to be cooperative, so that all peers contribute to the bar itself and when a new player joins he needs to be updated to whatever the bar is currently at.

    [Solved]

    I just got it working, may not be the best performing or the prettiest to look at but it functions the way I need it to at least for now. I used your idea for the comparison and stuck it under the host side after the peer is created. I did not have to use the peerid thing :3

    So my issue way that I had the variable being updated from the individual peer and not the host which is what I needed, so now the Sacrifice variable is automatically updated for all peers currently in the room and all those who join in. Now I just need to figure out how to auto update the sacrifice image bar itself in the same way, it does update after a player adds to the sacrifice variable though.

    [Final update to this post.]

    Figured out how to update the image as well

  • So I am trying to have 1 object & 1 objects instant variable sync for all peers who are currently in the room and update for all peers who then connect.

    Here is what I have going on right now.

    I can get it to work for individual peers but I can't seem to have the variable & the object update there current status for all currently connected peers & new joining peers. e.g the first peers adds 40 to the variable, a new peer connects and automatically has that variable updated to 40.

    Any help ?

  • What you could do is, instead of using global variables, use Photon's property of actor. It is synced between all players in the room automatically.

    Thanks for the reply!

    Well I did stumble onto that yesterday lol. but my issue is now since I have the players angle set to the mouse I can't seem to get it across to every other player. I have no idea how to sync that up xD

    PS. I am trying to learn by doing :3

  • So I am playing around with Photon and i'm trying to sync up movement & attack animations which use global variables yet I have no idea where to begin since there is no actual documentation on photon/c2 and the demos don't help at all. Anyone know where I can start rofl ?

  • Thanks man! that's what I needed

  • Thanks guys! the examples helped a ton!

    My only problem is that I have a specific image point setup for each grid block which is "1"

    All I need to know now is how to add that to the existing examples.

    Been trying a few different variations but I can't seem to add the image point to the position, always ends up telling me I cannot add a period. lol

    obj_playerGrid.ImagePointX

  • Yeah lol, I don't understand.

    Thanks for trying to help me though.

  • Ok so I have a grid of 3x3 setup in 64x64, each block in the 3x3 grid has a "GridBlock Number" instance variable set too it, I am trying to spawn my player random on one of the grid blocks, I have tried quite a few different things like "choose(obj_playerGrid.GridBlock&1,2,3)" which had no effect other than setting the player on the top left corner. Is there anyway for my to set player position to object and than have it randomly select a GridBlock variable number say 0 - 8 and place the player correctly on that block ?

  • dop2000

    Thanks! Those are some good resources, but I am still a bit lost on

    Say I.E I have a global variable var_Name = "John; Sally; Joe"

    Now say the text choose Sally randomly out of that, how would I save that specific information is what I need to know, I went threw most of that information you gave and I can't seem to figure that part out :#

  • Have been learning to use Photon so I thought I would make an online roguelike.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, so I am creating a random character creation sheet which looks at a global variable such as var_Name and sets ones of the variable text to the text file I have on the layout using this

    tokenat(var_Name,floor(random(tokencount(var_Name,";"))),";")[/code:3mwzwluu]
    
    Now I have everything working so far but I need to find a way to save the randomly chosen information either locally or online or even both, so that I can allow the player to reload this data and be able to call it up & reference it in game, so my overall question, is there any way I can save a randomly chosen piece of text from a global variable into a savefile.
dos88's avatar

dos88

Member since 21 Nov, 2011

None one is following dos88 yet!

Trophy Case

  • 13-Year Club
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

16/44
How to earn trophies