R0J0hound's Recent Forum Activity

  • ranma

    In your first capx if you hide the locked sprite at the same time as destroying it you won't see it flash. When destroying a sprite it is not destroyed till the beginning of the next frame, so that is probably why you see it flash.

  • Here are two other ways.

    1. Destroying the EditBox or Button will restore the keyboard focus.

    2. If you want to use python:

    import ctypes
    hwnd=ctypes.windll.user32.GetActiveWindow()
    ctypes.windll.user32.SetFocus(hwnd)
  • Instead of "every 1 seconds" use a instance variable for a cooldown time between shots.

    Here is an example of multiple turrets and multiple targets:

    http://dl.dropbox.com/u/5426011/examples%209/turret.capx

    In the example the turrets target the closest player within range. I didn't work it out but it could be modified so that only the first object in range will be targeted until it is out of range.

  • The only tricky issue you may be the visual sorting of your objects if you have more than two overlapping.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To fix the collisions Add the "solid" behavior to "collisionhouse" and remove event 3.

  • It is crashing because you are using the OR condition, it's buggy. It often causes crashes when used with layout changes. I removed the OR conditions from your cap and it did not crash any more.

    Edit:

    I've looked at the source for the OR condition before and wasn't able to fully understand how it works. Which was mainly because it is spread though out the core event engine code.

  • While it is actually programming, I usually refer to it as "eventing" since the basic building blocks of the logic are called events in Construct.

  • It's pretty simple.

    1. Add the mouse object and the sprite you want to use as a button.

    2. In the event editor add two events:

    +System | Every Tick

    --Sprite | Set Size to (32,32)

    +Mouse | Cursor is over Sprite

    --Sprite | Set Size to (50,50)

    The first event is for when the mouse is not over the sprite and the second is for when it is. You can do whatever effect you want for the rollover but as an example I just used size.

  • I get it frequently, but always copy the text before clicking post so I don't lose anything.

    Edit:

    second attempt posting, I guess my login timed out and was logged out so my post was lost.

  • You could use a global variable to store the start time of the layout and do actions after 5 seconds after the layout start like so:

    * Global number layoutstart = 0

    +System | Start of Layout

    --Set layoutstart to time

    +System | layoutstart < time-5

    --Do stuff

  • Performance wise non-power-of-two textures are no different than power-of-two textures. It was the same with CC.

    The reason for power-of-two textures was purely for memory efficiency.

    In CC non-Power-of-two textures were reported by the runtime to take as much video memory as the closest 2^X texture would take. Most graphics cards now can handle any sized texture as well as 2^X textures. Whether the texture is re sized up to a 2^X texture in memory or not is hardware specific.