99Instances2Go's Forum Posts

  • It is nice to see that you plugin-developer-guys do this hell of an afford to get those plugins into c2.3.

    It is even nicer to see that you plugin-developer-guys work together to get that gd job done.

    Appreciated & Many Thanks.

    99.

  • My gosh MKP1000. I saw your other question in your other topic.

    It looks/feels like you never rode a bike and instantly want to participate in a Bike Parkour.

    May i suggest that you first create a chat room, then worry about bubbles.

    Now, i can tell you that a chat room is way out of my league, but then again, i am into Construct for only 17 months (close to).

    So may i do a second suggestion. Plz follow at least 20 tutorials, so you understand the basics.

    Then build something way more easy to start with.

  • Everything you ask is possible. You just have to get familiar with a few concepts.

    -

    Each layout can have its personal event sheet. You assign a event sheet to a layout in the layout's properties (in the left pane).

    But, and that is interesting, you can have event sheets that are not assigned to a layout. You can 'include' those into an assigned event sheet. So, say, you have a bunch of events that are different for each layout, bring them in an assigned event sheet. You have a bunch of events that are the same for each layout, bring them in a unassigned and include them in an assigned event sheet.

    https://www.scirra.com/manual/82/includes

    -

    Global / local objects

    The property 'global' for an object can be "yes" or "no".

    A global object (some are global by default, an array by example) will be 'just there' once it is created.

    If you create a global object in the first layout, it will be present in every layout. And it wil keep its personal info, instance variables .... etc.

    If you jump to another layout, you just take a global object with you. This also means, if that object is present in the next layout, you end up with 2 instance of that object, that one that survived the layout switch + the one that is already present in that next layout.

    Local objects stay in the layout that they are created in. And they will just forget all their (non default) personal stuff (instance variables) when leaving that layout. Default personal stuff is everything that you have set in the layout editor. Everything that you changed to an object during runtime is non default stuff, so that will be all forgotten.

    This is handy, but not always wanted. To avoid this use the Persist behavior.

    https://www.scirra.com/manual/161/persist

    An object with Persist attached to will not forget its personal stuff. So if you leave that layout, and come back, those objects will be the same as you left them.

    -

    Global / local layers.

    Is a layer property. Every object on a global layer with a certain "NAME" will be auto recreated on a layer with the same "NAME" when switching layouts. Say you switch layouts. In the first layout you have a global layer named "HUD". On that layer you have objects. In the next layout you have also a layer named "HUD", but holding not 1 object. When you switch layout, all objects that are on "HUD" in the first layout, will be auto created on the layer with name "HUD" in the second layout.

    https://www.scirra.com/tutorials/594/bu ... terface-ui

    I really have no words to describe how handy this is.

    -

    Global variables.

    Global variables in 1 event sheet are accessible/up-to-change in every event sheet.

    This also means that, if you give each event sheet its own global variables, you will end up with a big mess.

    Rather, make 1 unassigned event sheet, only for the global variables. Dont even include that event sheet.

    Because the fact that they are global, you can use them to get values from one to another layout. They keep there values when changing layouts.

    -

    Other ways to make values survive a layout change.

    Arrays and dictionaries are global objects by default. They do not suffer from the 'duplication' danger that goes with global objects, because they dont have a 'face' in the layout editor. (you can make instances during runtime, but lets avoid that for now)

    Since they are global, you can store values in them, and those values will survive a layout change.

    Perfect to exchange info between layouts.

    -

    On start/end of layout.

    Those conditions are triggers. They run (only once) when a start/end is detected.

    And yes, they for sure run their actions/sub events when you switch layouts.

    You must think those trough, do you want this too happen ?

    If not, you got to constrain them from running every time you enter/leave the layout. This is typical done by evaluating/setting an instance variable of an object with Persist attached.

    -

    Why use Persist ?

    Well, global sprites are a nice thing. But also a PITA.

    Usually you want to design a layout in the layout editor using instances of an object. Say, you switch layouts. In the first layout you designed a maze using instances of 1 sprite. In the second layout you do the same. If you make that sprite global, you will bring the instances created in the first layout with you to the second layout. And that is a mess you dont want.

    So, rather use 'local' objects with the Persist behavior attached. They only live in their layout, and they keep their personal stuff between layout changes.

    -

    Switching layouts 'offline'.

    That is another history. Got to do some tutorials about 'Local Storage'.

    I hope i covered most of the 'layout switch' issues.

  • There is no difference between using a text displaying a 'non Japanese' and a 'Japanese' number.

    I suppose there are plenty of fonts using Japanese characters.

    If you use a font, that font has to be on the player's device, but that is true for every font.

    So, if you are using a 'rare' font, you should use SpriteFonts. Even besides that i read reports everywhere that SpriteFonts perform better on mobile devices.

    https://www.scirra.com/manual/166/sprite-font

    https://www.scirra.com/tutorials/629/sp ... when-where

    To connect them to a coin (graphical wise) , use the pin behavior.

    https://www.scirra.com/manual/99/pin

    To connect them to a coin (logical, and not using families) ...

    Use a container

    https://www.scirra.com/manual/150/containers

  • In the series 'Do Not Use Wait For Timings'.

    https://www.dropbox.com/s/k6x23f6s5swt5 ... .capx?dl=0

    Let the behavior take care of the acceleration. It is designed 4 that.

    Pair the animation to the speed.

    The 'Bound to layout' will not 'suddenly' stop the speed in the behavior when the player is reaching the boundary's. So the player looks 'stopped', but the behavior just keeps deacceleration. So .. the speed is not zero. although the player looks like the speed is zero. That is why the player will not intermediately start to move after hitting the a boundary. It will first finish the deacceleration.

    This i why i offer you a better solution for the boundary's.

  • Nah, it is ok, i can debug mine, hard if i dont understand your logic, which is to expect.

    But, say, how do you detect a 'Straight' ?

  • And you need an other payout for 'four of a kind', and for the special case of 'four of a kind': the 'Five of a kind'. That is 4 aces + 1 joker.

  • You did not mention "Joker Poker Video Poker" at all.

    I dont know if there is only 1 joker in poker, i suppose there is.

    Just add the joker to a new animation. Now it needs its own chance calculation. Because it is not the same chance to occur as a regular card. I guess it is 1 on 53.

    so ... after choosing the cards and if ... floor(random(0,54) = 0 then pick a random card and change its face to a joker.

    Store the fact that there is a joker or not in a global variable. That will easy it up already some, later on.

    Now the easy method would be a loop.

    If there is a joker ..... loop all the 'checking' while iterating 'the card that has the face of the joker' to be every other card in the pack. Add the result for each check to a dictionary.

    If there is a joker

    __For all colors

    ___For all faces

    ______set joker card to card (color ... face)

    ______do the check

    ______store result in a dictionary

    Else

    _do the check

    _store result in a dictionary

    Choose highest payout from dictionary holding the results. (i suppose you dont want to cheat on it)

  • That is actual very easy to show, so you dont have to take me on my word.

    https://www.dropbox.com/s/ezceqtejd2u3x ... .capx?dl=0

    In fact, it is not exactly known when a trigger fires insight the tick. For the 'hardware readers' (mouse, keyboard, Ajax) there is no rule. It depends on the device and on the browser. Some triggers just have to run at the start of a tick, else they dont make sense. The 'On landed' by instance. Platform has a 'push out of solid' routine. Evaluating a position under 'On landed' should give the position after the 'push out of solid', even if you set the position to something else later in the events.

    The only thing that is for sure, is that a trigger fires only once in the same tick.

    A Group is just a condition as all other conditions. It has a system Boolean 'activated', false or true. And it will evaluate that Boolean every tick. Every condition under a condition is a sub condition.

    So, again. What happens of you bury a trigger (there are false triggers too) deep (or not that deep) down in sub events ? It triggers and looks up to find out if it can run its actions/subs.

    Do not quote me (stealing the possibility for me to erase my dumb comments, and dude, this whole forum has dumb post from me, till i learned something about the subject) and then offer to erase your own posts. Tyvm.

  • the code is always run downwards it would not go up to check if the group is active. if the group was not active the key press trigger will not even run.

    As you wish & whatever dude.

    Allow me to quote some one smarter

    --- left out a few lines here--

    Triggers in subevents check all their parent events are true, but the "else" is checked on its own without referring to previous events in that case, so it probably doesn't do what you want.

  • Haha, you quoted me, now i cant erase my stupid comments. Here goes :

    Legal maximum for Acurrent = Cmax

    Possible illegal maximum >> Bincome + Acurrent = bigger then Cmax

    Everything bigger then Cmax goes back to Bincome

    So .....

    Local variable temp

    temp = min(Bincome + Acurrent,Cmax)

    Bincome = (Bincome + Acurrent) - temp

    Acurrent = temp

    https://www.dropbox.com/s/yajxehyx8sxre ... .capx?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No, that is wrong, i suppose Acurrent cant be less than zero too.

  • (Cmax - Acurrent) = MaxFill

    If Bincome > MaxFill

    . .... then NewAcurrent = Acurrent - MaxFill

    & NewBincome = Bincome - MaxFill

    If Bincome <= MaxFill

    . ... then NewAcurrent = Acurrent - Bincome & NewBincome = zero

    Or getting MaxFill out there again (it explained well with)

    If Bincome > (Cmax - Acurrent)

    . .... then NewAcurrent = Acurrent - (Cmax - Acurrent)

    & NewBincome = Bincome - (Cmax - Acurrent)

    If Bincome <= (Cmax - Acurrent)

    . ... then NewAcurrent = Acurrent - Bincome

    & NewBincome = zero

    Under the assumption that Bincome cant be negative.

  • You do not have permission to view this post