Peej42's Recent Forum Activity

  • I have no idea what happened there. I've just run what I uploaded and it was just wrong!

    I've tried again and tested it this time. It's ok now.

    Basically, the idea is to grab one of the coloured blocks and drag it to the large pale blue square. This will eventually be the 'combining den'.

    Grab another and drop it to the same place.

    Press the 'combine' button and the two coloured blocks should mix together after a short wait.

    The combing isn't working as planned and so I've put this post on the forum in the hope I may get some help or better way of accomplishing what I set out to do.

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

  • Oooops, sorry.

    I think it's there now.

    First time I've done this so.....

    Anyway, it should be there now.

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

  • Hello again, guys.

    I figured I should post my work in progress question as I'm having quite lot of problems with it.

    I'm very new to Contruct and programming in general, having only been experimenting for a couple of weeks now.

    Would you lovely people have a look at this:

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

    (URL edited after confusion in following posts)

    The basic idea is to grab one of the little coloured box characters and drag it to the blue 'den'. The graphics are a little work in progress too, so forgive me.

    After dragging TWO coloured blocks into the den, I want them to mix in RGB format.

    This is where I've come unstuck.

    I just don't know how to do it.

    As you can see, by looking at the code, I have an array that stores the 'tint' values of each of the blocks onscreen.

    It's not finished yet, but I really don't know where to go next.

    Grabbing the three values of RGB from the array and adding them to the other block in the den, simply colours that block the same colour!

    That's not right.

    I've also realised that my way of doing things isn't gonna work well because I'd be left with only 4 combinations!

    Once I've added the red, green and blue, I'd be left with white and each array element would be 100. Therefore, no where else to go.

    I hope someone can help me out with this.

    It started as a simple idea in 'coloured block collecting' and ended up much more of a challenge that I envisaged.

    Also, is my programming ok? Can it be cleaned up at all?

    Like I say, I've very new at this and what you see here is two weeks or so of learning.

    Cheers.

  • I was thinking the way I've coded it is wrong.

  • Yeah, I saw that while searching for a solution.

    I'll be honest, I didn't understand it completely.

    I realised, shortly after posting my question that my game plan probably wont work anyway.

    Thinking out loud....

    If i add red-100,0,0

    to blue-0,0,100

    I get magenta.

    Theres no other combinations left other than adding green to magenta, giving white.

    All values will be 100 and the game technically over.

    I wanted to keep combining coloures, creating many different ones!!

    What can I do?

  • Hi guys.

    As the title suggests, I'm trying to find a way to stop two added values from going over a certain limit within the formula. Something like:

    a+b=(not to go over 100)

    Is it possible?

    I'm basically trying to add RGB values together to create RGB mixes using 'tint'. So if I add:

    Red=100,0,0

    Blue=0,0,100

    I get magenta: 100,0,100.

    Further down the line I envisage the numbers being mixed totalling more than 100!

  • Yeah, I can't get it to work.

    As I understand it there's also a slightly hidden command: loopindex("name of loop") but that doesn't work either.

    I tried: loopindex("x")

  • You've been a great help so far with my efforts so I hoped someone could answer my next question:

    When running through an array with For Each X Element, does loop index not work?

    Cheers

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello again.

    Could someone please help me out.

    I have a bunch of different coloured blocks on the screen, each block has the variable "Name".

    So I have ORANGE, BLUE, YELLOW, RED, GREEN.

    Each block is part of the family "Blocks"

    What I need to be able to do is pick out the block "named" say, RED from a bunch of other blocks and move it. How do I go about picking the RED block?

    I've tried:

    SYSTEM>Pick Blocks where Block.Name = "Red" > (Action>) Blocks>Set position (190,150)

    But that resulted in moving ALL the blocks from the family to 190,150!

    Cheers.

  • Hi guys.

    How to I use 'accelerate towards point' effectively?

    I have my object accelerating towards the point I desire but the object then overshoots the point and continues past!

    How can I control when the point is reached?

  • Thanks for the reply Justifun.

    I got quite far since posting my original question and I have the names of my objects stored in an array quite nicely.

    So, I have something like this:

    0,red,yellow,blue

    red,0,0,0

    yellow,0,0,0

    blue,0,0,0

    As you can see, it's basically a grid with names across the top and down the side.

    What I wanted to do next.... which I can't figure out, is cross reference the grid.

    I wanna be able to look along the X axis (Red) then down the Y axis (Yellow) and were the two meet up, set to orange! Then the same with X=Yellow, Y=Red....

    Then, later on, I want to be able to do the same thing with looking up where the X and Y meet and have it result in 'orange'. You get what I mean, I'm sure.

    Where the X=red and the Y=blue, that would be purple and so forth.

    I hope you can help as I'm quite stuck on this part.

    Cheers.

  • How do I: Store the NAME of objects onscreen to an array?

    I have 3 objects on screen (for now). They're all in the same family.

    How do I code a system that goes through the objects 1 by 1 and saves their NAME(s) to a 3 by 3 array, at position X=0 for each?

Peej42's avatar

Peej42

Member since 26 Oct, 2014

None one is following Peej42 yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies