producermark's Recent Forum Activity

  • Solved with and Array.

    Ok, I have done more research and have come up with an answer.

    Thanks to kittiewan and the tutorial she provided here:

    https://www.scirra.com/tutorials/315/generating-random-numbers-without-duplicates

    The reason you want to use an Array is simple.

    To reduce the amount of code and increase the number of variations when a sequence is generated.

    If you happened look at the first example using The Brute Force Method

    I coded in only 3 variations based on the random number that was generated,

    but

    in actuality there are 6 different possibilities. being : 1,2,3 ,, 1,3,2 ,, 2,3,1 ,, 2,1,3 ,, 3,2,1 ,, 3,1,2

    Could I have coded those different possibilities in? of course, but what a hassle.

    Anyway:

    Here is the image of how I adjusted her code to my needs.

    https://dl.dropboxusercontent.com/u/139486255/Image/array_set_objects_random.jpg

    and here is the capx:

    https://dl.dropboxusercontent.com/u/139486255/Image/array_set_objects_random.capx

  • It sounds like you are confusing collisions with an object that has a solid behavior.

  • MadSpy,

    Sure that would work too. :-p

    Any Array methods........ anyone

  • Thanks A0Nasser,

    I was writing this ( below) as you were posting an answer....

    Alright, so I thought I had to use an Array

    but I found a way to do it without and Array.

    If there is someone out there who knows how to do this with an Array,

    please post that method below.

    Non Array method: Lets call it THE BRUTE FORCE METHOD :

    https://dl.dropboxusercontent.com/u/139 ... ic_eg2.jpg

    [/img]

    RE:

    Image:

    Event #2 = System> Trigger Once /// <<<or this could be put into the 'On start of layout' line as well >>>

    Action = System > (Global & local variables) Set value

    Event #3, 4, 5 = System> (Global & local variables) Compare variable ///

    Action = (Sprite) > Set position

    Again,

    if someone has a method via an Array, please post.

  • I have searched the tutorials and forums for an answer to this question and I could not find a solution.

    So if you know of a tut, or an answer elsewhere, kindly post it in the reply.

    I have 3 objects in a layout.

    Sprite 1 at 100, 200

    Sprite 2 at 300, 200

    Sprite 3 at 500, 200

    as seen below,

    https://dl.dropboxusercontent.com/u/139 ... pic_eg.jpg

    [/img]

    I just want to arrange them in random order on start of layout.

    If you are able, please provide a capx.

    Much much appreciated.

    Thanks

    --------

    --------------------------------

    ------------------------------------------------

    Just in case the capx is lost in space at some time in the future I decided to post a tutorial,

    because I think this info is very useful

    see:

    https://www.scirra.com/tutorials/1436/s ... ndom-order

  • Hi

    I need some help with Arrays.

    Are you still available to help out?

  • Ed has made a tutorial here

    https://www.udemy.com/construct-2-mobil ... ization/#/

  • Again Thanks. MUCH Appreciated

  • 2*floor(random(32)

    Thanks DUTOIT that works.

    2*floor(random(32)

    I never heard of floor being used before, so I googled it.

    Wikipedia:

    In mathematics and computer science, the floor and ceiling functions map a real number to the largest previous or the smallest following integer, respectively. More precisely, floor(x) = \lfloor x\rfloor is the largest integer not greater than x and ceiling(x) = \lceil x \rceil is the smallest integer not less than x.[1]

    Again Thanks.

  • Hi

    I am working with the formula int(random(0,64)) for example,

    but

    I would like only even numbers to be generated.

    Anyone out there know the equation that will work in C2?

    I have already installed a 'Brute Force' correction method via

    comparing two values and upping by one the number if an odd value is generated

    for example::: if YYYY equals 7 add 1

    this means

    for the above int(random(0,64)), I need 32 checks to correct for an odd number.

    I was wondering if there was a actual formula that generates only Even numbers?

    Thanks for looking.

  • OMG,

    Thanks you blackhornet

    Recently, I really try to figure out the problems by myself

    ( as I got scolded by members early on for asking for help to early )

    but after 2.5 hours of pulling my hair out I decided I better ask for help.

    I somehow thought (I knew it) that there was a simple explanation.

    (I need to learn Arrays)

    Again Thanks!

    SOLVED !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Please help determine if a problem is a bug:

    So here is the situation.

    I duplicate a layout, for example, I duplicate Layout 1 which is using Event Sheet 1.

    The new duplicated layout is named Layout 2, which I direct to use the same event sheet, Event Sheet 1.

    Correct me if I am wrong, but shouldn't Layout 2 be and act exactly the same as Layout 1?

    If you look at the capx in the link below

    http://dl.dropbox.com/u/57899112/MemMatchTut.zip

    Layout 1 acts normally for me,

    BUT

    if I duplicate the Layout as described above,

    Layout 2 only shows the same first card under each card and

    never changes, every card is a match, (the same first card)

    Is this a bug, my computer, or something else?

    Please help.

    kittiewan

    Kyatric

producermark's avatar

producermark

Member since 9 Sep, 2013

None one is following producermark yet!

Trophy Case

  • 11-Year Club
  • x6
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

13/44
How to earn trophies