R0J0hound's Recent Forum Activity

  • Here is an example of the using image fonts with the Tiled background object. It uses the "set image offset" action to select letters from the image. The only requirement is the image has to be power of two height and width.

    http://dl.dropbox.com/u/5426011/examples2/imageFontpy.cap

    made in 0.99.96

    This is not intended to be a replacement of Lucid's Sprite font object. But it gives the advantage of being able to load a different font at run-time with a single load image action, and the ease of editing all the characters in one image.

  • Here is a way to use Windows pop-up menus with python:

    http://dl.dropbox.com/u/5426011/examples2/pyPopupMenu2.zip

    made in 0.99.96

    No python install is required, all necessarily files are included.

    Notes:

    Had to use some event trickery so that when the menu was opened the timescale would remain 0 till the next tick. Otherwise objects that depend on timedelta would jump after the menu closed.

    This probably isn't very useful to most people using construct, but it's interesting none the less.

  • [quote:3qxdgnrk]How the hell do you get proper alpha right off the bat with these things?

    Convert the color mode of the PNG from Indexed to RGB. Then the transparency is preserved when the image is imported.

    [quote:3qxdgnrk]Now, the next main problem to make this viable is Z-Order. In other words, layers. Oh, yeah, and collision, I forgot. You either want some things to collide, or some things to not collide, basically...

    Z-Ordering is easy, just load each layer to a different layer.

    For collisions just set the collision mode for all the sprites on one layer to per-pixel and none on the other layers.

    Give the Sprite the Solid attribute and set it's collision mode to none.

    Here's a updated script:

    from xml.dom import minidom
    
    mapfile = minidom.parse(System.AppPath + 'ConstructTestMap.tmx')
    
    a = mapfile.getElementsByTagName('map')[0]
    
    width = int(a.attributes['width'].value)
    height = int(a.attributes['height'].value)
    tilewidth = int(a.attributes['tilewidth'].value)
    tileheight = int(a.attributes['tileheight'].value)
    
    #load all layers
    layernum=1
    for layer in mapfile.getElementsByTagName('layer'):
    	index=0
    	for tile in layer.getElementsByTagName('tile'):
    		val = int(tile.attributes['gid'].value)
    		if val > 0:
    			System.Create('Sprite',layernum,0,0)
    			if layernum==2:
    				SOL.Sprite.SetCollisionMode(3) # 3 is per-pixel
    			SOL.Sprite.x=(index % width) * tilewidth 
    			SOL.Sprite.y=(index / width) * tileheight
    			SOL.Sprite.SetAnimFrame(val)
    		index+=1
    	layernum+=1[/code:3qxdgnrk]
  • Arima, it does work but you need to add object folders from the project tab.

    <img src="http://dl.dropbox.com/u/5426011/pics/screen.PNG">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Python is the ideal route to take as it has good xml support.

    Here is a cap that will load the map that Candescence posted in the previous post.

    http://dl.dropbox.com/u/5426011/examples2/tilemapLoad.cap

    made in 0.99.96

    Be sure to put the cap in the same directory as the map. Also you might need to install python because the xml modules aren't included in construct.

  • The physics behavior doesn't use the solid attribute. It only reacts with other physics objects. Making a physics object immovable is all that it takes to make an obstacle. For a working example take a look at the physics template included with construct.

  • I think it's simple enough as is.

    For score:

    add a text object

    add a global variable and call it "score"

    create this event:

    + System: Always (every tick)
    -> Text: Set text to global('score')[/code:3m8kdybw]
    
    [u]For lives:[/u]
    add a tiled backdrop object and draw a 32x32 picture.
    resize to 32x32 after editing so you see only one image.
    add a global variable "lives"
    create this event:
    [code:3m8kdybw]+ System: Always (every tick)
    -> TiledBackground: Set width to global('lives')*32[/code:3m8kdybw]
    
    All the features of the KNP counter object are easily replicated with a variable and either a text object or tiled background object.
  • I'd recommend reinstalling/updating your graphics drivers.

  • Since Construct allows for only one icon, you could just set the icon size to 48x48 and draw it at that resolution. Any lower resolution icon will be resized from that icon.

    Another alternative is using the free program like IcoFX to modify the icon of the exported EXE.

  • [quote:3i4pp571]1. Creating different sprite for each weapon (Oh my.., 20 swords - 20 different objects, it's killing me );

    2. Creating different animations in one sprite (omg, huge amount of it!!!);

    3. Changing sprite of weapon via in-game preload (O.M.G. If i had to choose between 3 or 5 swords it will be painfull. Image Manipulator all-the-way when choosing like "what I prefer more - maces or swords?" And App could crash easily in that case);

    That pretty much sums up all the ways to go about it.

    Here's a test of method 1, if that helps:

    http://dl.dropbox.com/u/5426011/examples2/multiArmor.cap

    made in 0.99.96

  • You need to include the events you have to change the players direction in the new layouts.

  • You need to change the condition in event 5 of the event sheet "Basic_Character":

    + System: Is global variable 'Spawn_Root' Equal to Door_Spawn.Value('PV_Spawn_Root')[/code:21pbmfff]
    This looks correct, but it doesn't do any picking of the object "Door_Spawn",  so what happens is the global is only compared to the first instance of "Door_Spawn".
    
    The solution is to pretty much reverse the condition by comparing the "Door_Spawn" object's PV to the global:
    [code:21pbmfff]+ Door_Spawn: Value 'PV_Spawn_Root' Equal to global('Spawn_Root')
    [/code:21pbmfff]
    This way the correct object is picked.