linkman2004's Forum Posts

  • The mouse problem is now fixed, and I've added an option for using integer positions, which should fix problems involving gaps between tiles.

    Advanced Camera Plugin - v0.86b

    Download Now(with example) - 151KB

    Additions/Fixes/Changes

    [ADD] - "Use integer position" property added under the "Properties" section in the object. This option will set the position of the camera to a constant integer position.

    [FIX] - When "Unbounded scrolling" was disabled, having the camera at the very edge of the layout would cause problems for actions relating to the mouse.

    Hope these fixes help.

  • When the camera scrolls, does the camera use decimals in scrolling

    for example, will the camera be at: 450.23, 670.91 ?

    It uses floating point values. If you'd like, I could make an option where only integer positions are allowed.

    When using your plugin I can no longer click on objects during runtime.

    I can't seem to recreate the problem. Would you mind posting(or sending me a PM with) a CAP?

  • I'd suggest reading the wiki article on Containers.

    To give a basic idea on what containers do, if you put the light in a container with the bullet, every bullet will have a light object paired with it. I'd explain more, but the wiki article will be able to be a better job of it.

    Good luck.

  • Thanks, Madster. I've got a new version with your suggestion:

    Sprite Button Plugin - v0.7a

    Download Now(with example) - 128KB

    Adds/Changes/Fixes:

    [ADD] - New option to disable a button while it is invisible: Properties -> Disable when invisible. This will make the button unclickable when either it is set to invisible or the layer it's on is invisible.

    [ADD] - Option to make a button invisible from the start of the layout: Properties -> Invisible on start.

    Just a small update, but these new features, specifically the one allowing for the disabling of buttons while invisible, could make things such as tabbed interfaces much easier.

    Have fun.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've got a fixed version of this plugin up now:

    IK Solver 2

    Download Now(with example) - 113KB

    Adds/Changes/Fixes:

    [FIX] - Having the control point at the position of the first bone would make all of the bones disappear due to a division by zero error.

  • Damn, I thought I had fixed that. It appears to be a division by zero error, so It should be pretty easy to fix.

    Thanks for the heads up.

  • Last major update is up right now!

    Sprite Button Plugin - v0.6a

    Download Now(with example) - 127KB

    Adds/Changes/Fixes:

    [ADD] - Radio button type added. Radio buttons in the same group have control over each other; For example, if three radio buttons are in the same group, only one can be ticked at any given time.

    [ADD] - New actions added: Button clicked by ID and group, Button clicked by group, Button toggled by ID and group, Button toggled by group.

    [ADD] - New expressions: Button group, Button type(returns: 0 = Normal, 1 = Two-State, 2 = Check box, 3 = Radio).

    [CHANGE] - Groups can now be used with all button types.

    [FIX] - Zooming screwed up hover/click detection

    This will be the last major update feature-wise since all of the button types are in, but I'll keep releasing new version with small features and bug fixes.

    Anyways, I'll leave everybody to play with the new example file that's included. Once again, leave feedback and any bugs you run across.

    Have fun.

  • I used to have problems with debugging. One of my projects would always show simply a white screen whenever I booted it up in debug mode. However, I can't reproduce it anymore.

    Which version of Construct are you two using? It might have been something that was fixed in the latest release.

    Great fix! Advanced Camera has become obligatory in all of my projects. One of the most essential plugins around. Can't wait for more!

    Thanks, man. I'm glad to see you're making good use of it.

  • That part of the physics behavior has been broken throughout the entire .99.x series as far as I'm aware. Dots are misplaced whenever you click above the hotspot of your sprite.

    I reported it as a bug a while back.

  • I haven't found anything that runs on XP that doesn't on Windows 7. Event X-WIng vs Tie Fighter from the Windows 9x days runs.

  • You can check if a number is odd or even by using the modulo(%) operator. Since the modulo operator finds the remainder of division, if n % 2 = 0, the number is even.

  • That does indeed seem to work, however, I'm still having serialization problems. I'm not having crashing problems or anything, but upon loading of a runtime save, the collision mask seems to be forgotten. Here's the serialization code(the three dots just represent the other variables I'm serializing):

    void ExtObject::Serialize(bin& ar)
    {
    	if (ar.loading) {
    
    		// Serialize all runtime info
    		ar >> info >> ... ;
    
    		// Set groups back up
    		SetupGroup(0);
    
    	}
    	else {
    
    		// Serialize all runtime info
    		ar << info << ... ;
    
    		// Clear the groups vector
    		groups.clear();
    
    	}
    }[/code:wkw8e52u]
  • How do I go about making use of a texture's collision mask? Does it have something to do with info.curTexture or info.imgHandle?

    Also, my drawing code is just using renderer->SetTexture(...), then renderer->Quad_xywh(...). Is there some other way I should be drawing things?

  • I'm using it for my Sprite Button plugin, which is how it supports custom shaped buttons. Here's what I have now with OnFrame():

    BOOL ExtObject::OnFrame()
    {
    	// Set the collision mask for this object
    	// iTextureD is the main button face texture
    	pRuntime->GenerateCollisionMaskFromTexture(this, iTextureD);
    
    	// Don't call anymore
    	return 1;
    }[/code:3piu01s7]
    And here's what I was doing in OnCreate():
    
    [code:3piu01s7]void ExtObject::OnCreate()
    {
    	// Load the edittime data that was serialized.
    	bin ar;
    	ar.attach(info.editObject->eData, info.editObject->eSize);
    
    	// Read the data.  Same format as you exported in EditExt::Serialize.
    	// Your runtime loader must be able to load all versions!
    	int Version = 0;
    	ar >> Version;
    
    	// Texture loader thingy
    	ImageHandleInfo* imgTexture;
    
    	// Load the default texture
    	imgTexture = pRuntime->LoadSerializedImageHandle(ar);
    	iTextureD = renderer->CreateTextureFromHandle(imgTexture);
    
    	...
    
    	ar.detach();
    
    	...
    
    	// Update the object's collision mask
    	pRuntime->UpdateBoundingBox(this);
    	pRuntime->GenerateCollisionMaskFromTexture(this, iTextureD);
    
    	...
    }[/code:3piu01s7]
    The first method works fine until I load from a runtime save, and the second one crashes upon loading a runtime save or when there are multiples of the object.
    
    Also, as a side note, the serialization code(not shown) is merely loading/saving some variables, so I don't think it's causing any problems.
  • I have some questions regarding the GenerateCollisionMaskFromTexture() function.

    First of all, where's the best place in the code to call this? I've tried calling it from OnCreate(), but the runtime crashes when two of the same object are present. Right now I have it called from OnFrame(), which is set to not call again after the first time, which works, but I don't think it's the best solution.

    Also, I'm having problems regarding runtime serialization after using this function to generate a collision mask. Everytime I load from a quicksave, the runtime crashes when it tries to generate a new collision mask. Is this something wrong with my plugin or Construct?