Zetar's Recent Forum Activity

  • I have decided that a Hash table might do the trick a little better... I am going to try that rout.

  • Hello forum Buddies,

    I have populated an X,Y Array with (Random X coordinate), (Random Y coordinate), and other info about a sprite that will eventually be placed on the screen. So each Y axis line is a new object with x,y coordinates.

    I also created a Dropdown box that lists each object location as ?X,Y?. This box is populated in the for next loop creating the random coordinates.

    How would I do a search of the Array to find the Y line (I need CurY of Array) where X0 = tokenat(List.SelectedText,0,",") and X1 = tokenat(List.SelectedText,1,",")? It would start with-> List: on selection changed

    Example: ARRAY

          X0 , X1

    Y0    213 , 435

    Y1    123 , 654

    Example:Dropdown List

    213,435

    123,654

  • I hate it when I post then find the answer a couple minutes later...   Well, if anyone else need to know, here is a way to do it:

    canvas -> Fill canvas with color -> str("rgb("&INT(random(255))&","&INT(random(255))&","&INT(random(255)))

    str() will make everything in the () into a string. :) Yea, it is coming back to me now... (you can change INT(random(255) to a variable of any kind with an INT value between 0 and 255.)

  • I know this may be a re-cap for some, but I have searched the forums and tried everything... (Been away a while, so I am rusty...)

    How do you select a random color using canvase?

    It wants a string, but "rgba("&random(255)&","&random(255)&","&random(255)&",1)" does not work... (I think because it wants that whole string in quotes, and i dont know how to do that.)

    Thanks in advance!

  • Thanks Yann. I will use this to help me build an array version. If I do It I will post a link :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks Yann. I was hoping someone had a capx handy that I could tear apart. I created a few random maze generators, but not so that they use every cell in a "perfect maze". I would like to build the maze in an array using that sort of algorithm, then display it graphically.

    I know it is not a "simple" event list, but I was hoping someone could post something close that I could manipulate to what I need. Until then I will keep trying on my end.

    BTW, do you think building it graphically then writing to an array would be easier?

  • Has anyone come up with a Capx explaining how to create a grid type maze using the Reclusive Backtracker (RB) algorithm in C2? I have seen a few different methods used, but I don't remember a "perfect maze" example?   Or did I miss it?

  • To simplify, (a stink at math) I have X speed and Y Speed, but I need the Force (magnitude) of these two. I.E. The speed at which the ball will travel when the variable force is applied at X & Y simultaneously.

  • Could someone please help me figure this out?

    I have a ball that moves towards the mouse on click using a physics impulse. I use sin and cos to calculate the angle towards the mouse. Then I apply Physics Impulse to move at the speed of:

    Impulse X (Calc_Gforce*Sprite.xvector)

    Impulse Y (Calc_Gforce*Sprite.yvector)

    <font color="blue">{Calc_Gforce is a preset Global Var, and xvector/yvector is an object var that is updated every tick with trajectory}</font>

    How would I get the value of force for that impulse as a singular number every tick as I move the mouse around the screen before clicking? I want to create a FORCE BAR that will display how much force you will generate when clicking.

    CAPX: https://www.box.com/s/9e767ea42a8916a92987https://www.box.com/s/9e767ea42a8916a92987

    EDIT: - Updated file

  • I dont think so. Clear background you would have to write an event that did this by deleting things off the background... (My guess)

  • Do you have a CapX that shows your problem so we can help you work thorough it? You can change a single variable on an object if you program the events correctly... (Even using families...)

  • Thanks Guys. I took your advice and noticed a significant reduction in Load time. I appreciate your advice!

Zetar's avatar

Zetar

Member since 19 Dec, 2009

None one is following Zetar yet!

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies