WackyToaster's Recent Forum Activity

  • Something like this wackytoaster.at/parachute/Board.c3p

    I also changed the diceroll to choose(1,2,3,4,5,6) instead of round(random(1,6)). The reason is that with round(random(1,6)) you are actually less likely to get 1 or 6. Anything from 1 to 1.4999 will result in 1, so a range of ~0.5 where anything from 1.5 to 2.4999 will result in 2, so a range of ~1. Same for 6.

  • Sooooo I guess I need an array for each, right?

    Well, probably not. I´d use one array for all of them. Of course there could be a use case where you need them separated. For simplicity, I´d just say 1 page = 1 note.

    So each entry on the X axis is a note, and entries on the Y axis are the notes contents. Let´s assume each note has title, type, content

    You start out with an empty array on the X axis and you need 3 fields on the Y axis so that would be a 0,3,1 sized array.

    You find any note, you use the arrays push action. Most likely you´ll want to push back on X axis. Push the title of the note.

    Right after, you need to set the type and content, for that you can use Set at XY. X = array.width-1 (arrays are 0-based) and Y = 1 for the type and 2 for the content.

    And for the notebook navigation, you just need one variable (e.g. currentPage) that tells you what page you are on. Since you always show two pages at once, you can increment the variable by two whenever you navigate and simply repeat the actions below.

    So you start out on page 1. You can now read the values of the array based on the currentPage variable. Again, don´t forget that arrays are 0-based.

    Array.At(currentPage-1, 0, 1) = title of the note

    Array.At(currentPage-1, 1, 1) = type of the note

    Array.At(currentPage-1, 2, 1) = content of the note

    (This is for the left page, for the right page use Array.At(currentPage, 0,....)

    Now you need to just fill in the data on the pages. So probably something like, get the title, add it into a textfield on top of the page. Get the type (since you said there are different kind of notes you probably want to know how to handle the content), basically IF type = A do this, IF type = B do something a bit different. Then you get the content and also fill it in.

    What data you save into the content is up to you, could just be a tokenized string A|B|C where you can use tokenat to split it up, could be some JSON content that you then parse and use, could be an image that you then show on the page,...

  • Heh ok, allerdings mögen die Mods das nicht weil das ein englischsprachiges Forum ist, bzw. sollte man zumindest eine Übersetzung auch machen, und wenns nur Google Translate ist. Was ich mit einfacher meinte ist eigentlich nur dass es ein paar Sachen gibt die ich nicht ganz nachvollziehn kann. Z.B. sehe ich keinen Grund wieso du PositionN und PositionT in den Board Instanzen hast, das gehört für mich definitiv in die Player Instanz. Und auch das "Player is overlapping Board" ist nicht optimal, es funktioniert zwar, läuft aber auch grundlos 60 Mal die Sekunde. Ist für moderne PCs und sogar Handys meist egal, aber bei Handys kann es dann doch leichter passieren dass es mal zuviel wird und du fps Einbrüche hast. Vor allem wenn es mehrere solche Stellen im Code gibt die vielleicht auch noch mehr machen als nur Variablen zu setzen.

    ---

    Heh ok, although the Mods don´t like that since this is an english Forum and you should at least add a translation, even if it´s just with Google Translate. What I meant with easier is just that there are some things that I don´t fully understand. E.G. I don´t see a reason why you have PositionN and PositionT in the board instances, for me this defenitely belongs into the player instance. And the "Player is overlapping Board" is not optimal, it may work but it needlessly runs 60 times per second. For modern PCs and even phones this mostly doesn´t matter, but with phones you can eventually still run into fps drops. Especially if you have several cases in the code that do this that may also do more work than to just set some variables.

  • No idea, here´s the file. Works fine for me. Maybe you forgot to adjust one of the variables in the board fields when you changed it to 20?

    wackytoaster.at/parachute/Boardgame%20Movement.c3p

  • There is probably an easier/better way to handle all the movement but I adjusted your example.

    I marked the changes with a red dot. For understanding developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator

    It´s basically just a shorter way of doing an IF statement.

  • You probably want to look into Arrays.

    construct.net/en/make-games/manuals/construct-3/plugin-reference/array

    Basically you have an initially empty array, and whenever you pick one of the notes up, you push that to the array. This way there will be no gaps and the notes will appear in the order you picked them up.

    You don't allow your users to own the product you are selling, and keep it hostage indefinitely unless they pay up?

    It´s not a product, it´s a service.

    What if I don't have a stable income and do this as a hobby?

    All things considered, that´s your problem.

    I've found I'm really not interested in paying several hundred dollars for software that I only intermittently use.

    There´s monthly options.

    This practice, I feel, violates basic consumer rights.

    No

  • I hope it´s coming to the forums soon. :)

  • Mhmm I guess it's debateable. I don't really see much of an issue having 1000 different function names as long as I can use grouping and eventsheets to keep everything tidy.

    I feel like using the same function name for different things sort of undermines the concept of a function.

    I wonder how other point&click games handled that but my guess is they also used individual functions of some sort.

  • dop2000

    Interesting case. Indeed the usual way would be to have one huge function that does all the things but it‘s very understandable why you wouldn‘t want that. You‘d basically need something that extends the function. Like „run function X and after X also run Y“ and „Y“ can be different from eventsheet to eventsheet. I don‘t think there is anything out of the box that could do that.

    I have a little custom behavior I use for buttons that could help. It essentially just calls a function (specified per object instance) via an action. You could have one action in the „arrived“ function that calls whatever function you specified in the picked instance that arrived.

    I wanted to upload this plugin a while ago anyway but never got to it, now I finally did. Maybe that‘s of use for you.

    construct.net/en/make-games/addons/404/button

  • Why would you actually need duplicate functions? That doesn‘t sound that great. What‘s the exact use case you have? Just curious :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I see, thanks for the info. So it probably was a recent update on chromes side.

WackyToaster's avatar

WackyToaster

Member since 18 Feb, 2014

Twitter
WackyToaster has 25 followers

Connect with WackyToaster

Blogs