hertles's Forum Posts

  • Hahaha I think It's a better idea ! haha, I'll try, thank you very much!

  • Just figured it out. It was that I was not putting the local variables as "static"

  • I think you understood. I did not know about local variables. I'm using it now just to track the quantity of each text object. But there is a problem. The local variables value don't get subtracted when I click the text object. It works with global variables and I don't know why.

  • I'm prototyping this kind of visual novel. I wanted that in some part of the game, there were option of picking up itens in text format like "take sword [1]","take salt [10]", "take piece of bread [3]. And when the text objct was clicked, it would subtract the quantity of the "item", and when it was 0, the text object would disappear.

    I'm ok with adding the item to the inventory which is an array

    but I don't know how I would quantify the itens around the game. Let me explain

    For performance reasons, I've only created 4 text objetcts that could be clicked as a item. And I would like that this text object would "carry the Id" and quantity of every item in every part of the game (without me coming back to the place, and the item was back there)

    I tought about using array to carry the itens quantity of each scene. But I would have to set a xy value for each item in every scene. So I was wondering if any of you guys have a better way to do this.

    I'm not the best at using construct, so I'm just searching for a superficial explanation of how I would have to do this if is too complex. Don't mind me if I don't understand your answer. I know an inventory system and item system can be very complex, but I'm trying to make one as simple as possible for learning purposes.

    Tagged:

  • Yeah, I mistyped... I will test it out, thanks!

  • Don't mind me if I do, but I'm using c2 free version. So I have to insert the values to the array manually.

    at the moment, I'm trying to make an inventory with text objects. I wish to make them show as:

    - Salt 0 10$ 1kg"

    I setted the array values like this:

    -At layout start

    - set value at (0,0) to Salt //name of the item 1

    - set value at (0,1) to 0 // quantity

    - set value at (0,2) to 10 // price

    - set value at (0,3) to 1 // weight

    - set value at (0,0) to Food //name of the item 2

    - set value at (0,1) to 0 // quantity

    - set value at (0,2) to 5 // price

    - set value at (0,3) to 5 // weight

    And so on...

    to set the text object I used the "array.at" like this:

    set text to: "-" &array.At(0, 0)& " " & array.At(0, 1) &newline& array.At(0, 2) & "$ " & array.At(0, 3) & "kg"

    And I did this with both items (I wish to create more)

    It worked, but it seems that this is very inefficient method to set text. Does anyone know an expression, or a way that I can organize the array to make it better?

    I tried to use expressions like array.curX or curY or Loop index. But to be honest, I don't really understand them enough to make them work. But somehow I THINK that is the solution.

    Tagged:

  • I'm think this is the stupiest question I made here, but here's the problem.

    I have 3 objects

    -Night mask (a black sprite I use to give a night effect)

    -Character sprite animation

    -Stars background

    I want the Character object to be behind the Night mask, and the stars should be in the layer behind.

    The problem is that I also want the stars to have It's original colours (white) But the night mask makes it grey.

    I'll try to explain better sending a image on what I tried mainly.

  • You can use a combination of 'on created' and then as an action either put a wait or use timer behaviour. You can toggle ability to rotate with a variable, so rotate clockwise only while var=1, so the object initially has var=0 then after the wait or the timer you set the var to 1.

    It worked, thank you!

  • I'm trying to do some kind of clockhand. I managed to make it rotate using "rotate clockwise" but it does not wait to rotate. I wanted to make it to when created, wait 1 second, and starts spining.

    Tagged:

  • Rotate Sprite (loopindex*6) degrees

    This is it man! thank you so much. Now, is there a way to create this objects in other angles and multiple times? Like three times?

    Edit: Just discovered, it's just to write (angle I want)*LoopIndex*1. And to create multiple slices is just make multiple events of the same in other angles. Thanks man, I would never discover without you.

  • I think citron2010 meant to ask if you are making a game or just an image? An image would be easier to create in any graphic editor.

    Oh Sure, I think I'm making a game? An image would be easier, but I wanted to make differente patterns of the area. Like in shadow hearts

    In Construct you can do this, if you need a clock with 60 segments:

    I'll try this, thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Any reason you're doing this in C3 and not in someone like Inkscape?

    I don't know what inkscape is...neither how to use. I wish I could stick to construct

  • I did it like this and it worked, but it is the less effective way, I cant change the pizza angle and thickness

  • I'm trying to create a Shadow's Heart Judgment ring like clock. For this, I wanted to create the pizza shape angles first. I tried to make a loop to create 10 lines with 1 angle difference between them but is not working. Is the first time I'm working with loops.

  • Oh boi, thank you guys very much! It would be too much to ask for suggestions about how to learn this DATA stuff for what I'm trying to do? (preferably xml or array cus I still use c2 but I could still try to buy c3 for the json)