BudBloom's Forum Posts

  • I'm sorry I don't think I understand how to do any of that.

  • Not sure how else to word it but like for example how in the tile based movement behavior you can have it so it moves cell by by cell. Are there ways to make drag and drop snap to cells too? Or to make turret behaviors target cells or bullets to damage every enemy in that same cell etc? Or change the color of the cells a unit can move to the way fire emblem does it? And so on?

  • You don't need to know how to use all the features of an array to use them. All arrays do is store multiple values in them, and all you need to be able to do is set the size, set values, and get values.

    Arrays indexes are 0 based, which means to access the first element of an array the expression would be Array.At(0), and the second would be Array.At(1), and so on...

    If you ever try to set a value in a cell that doesn't exist it will do nothing, and if you try to get a value from a cell that doesn't exist you'll get 0.

    And as noted above a way you can do what you're asking in your OP will look like this:

    So just literally changing a number variable to access different cells.

    The push action just increases the size of the array by 1 and places a value in the new cell. Array.CurValue, CurX, etc... are used when you use the "for each element" condition. You really don't really need to use those things. You could use normal event loops with loopindex as well. Overall arrays tend to be more closely related to traditional programming and is more abstract sometimes to understand them.

    Figuered it out. If you do it that way it adds one to "X", so to make it go down, you do it as Array.At(0,index)

  • You don't need to know how to use all the features of an array to use them. All arrays do is store multiple values in them, and all you need to be able to do is set the size, set values, and get values.

    Arrays indexes are 0 based, which means to access the first element of an array the expression would be Array.At(0), and the second would be Array.At(1), and so on...

    If you ever try to set a value in a cell that doesn't exist it will do nothing, and if you try to get a value from a cell that doesn't exist you'll get 0.

    And as noted above a way you can do what you're asking in your OP will look like this:

    So just literally changing a number variable to access different cells.

    The push action just increases the size of the array by 1 and places a value in the new cell. Array.CurValue, CurX, etc... are used when you use the "for each element" condition. You really don't really need to use those things. You could use normal event loops with loopindex as well. Overall arrays tend to be more closely related to traditional programming and is more abstract sometimes to understand them.

    It's still not working. Like always I can get it to display the first cell but afterwards it still only displays "0"

  • I read the different tutorials I could find on this site and a few youtube ones I found. I sort of get how Arrays work, but I feel like I still don't understand how to work with them with Events.

    I get what cells are and how to make a "2d" array, import a Json file and load it to an Array that is big enough. I know as much as how to display text from a specific cell but I have no clue how to use events to cycle through an array or make loops. I've open up some of the examples that use arrays like that one VN one, but I didn't understand how the events they used worked the way they made them work.

    I don't understand what pushing or back or kur mean as far as events go or you would use an Array to make a multiple choice thing.

  • > I just don't know how to execute it in the engine.

    Exactly as described in the comment above.

    There are also two official examples, search for "visual novel" in the example browser. One uses an array, another - flowcharts.

    I tried to look at the examples before and couldn't understand how they did anything in either one. The tutorial for arrays and such doesn't really explain it very well, like what does push or back or cur actually mean or how they work or how they work together in events. From the start I wanted to know how do I set an event loop so that everytime I press click it can cycle through the array. So far I don't have the answer.

  • I mean, I understand the idea of how to do it. I just don't know how to execute it in the engine.

  • I am not sure if this makes sense, but I was trying to make a visual novel like text display. I am trying to make it so every time I left click it moves what cell is being displayed as text down in order.

  • Thanks, that worked

  • I looked at the tutorial on the site and a few videos, so I thought it would be easy enough. It seemed like it was. But I feel like I have no idea what I am doing.

    I created an array under files. Inserted the Array, Json and AJAX objects. Then, put an on layout load action from AJAX to Request Project File from the array file I created at first. And I am supposed to I think use the parse action from the JSON object somehow? Maybe?

    EDIT: I copied and pasted data from a spreadsheet on the array file I made first. And I made sure to set the Array object dimensions so it would have the same cells, 3 width and 32 rows, 1 depth.

  • I don't think that will really help me with what I'm trying to do. I want to keep the text the same size as it displays in the dialogue box. I'm not sure what the action in the script sheet will do if I'm typing text in an array or converting a text document to a Json file to grab the lines from.

  • Trying to make a visual novel type dialogue. In the instructions it says that if text is bigger than the text box it wouldn't display.

    More over, how can I can tell if text in a cell should be broken up? Or is there a way for the engine to break up text in a cell?

  • Ok, I tried putting it in families and using frame tags instead of giving them instance variables and it works perfectly. I was able to get past the part I was stuck at, making the cards destroy themselves and then create an upgraded version. With this method only one of the two cards is destroyed since I'm comparing family to sprite, which then made it super simple to just add an event to change the frame on the one that doesn't get destroyed. So it all ended up being way easier. Thanks so much to all of you that responded to this and helped me.

  • I'm trying to follow along but I'm still not sure how putting the cards in a family helps if I did it that way unless you mean making each card face it's own object under a "card family" rather than one sprite object where every card is a separate frame.

    I don't understand how to make it so it only works with specific variables. When I make an event I pick the compare variables to select the card face. But then when I do something like "destroy" or change animation frame it does it for all of them. Like, when I make a new event I can compare variables so I can pick which card I want the event to effect. But then when I pick the event action I don't see a way to compare those variables to limit it to only that card face.

    So it looks something like event is compare variables, then sub condition when collision/overlap. Then event action. And it's the event action that is giving me problems because I don't know how to make it so when it destroys the card object it only destroys it if it shares the same variable.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I still can't get it to work. I thought I could change the direction platform behavior objects fell and that would make lining up/setting the cards easier, but I couldn't find how.

    Using instance variables didn't really make it work. I tried using frame tags too. I am not sure how R0J0hound recommended. The problem right now is that I can't figuere out how to make it so that cards that have the same variable/frametag/are-in-same-animation-and-frame to interact the way I need them to without interacting with every version of that object.