R0J0hound's Recent Forum Activity

  • My method on installing a font from a game is flawed, while I got it to work in XP it doesn't work in vista.

    I found another way. Sounds like it's the same way you spoke about where the font will only be loaded until a restart. I plan on adding this to my resource plugin, but until then here's an example using python.

    Note: you will probably need to install python for this to work as it requires the "ctypes" module.

    http://dl.dropbox.com/u/5426011/examples/custom%20font.zip

    made with 0.99.84

  • All resources need to go into the "files" folder on the project bar, the sounds, music, and fonts folders are not fully implemented yet. The XAudio plugin retrieves resources from the "files" folder. If you want to access resource files outside of XAudio use the Resource Plugin.

    EDIT:

    It's possible to make your game install your own fonts.

    Add the font to the "files" folder of the project bar.

    Use the "File" and "Path" plugins to see if the font is in the windows font directory.

    If it isn't, use the "Resource" plugin to extract the font and then copy it to the windows font directory.

    Then display a message to the effect that a font was installed and you need to restart the program.

    Then close the program.

    I'll make a cap if that helps.

  • Here are two ways to check if two sprites have the same x and y positions:

    + System: Always (every tick)
    -> Sprite: Set collision mode to Point
    -> Sprite2: Set collision mode to Point
    
    + Sprite: Sprite overlaps Sprite2
    -> Do Actions
    
    + System: Always (every tick)
    -> Sprite: Set collision mode to Per Pixel
    -> Sprite2: Set collision mode to Per Pixel[/code:1y35dq1p]
    [code:1y35dq1p]+ System: For each Sprite2
    + Sprite: X Equal to Sprite2.X
    + Sprite: Y Equal to Sprite2.Y
    -> Do Actions[/code:1y35dq1p]
    
    Keep in mind thought that positions in construct are floating point, so objects will almost never be at the exact same location.  But if you want to compare x,y location I'd recommend comparing the distance between the two objects and consider it a collision if they are close enough.
    
    Ex:
    [code:1y35dq1p]+ System: For each Sprite2
    + Sprite: Pick by distance(Sprite.X, Sprite.Y, Sprite2.X, Sprite2.Y) Lower or equal 10
    -> Do Actions[/code:1y35dq1p]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add a "Trigger Once" condition to the global variable comparison events so the actions a done only once when true. As it is now, every tick sets the animation so the the multiframe animation don't get a chance to play.

  • You can make chess in construct, but it will take some doing to make a computer player.

    Here are some helpful websites on the subject:

    http://chessprogramming.wikispaces.com/

    http://www.gamedev.net/reference/programming/features/chess1/

    Here is an initial stage of a checkers game I was making (not the same as chess I know, but similar). It allows movement of any piece, capturing of the other colors piece, and kinging. I didn't go any further, because it would become very complex making a smart enough computer ai to make it enjoyable to play. Complexities aside, I find checkers more enjoyable to play against a human player.

    http://dl.dropbox.com/u/5426011/examples/checkers3.cap

  • What newt said and the formula used with sprite2 didn't need the "/10".

    It sould look like this:

    -> Sprite: Set animation frame to (Sprite4.Value('DamageValue')%100)/10+1
    -> Sprite2: Set animation frame to (Sprite4.Value('DamageValue')%10)+1[/code:pudjgm3v]
  • I attempted to recreate the problem with the details you provided. Don't use the OR condition. While OR works well enough in most cases, it's what is causing the crashes in your case. Not sure about the other problems. More details are needed, or a cap would be nice.

  • The idea is easily changed for families. Simply use a family instead of "Sprite".

  • Just make all the buttons not highlighted, then only highlight to current button.

    Like this:

    + System: Always (every tick)
    -> Sprite: Set filter to white
    + MouseKeyboard: Mouse is over Sprite
    -> Sprite: Set filter to Blue[/code:3dc9fgtv]
  • It seems to work here, or is the problem that the player stops short of the obstacle?

  • In your example only the last sprite is getting colored because only the most recently created sprite gets picked. So the trick is to assign a color filter as the sprites are created.

    Here are two different ways to do it:

    + Button: On Button clicked
    -> System: Create object Sprite on layer 1 at (100, 100)
    -> Sprite: Set filter to cyan
    -> System: Create object Sprite on layer 1 at (250, 100)
    -> Sprite: Set filter to cyan
    -> System: Create object Sprite on layer 1 at (400, 100)
    -> Sprite: Set filter to cyan
    [/code:3bh1xu44]
    [code:3bh1xu44]+ Button: On Button clicked
    + System: For "" from 1 to 3
    -> System: Create object Sprite on layer 1 at ({100, 250, 400}@LoopIndex, 100)
    -> Sprite: Set filter to cyan[/code:3bh1xu44]
R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound