WackyToaster's Recent Forum Activity

  • You need to adjust the image points on all the sprite images so they are consistent and it should work how you made it.

    I would have the player and the grabber separated. The grabber could be a 9patch object so you can just change the height smoothly to make it expand up.

  • Sounds more or less like a classic Null-Object. I´d take that.

  • Check the layer properties, the layer may have a background set.

  • Short answer: yes, events are executed top to bottom.

  • You do not have permission to view this post

  • Hell yeah!

  • A tutorial on how to stop slacking off. :V

  • You probably need to pick the spritefont object. You say you choose the spritefont that fits the condition, however, I do not see any choosing happening in the events. How exactly are you choosing it?

    Right now all spritefont objects in the layout will be picked, that is why you always end up with the start game (simply because it comes first in line) Basically you have to know what spritefont object is currently selected and pick it inside the "on z pressed" event.

  • Set animation frame to Self.AnimationFrame = 0 ? 1 : 0

    I think dops method also works. It resolves to 1 if the frame is 0 and vice versa

  • Each vertical row is basically a page by doing so. Correct? This would also mean I could use the array.X as the variable to set the page navigation right?

    Exactly :)

    What I don't fully understand is why you subtract 1 from the 0-based X? Set at XY. X = array.width-1?

    When X is set to 0, it basically means the width of the array is 0, as in 0 fields. As it shows in your screenshot, Elements: 0. The moment you push your first note, your array becomes width 1. So right after when you want to set the type/content, you need to access the 0th field and you need to subtract 1 from width to get the last field that was added.

    In other words, an array with a width of 3 has three elements that you can access with X=0, X=1, X=2. An array with width 1 has one element that is X=0. And an array with width 0 has no elements to access.

  • 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,...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
WackyToaster's avatar

WackyToaster

Member since 18 Feb, 2014

Twitter
WackyToaster has 26 followers

Connect with WackyToaster

Blogs