bartalluyn's Forum Posts

  • Hi,

    check out my video tutorial on this, i think it does approximately what you want

    youtu.be/AzcBG4OYZU0

    cheers

  • Hi,

    if you haven't already, you can check my newest tutorial on probability tables:

    youtu.be/MQgzoBmCMng

    cheers!

  • Hi,

    you can check my youtube channel for the solitaire and multiplayer card game video's where there is a lot of shuffling and picking going on.

    youtu.be/E1zqEGLeCyI

    youtu.be/BpnkIL7XvvA

    cheers

  • what if you use the persist behavior?

    Make a separate instance variable and every time you change the frame, also set the instance variable to that frame number.

    On start of layout set frame to that instance variable

    I think the persist behavior should retain the instance variable

    but maybe I don't understand the business case fully...

  • According to me it depends if all the possible sprites are already predefined in the game.

    If so, you might just build an interface to save a sequence of sprites in an array.

    For example: you make 1 sprite with 10 possible frames. You create an array and populate with numbers 0 to 9 at runtime, and you make a routine to loop through the array and set the correct frame.

    If, on the other hand you want to upload your own custom sprites at runtime, I don't really know...

    You can find plenty of examples of looping through arrays on my youtube channel, for example in the bubble shooter

    youtu.be/Skc7JJOYSOI

    changing animation frames at runtime is easy, for example found in solitair when flipping cards around :

    youtu.be/E1zqEGLeCyI

    I hope to have helped you

  • You do not have permission to view this post

  • Hi,

    maybe my tutorial / template for a procedurally generated endless runner can help?

    youtu.be/AzcBG4OYZU0

    cheers

  • Great it's working for you!

    and, actually, the function in my first post would have done the trick according to me...

    but it's however you want to implement it of course

    * On function 'IsLeapYear'

    * Parameter 'year' (Number)

    -> Functions: Set return value (year%4) = 0 ? (year%100) = 0 ? (year%400) = 0 ? 1 : 0 : 1 : 0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • And did you get rid of the On PlayerCreated logic?

    I think should just be :

    On start of layout

    For loop (as is = ok)

    - Create object

    - Player set peerid = Multiplayer.PeerIDAt(LoopIndex)

    - associate player with Multiplayer.PeerIDAt(LoopIndex),

    IF Multiplayer.PeerIDAt(LoopIndex) = MyID

    enable local input prediction for player

    and lose the on created logic.

    what does that do?

  • have you tried this?

    + System: On start of layout

    -> System: Scroll to (ViewportWidth("Player")÷2, ViewportHeight("Player")÷2)

  • Could it be that you need to set the peerId to Multiplayer.PeerIDAt(LoopIndex), and not every player to the same peerId as you do now?

  • What about creating the player sprites on start of layout of the game layout, using the loop I mentioned...

  • As far as card games go, you can check out my tuts on youtube for a flying start.

    Creating solitaire : youtu.be/E1zqEGLeCyI

    Creating a multiplayer card game : youtu.be/BpnkIL7XvvA

    cheers

  • you should actually be able to do so. Can you share your code?

  • Nice find! I'm gonna use it.

    I find that if you change SpeedForID(0) and AngleForID(0) to SpeedAt(0) and AngleAt(0) it works fine.