R0J0hound's Recent Forum Activity

  • 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.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yep, that is all correct. The purpose of the "for each" is for the situation multiple objects were clicked on at the same time.

    It does not matter if the shadow of another sprite is destroyed. The shadow is paired in the "every tick" event.

    For example if you have four sprite instances:

    Sprite1, Sprite2, Sprite3, Sprite4

    And four shadow instances:

    shadow1, shadow2, shadow3, shadow4

    Then they will be paired Sprite1:shadow1, Sprite2:shadow2, ... etc.

    If Sprite3 is clicked on and destroyed and the first shadow instance is destroyed.

    Then the instances will look like this:

    Sprite1, Sprite2, Sprite4

    shadow2, shadow3, shadow4

    Which will still work fine even though different instances will be paired together. The effect is purely for a visual effect so it does not matter if the the same instances are paired together.

    If you want the same instances to be paired together then you would need to use the UID method.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound