Ashley's Recent Forum Activity

  • It's worth mentioning that the sound does indeed play after there's no bullets and you click, I just don't want it doing it when the last bullet is fired.

    Then compare it to 0, not 1

    [quote:2l62emm6]how can I make an object do something when an instance of it is created?

    Follow it by an action. Eg.:

    -> Create object 'Explosion'

    -> Set 'Explosion' angle to random(360)

  • Try enabling 'global' for some objects, or use the 'save/load' or 'quicksave/quickload' actions before leaving the layout to save its state.

  • Well, there may be ways to hack parts of it in, but it's not elegant. Distance-based collisions simply treat the object like a circle, regardless of its actual shape. And what about per-pixel collisions? Supporting that would be extremely difficult and probably prohibitively slow with 3D meshes. So again even a seemingly simple solution is riddled with difficulties and incomplete support. Basically, without looking at the codebase, you can't imagine the immense complexity that goes in to something as simple as checking if two objects overlap with per-pixel accuracy. Then there's the rest of the engine, other areas which are even more complex and present even greater conundrums.

    We're not trying to be stubborn here. People are throwing out what they think are simple ideas, but are actual massive technical challenges because they don't know the codebase. The fact remains that even seeminly simple 3D support is extremely time consuming and complicated to develop. Just look at the number of bugs and problems associated with the 3D box plugin, and I can tell you, that alone has taken many, many hours of development time too. It's not just a 3D box. It's a 3D participant in the Construct engine, which is much, much more complicated than simply just being a 3D box.

  • If you don't need any of the edittime data at all, then no, you don't need it - but you should still at least serialize the Version number, in case you later decide you do need some properties or data. If you release a plugin which doesn't serialize anything, it instantly becomes permanently impossible to ever add any new data to that plugin, because you can't distinguish between versions

  • Nice idea for a site

  • This doesn't work:

    <img src="http://img269.imageshack.us/img269/1452/figure1.gif">

    'Else' doesn't work after a triggered event (one with a green arrow, like 'on mouse button clicked'). Since triggered events fire when an event happens, such as when a button is clicked, and can happen at any point in time, what would 'else' after that mean? Trigger at all points in time that event is not happening? It wouldn't make sense, so that's why 'else' doesn't work where you put it.

    If the other conditions were subevents to the trigger, it could work - 'else' can follow the non-trigger subevents.

    <img src="http://img8.imageshack.us/img8/999/figure2.gif">

    This one should work: if you left click or double click and you are out of ammo, play a sound. Are you sure it didn't work? Maybe post a .cap of this one. How many 'bulletcount' objects do you have? You should only have one, or the event picking will keep individual counts for each object.

    <img src="http://img170.imageshack.us/img170/7993/figure3.gif">

    Subevents are only tested if the parent event conditions were met - so you've made this one a logical impossibility. First check if 'Frame Number' is greater than 1, and if it is, then check if it is equal to 1, which it can't possibly be

  • Well if your plugin crashes don't submit a bug to the tracker, fix your plugin If your plugin has a bug in its serialization code, though, it can cause other parts of Construct to crash after your plugin code has finished running, which is probably what's happening here.

    You can't recompile an edittime plugin while Construct is open (the compiler can't write to the CSX file because construct has loaded it). However, you can recompile a runtime plugin, as long as the loaded serialize data is backwards compatible. If it's not, it will crash on preview, and as above, it might not crash in your plugin, but your plugin will have caused it. It can be very tricky to debug these problems.

    If you change your edittime plugin's serialize data while Construct is closed, it must be backwards compatible. If it's not, all .cap files using that plugin that already exist become invalid and will not load with your new plugin. Have a look at some other plugins to see how they do this. Here's a quick example:

    Say your plugin initially uses this data to save:

    void EditExt::Serialize(bin& ar)
    {
    	int Version = 1;
    	SerializeVersion(ar, Version);
    
    	if (ar.loading) {
    
    		ar >> myint;
    
    	}
    	else {
    		
    		ar << myint;
    
    	}
    }[/code:2etwz5zu]
    
    Suppose you want to add a new value, 'myfloat', to the saved data.  Increase the 'version' number to 2.  The loading code must still support version 1 (to still be able to load old .caps with the plugin's old format).  The saving code only needs to save the current version.  So you'd change it like so:
    
    [code:2etwz5zu]void EditExt::Serialize(bin& ar)
    {
    	int Version = 1;
    	SerializeVersion(ar, Version);
    
    	if (ar.loading) {
    
    		ar >> myint; // both versions 1 and 2 load a myint first
    
    		if (Version >= 2) // version 1 doesn't have this
    			ar >> myfloat;
    	}
    	else {
    		
    		// Save the current version
    		ar << myint << myfloat;
    
    	}
    }[/code:2etwz5zu]
    
    If you don't do it fully backwards compatible like that, all old .caps using your plugin break and will fail to load.  Again, lots of plugins and behaviors use versioning, so check out some on CVS.
    
    Two important points:
    [ul]
    	[li]In this case, you must initialise 'myfloat' to a default value in the edittime constructor.  If you are loading an old .cap (using Version 1), 'myfloat' will contain undefined data unless it has a default in the constructor, because otherwise nothing is ever written to it.[/li]
    	[li]The runtime loading code [b]must support all versions[/b] of the edittime serialize data.  If you open an old .cap using Version 1, and immediately hit Run, the runtime is passed the Version 1 data ([i]without[/i] 'myfloat').  Again, it will crash on preview if you don't support the old version.  So you basically need the same loading code in OnCreate() as you have in the EditExt :: Serialize() loading code.[/li]
    [/ul]
  • So you can easily support ".x" meshes with textures.

    It's never that simple. It has to integrate with the collisions system, the effects renderer, the bounding box and viewport system, etc etc etc. (and people will report it as bugs for anywhere it doesn't integrate properly, and rightly so). It's not a matter of dumping in a mesh. It's got to work nicely with all the other features in Construct for it to be worthwhile and not a useless gimmick. And that can be hard work.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • voted, hope it wins . (what do you win?)

    The winning project just gets announced at OSCON in July... no real prizes... just publicity and probably a shiny badge

  • Seriously, not the best place for Construct. It's a development tool, should've been placed with the other dev tools.

    We only got enough nominations to make the "Best project for gamers" category... that wasn't even my first or second choice!

  • I think Rich is working on an online multiplayer plugin that should work over the internet.

  • OK, well, I think you should read this. 'Unstable' builds are for testing only - it's not intended that people import their serious, important projects to unstable builds to continue them - precisely because of what happened to you! Things can be seriously broken in unstable builds (in fact, you should expect it), so the plan is everyone imports their .caps, gives it a quick run to check if everything's working, and if it's not, file a bug report. Then keep using the last stable build and only upgrade to the next stable build!

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,443,614 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x109
    Coach One of your tutorials has over 1,000 readers
  • x63
    Educator One of your tutorials has over 10,000 readers
  • x3
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x36
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs