mordiaky's Recent Forum Activity

  • what I want is: for(x=0; x<width; x++)

    this is what I set, is this right?

  • From the look of it, it seems that lengthdir_x(len, dir) and lengthdir_y(len, dir) are basically cos(dir)*len and sin(dir)*len.

    so if i use cos(90)*len(1) it will move me down 1 pixel from my current point of reference?

  • Perfect, I think both options will work for what i need. TY for the quick response. I just love the community here!

  • Hello everyone!

    I am trying to rebuild some things into construct from game maker pro.

    I use lengthdir_x and lengthdir_y in GM for some functions in my code. How would I achieve this using construct 2?

    here is how gamemaker explains its purpose:

    Description

    This function seems confusing at first, but it's not really. It is used to get the x component of a position "len" pixels from the starting point and in direction "dir". Imagine a circle around your instance, then imagine a point anywhere on that circle. To move to that point we need to move the object so many pixels in that direction... so this function (when used with lengthdir_y) gets the position of that point on the circle to be used in code by the instance. See the image below for details:

    Source:

    Game Maker Docs

  • is there a way i can fill a array region with a value?

    so starting at 0,0 to the end lets say 100,100 I want everything to be filled with the number 10

    foreach xy element set value at (self.CurX, Self.CurY) to 10

  • if your talking about the viewport you can't in editor.you have to move the screen at load time. best way I found was a small sprite put it in the center of x,y location you want the screen and add a scroll too position, now on the onstart of layout, run the scroll to image. this will position your viewport to the center of that image.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Edit: a little searching does help, found the answer I was looking for in this thread.

    I have an idea how its done. I would be using arrays. what I was is something like a 1000x1000 pixel chunk. in that chunk I will spawn objects and such. I only want to load the chunk if I am near it (camera view) and remove all objects out of the chunk when I am not near it.

    for example:

    00000

    00000

    00000

    00000

    00000

    is my chunk array. from top left to right 0,0 0,1 0,2 0,3 0,4 0,5 next row 1,0 1,1 and so on.

    so what I want to do is if camera is in chunk 2,2 in the center of this array, it wall call all objects reaching out to the touching chunks.

    now like I said, I have an idea how this works and i could be way off and not even close to how a chunk works. so please tell me, am I close or is there a better method on how this works?

  • Hello all, I am currently looking into photon, but I was wondering is there a way/plugin that can join up to 6 players direct connect into one session? ofcourse this will be on local clients so trying to stay away from any sql, or cloud service at this time.

  • Bridge Officers: Version 0.0.1.1 Alpha

    Hello everyone. Here is what I have been working on with a total of 8 hours into constructing.

    The game in full design will allow up to 6 other players lan/wan to join you and fly one ship together as a crew. each crew member will have their own jobs such as Captain, Science officer, Tactical Officer, Helms Officer, Communications Officer, Etc. You will find random events in space from planet exploration to abandon ships floating in space. Every thing is procedural generated and no two games can play the same.

    There are other games like this already, I am building this to be ran in a browser with no client install needed. this way you can quickly invite friends with an IP or webaddress for fast connection and play ability.

    The state of the game at this point I am working on the Science officers console with a little Helm control for testing.

    All graphics are subject for changes, what you see now are placeholders at this time.

    the game doesn't do much at this state, you can fly around, scan each star, enter each star and check out the data as you fly around, random events will pop up on the screen in random locations at random times, but they do nothing right now.

    Capx: Bridge Officers

  • Not sure if this would be the right way, but you might need to save x, y locations of all objects, and objects UID in the array, and on game load, you would have your script to create objects based on the data in the array,

    for example:

    arrayData: 1,4,1

    Index: 1 (Object UID), (X Location), (Y Location), (Layer), etc......

    Edit: changed the If to a foreach

    so when game starts | foreach {arrayData.at(arrayData.IndexOf(object.UID), 1)} (CreateObject Object, SetPosition.X (arrayData.at(arrayData.IndexOf(object.UID), 2), SetPosition.Y (arrayData.at(arrayData.IndexOf(object.UID), 3), SetLayer (SetPosition.X (arrayData.at(arrayData.IndexOf(object.UID), 4)))

    now I am at work and do not have construct open, but this is what I see in my head right now. I could be way off as well.

  • OMG you are the best! I didn't even think of the order of creation, so simple too! I feel better now haha!

  • not sure why this is not working,

    with is blank and no checks it changes them all. when the check for the text "U" is only changes all the stars that are "U". If I select

    Pick nearest/furthest and set the exact coordinates of the star right bellow each text it works, but sometimes it will change other stars next to it, so not working perfect. do you have another idea to pick the right label with the right uid so only that object gets its text changed?

    so run the game, select the star with a U, scan it, and wait. the closer the star to the ship the faster the scan. just FYI for debuging

    here is the capx:

    https://app.box.com/bridge-command

    Its in the Main Event sheet. the code will take each text.uid and store it in an array next to the star.uid when created.

    "S"&starData.At(starData.IndexOf(Star.UID), 10) position

    the star UID is stored in a global var called starselected for each star you select. the text on the right of the screen if for debugging.

    Snumber = Charted Stars

    U = Uncharted ( percent will scale down to 1% change to spawn, set to 90% for debugging)

    Controls are:

    G = hide grid

    S = save state

    L = Load state

    mouse Scroll in or out to Zoom

    Left click to select

    if you enter coordinates in the textbox on top double click it when finished to move the ship in the angle of the direction you entered.

mordiaky's avatar

mordiaky

Member since 7 Dec, 2014

None one is following mordiaky yet!

Trophy Case

  • 9-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies