R0J0hound's Forum Posts

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

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

  • Families can only include objects of the same type. So you can have a family of sprites, a family of text or a family of any other object type.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The objects are not exactly paired to each other, it is enough to just delete one of the instances.

    To help illustrate what is happening you could replace "Every tick" with the more verbose version here:

    System | For "" from 0 to Sprite.Count-1

    System | Pick Sprite instance loopindex

    System | Pick shadow instance loopindex

    System | Pick healthbar instance loopindex

  • The number of pieces was arbitrary. You can use as many or as few as you need, just add more instances.

  • How's this:

    http://dl.dropbox.com/u/5426011/examples%209/grid_fit.cap

    If the piece can't be placed the piece is moved one position to each side then the corners. Checking stops when a valid position is found.

    It only looks 1 space away from where you drop it. Here is an extension of the example to fit the piece somewhere on the image if an immediate nearby spot is not available.

    http://dl.dropbox.com/u/5426011/examples%209/grid_fit2.cap

  • It works, here is a example as proof:

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

    Using the UID instead has certain advantages like when you want a certain object paired with another. My method is if you just need another object type paired up and it doesn't matter if it's always the same one.

  • I'd like to point out that you can simplify it by taking advantage of the way events work. When there are an equal number of Bean1's and Bean1shadow's then this will pair them.

    Every Tick:

    --Bean1shadow| set position to (Bean1.X, Bean1.Y+14)

    --Bean1shadow| set angle to Bean1.Angle

  • The blank event is just an artifact of converting my first example you can safely move the actions to the event above.

    I was noticing the jerky motion as well and found that if you remove "stop loop" from event 6 they move much smoother.

    It also goes smoother if you add a smaller value to "t" in event 5, of course you will have to increase the number in the "repeat" condition since the Sprite will be moving over more line segments.

  • If you double the height of the Text object you will see the text. It seems that if a word is wider than the text object then it is sent to the next line.

    I can only find a IE solution to provide a save as dialog to save the image. For now using the browser object to open ImageUrl and right-clicking save as is the simplest way that comes to mind.