R0J0hound's Recent Forum Activity

  • Here's another way to scale the array by setting the large array by sampling from the small array.

    + System: Trigger once

    + LargeArray: For Each element

    -> LargeArray: Set index (LargeArray.CurrentX, LargeArray.CurrentY) to AsteroidArray (int((LargeArray.CurrentX-1)/4)+1, int((LargeArray.CurrentY-1)/4)+1)

  • No need to use distance, just place a spite where you want to shoot from and set it's angle at what you want to shoot at. Then increase the width until it collides with a wall.

    http://dl.dropbox.com/u/5426011/c2/laser.capx

  • You have the Audiere object set to be global. Global objects are not destroyed at the end of a layout so they exist on all following layouts. You also have a instance of the Audiere on each level, you only need one instance on the first layout since it's global.

    As it is now there will be 13 Audiere objects playing on the 13th level, which will be be noisy.

    There is pixel manipulation in javascript:

    http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#pixel-manipulation

    But it's not very fast from the tests I've seen.

    Ashley's reason for implementing polygon collisions instead is pixel collisions wouldn't be fast enough.

    http://www.scirra.com/forum/pixel-perfect-collision_topic44099_post275971.html#275971

  • I'd use a local variable:

    local var: orvar=0

    If "Player_Action" = window -> set orvar to 1

    If "Player_Action" = okno -> set orvar to 1

    if orvar = 1 -> do some stuff

    I you use a global variable instead of a local then you need to reset orvar to 0 before that block of events.

  • Ok, fixed it so that modes are not repeated. The other modes were rotated modes and modes with different refresh rates.

    On my computer only these modes are now listed:

    320 200

    320 240

    400 300

    512 384

    640 400

    640 480

    800 600

    1024 768

    1280 768

    1280 800

  • range(200) was purely arbitrary, my system had about 95 modes.

    I fixed the cap so that it will read all the modes.

    http://dl.dropbox.com/u/5426011/examples6/resolutions.cap

  • Well, contrary to what tulamide says, I don't know how how to do it, but I just learned from a few internet serches and about an hour of tinkering.

    Here is the example with the required pywin32 files.

    I also included the cursor example edited to use pywin32 instead of ctypes to reduce the amount of files needed.

    http://dl.dropbox.com/u/5426011/examples6/resolutions.zip

    In my example I used the name "resolutions" instead of "modelist" but they will act the same.

    To access the first mode:

    modelist[0]

    the second mode, and so on.

    modelist[1]

    modelist[2]

    To access the width of say the first mode do this:

    modelist[0][0]

    and the height:

    modelist[0][1]

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Put "Monster" and "Health Bar" in a container. Then the positioning can be done with one event:

    + System: Always (every tick)

    -> healthBar: Set position to Monster.X, Monster.Top-16

    -> healthBar: Set width to Monster ('health')

  • The keys appear to be fine to me. Each name has the correct value. What language do you use with windows? If the language uses 2 bytes per letter then perhaps the listbox is causing the corruption?

    This cap doesn't use the listbox object:

    http://dl.dropbox.com/u/5426011/examples6/txtToHash.cap

    run in debug mode to see the populated hashtable.

  • It is synchronizing because Weapon and reloading are not paired.

    The sub-event:

    + reloading: animation "default" finished

    is picking that one reloading object and all the Weapons with an ammo of 0.

    To fix you need to pick the Weapon that you want paired with reloading. You could use a variable with UID or since it appears that your weapons don't move you can pick the Weapon that is in the same location as reloading.

    + Weapon: Value 'ammo' Equal to 0

       + System: Trigger once

       -> System: Create object reloading on layer 1 at (Weapon.x, Weapon.y)

       + reloading: Animation "Default" finished

       + Weapon: X Equal to reloading.X

       + Weapon: Y Equal to reloading.Y

       -> reloading: Destroy

       -> Weapon: Set 'ammo' to 3

  • Look in the source files folder to find "ConstructSDK.rc". The express version doesn't include the resource view, but the file is just a text file so you can edit it by right clicking on it and clicking "view source".

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound