brunopalermo's Forum Posts

  • Have you tried Bullet behavior?

    Here's a demo made with Bullet behavior: http://constructgamelab.000webhostapp.com/boomerang

    Is that what you're looking for?

    Cheers.

  • I can't even understand the problem by the two images. You should detail it more if you have ay hope of getting any help.

    Cheers.

  • If I get it right, you want to use an event sheet from the asset pack in your own project, right? If that's the case, just create an empty event sheet on your project, select all events from the other event sheet, copy and paste into your empty sheet.

    You will need to have all variables and objects, with the same names, in your project, though, or it won't paste.

    Hope this helps. Cheers!

  • So, it's basicaly the same thing we said before. You use an index and delete it, right?

  • , how does that avoid repetition?

  • And here's a capx...

    https://www.dropbox.com/s/m4lscjllmh33h ... .capx?dl=1

    Cheers.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Array delete works perfectly well.

    Here's how.

    myArray = "1,2,3,4,5,6,7,8,9,10"
    
    myArray.delete(3) would give you
    
    myArray = "1,2,3,5,6,7,8,9,10"
    
    If you, then, did a myArray.delete(6), it would give you
    
    myArray = "1,2,3,5,6,7,9,10"
    
    [/code:mslxkoou]
    
    It doesn't "just pops the value off the back". It removes the value at the specific index like in any other programming language. 
    
    The action array.pop is the one that pops a value off the back (or the front) of an array. Which is, basicaly, the inverse of what array.push does, adding a  value at the back or front of an array.
    
    The problem with your first code, I'm guessing, since you didn't share a capx, is that you are picking a number and deleting another. You must delete the index you picked, or else you will see repetition...
  • You can calculate the speed and angle by checking the change in position while dragging.

    Here's an example: https://www.dropbox.com/s/v3fnbx0zulot9 ... .capx?dl=1

    Hope this helps. Cheers!

  • Ok... Short explanation.

    Most events are IF statements on themselves (while something is true, do something). Some, the ones with a green arrow on the gear, are Triggers (when something happens, do something once). Others, the ones with a symbol similar to a reload icon on the gear, are Loops (do something a given number of times) and a few, like Trigger once while true or Every X seconds, are instructions (the first one converts an IF statement into a trigger event and the other is basicaly a timed loop).

    You can put more than one event together. This would be the coding equivalent of a AND block. Also, if you right click the event block you can change it into an OR block, by selecting Make 'Or' block. IF statements can be turned into IF NOT statements by right-clicking them, not the block, and selecting Invert. You can add an Else statement by right-clicking an IF statement and selecting Add> Add Else. You can also nest conditions.

    Lastly, actions are the stuf that happens if the conditions are true, the triggers are triggered or the loops are run. They're listed on the rightmost column and are performed in top-down order.

    Most things you can do with actual coding can be done in Construct if you understand how it works and you're creative to work-around some of the limitations a visual coding framework would necessarily have.

    Hope this helps. Cheers!

  • You should really take a while and have a thorough look at the interface, conditions and actions. Read the manual, whatever. The actions and events are there, you're just not looking for them in the right place, I guess.

    Cheers.

  • You do not have permission to view this post

  • I'm not sure you can do that. I know it was possible in Flash. You just got the image and scanned it for a certain rgb. Not trivial, but feasible. Not sure it can be done with Construct 2.

  • Hi, you don't have to detect a color to do what you want. You can simply detect a specific object which happens to be red. There are several ways to accomplish this:

    - If the red object is an independent object it can be simply detected by its name

    - If the red object is a clone of an existing object you can give it an instance variable Red = 1, Red = 0 for other objects

    Next for the detection area, if it is the entire area there is a "is visible" feature that you can use and/or right click on that after adding and click Reverse which then means "is not visible".

    Another way is to detect using the distance from the camera object. So if it is within say 300 pixels then you consider it detected. A simple distance formula should easily work for this.

    Best of luck,

    COSMOS

    I believe he's talking about an actual, physical, object he wants to be detected through the actual image capture of an actual camera. Not the game camera, not a sprite, virtual, object.

  • Never tried. I don't really develop for android. Maybe dop2000 can shine some light on that, as far as I know he has developed for android before.

  • Hey Congrats2u!

    You use the action System>Snapshot Canvas and, right after that, the action Browser>Invoke Download, using CanvasSnapshot as parameter. The action also let's you pick any name for the file.

    Hope this helps. Cheers!