mordiaky's Forum Posts

  • capx included,

    the settings, I have a ship in the center of the screen. what I want to do is when I double click an area x,y location of mouse, layer 0 will shift in a way that looks like my ship is traveling in the direction I picked with double click. so this means all objects on layer 0 will need to shift, and at the same time create new objects when they come into view.

    all data is stored in an array of x, y locations so this helps.

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

  • Figured it out!

    array.At(array.IndexOf(object.UID),1)

  • Not quite,

    I am working with a 3,2,1 array.

    index 1 = Object.UID, "Name1"

    index 2 = Object.UID, "Name2"

    index 3 = Object.UID, "Name3"

    when I load the game I have one sprite that spawns 3 so each one will have a unique UID, I also have a random name generator and it adds it to the Y of the array matching the UID to store the data. Now when I am in the game and select the Object I have a text that should display its name only, how do I get the Y from the array in the text?

    so if I select Objust.UID 25 my code will search in the array for object.uid 25 now from that I want to display the name it was given.

  • hello all, I am stumped.

    I have a 2d array, 0,0 the value is UID, Name

    I want to set text to name from my array.

    example:

    1, bob

    2, sam

    3, josh

    so if I select an Object(Josh) hs data is stored in the array, how do i set text to the y of my array to pull the name? I tryed array.at(object.UID, 1) the UID is set and loaded into the array in the x position and the name is generated and placed in the y position. and now clicking on the object i want to display that random name from the Y position in my array.

  • Hello everyone,

    I am working on a AI movement (camera looking top down flat map) full 360 deg of movement.

    What I would like is in Idle mode, I want my sprite to look around based on line of site. Not moving! so standing still generating his view:

    8 directional (up right down and left and in-between), this direction then gets stored in a variable and this is his New Facing position (again the actual sprite is not moving) with this information I can generate a path to that location (of course looking for obstacle on the way) then it will move in that direction between lets say 10 pixels up to 500 pixels. it will stop and do this all over again as long as the idle state is enabled.

    a few thoughts would be to set a invisible circle sprite attached to the AI, then generate a position on that object and move in that direction. your thoughts and how you handled this.. thanks all!

    Update: Ok I got this I think, I was over thinking it. all I had to do was find path based on his image point plus or minus x and y locations so it looks like this:

    Find Path{X(Self.ImagePointX(0) + random(-125, 125)) + Y(Self.ImagePointX(0) + random(-125, 125))}

    this will find my Site (direction) and generate the path in that direction, and then I run the move along path. and reset and repeat LOL very cool effect if you want to make some thing just walking around in some sort of "I am board with nothing to do state"

  • ok had to do some extra steps, I have to create a local variable and name it I and then at the end of the action I had to add 1 to I

  • ok that is what I thought and that is what I did, How ever when I make an array and then I insert to with Index "I" it does not let me.

  • yeah, this still does not help me sorry

  • I want to do this in construct 2

    for(I = 0; I < 10; I++)

    how do I do this in the code block

  • Thank you guys for the fast reply. I will look into both options and see what option will be best for what I plan on doing. Thank you both again!

  • ok that was my other way of thinking and I was already working with this.

    Thank you very much

  • Hello, I am making a RPG style game, I have many classes and each class has attributes, I do not want to share these base attributes so I stuck them in a Group name "Warrior", "Mage", "Rogue", etc...

    Each one of these groups I have created local variables:

    Experience

    Health

    Strength

    etc....

    so later in my MainEvent Sheet I will add an action to add to Warriors health so how would I do this?

    in programing terms I would do something like warrior.health + 10

    how do I do this in construct?

  • how would you set this up for the phone touch system? I set it all up for touch and it works great in preview, but once on the phone it does not draw the box

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am looking for some advice or a tutorial on a crafting system.

    some thing like a 4x4 grid 32x32 each, drag and drop sprites in grid to craft a new sprite?

  • set up triggers for each side, or have it spawn a trigger based on the side rotation. and if item overlaps trigger destroy. just have the trigger's spawn depending on the side showing