linkman2004's Forum Posts

  • Yeah, most of the behaviors have a "Set activated" action which enables/disables the behavior.

  • The newer unstable releases have input boxes for image point locations.

  • Moved to "Open topic"

    I'm sorry, but posting a thread in a board you know it doesn't belong in isn't allowed. A shadow thread has been left in place so people can still find your thread through "Construct discussion", but please refrain from doing this again.

    On a less strict note, the average "Construct Discussion" thread has only 15% more posts than the average "Open Topic" thread.

  • Yeah, I just remembered that you need to clear the vector with clear() before doing anything else when loading. That should fix your problem, although it's hard to say without seeing the code.

  • Hate to say it, but there's a lot wrong with your CAP. First, we'll start off with the main problem.

    First we'll take a look at this chunk:

    <img src="http://dl.dropbox.com/u/917406/foreach.png">

    These "For each" loops are unnecessary and messing up the picking. Instead of only picking the most recently created object, it's looping through each object created up to now and performing actions on it. This means that whatever happens to the last object you create will happen to all of your objects. To fix this, just take the actions from the "For each" loops and place them in the "Repeat" loop, then put the sub-events to the second "For each" loop as a subevent to the "Repeat" loop and get rid of the "For each" loops, like this:

    <img src="http://dl.dropbox.com/u/917406/noforeach.png">

    Also, the int() cast when generating a random number is unnecessary and seems to be messing things up. And since you only have four objects, the expression should be this: 1 + random(4)

    Next up, we have this chunk:

    <img src="http://dl.dropbox.com/u/917406/else.png">

    These else conditions are unnecessary and messing things up due to issues with the else condition. The checks to see which animation is playing are also unnecessary, as are the actions to tell the current animation to play. An animation automatically starts playing when you switch, so they're not needed. This chunk should look more like this:

    <img src="http://dl.dropbox.com/u/917406/noelse.png">

    And that should get it working. Not only will this fix the problems, but you'll also get cleaner code, which is always a good thing.

    Here's a download for the modified CAP.

  • Also, this should be posted in Construct Engineering.

    Heh, I didn't even check which forum this was in. Moved.

  • I don't know if this is in the latest stable version, but this has actually been a feature for a while now(I coded it, in fact). Here's the latest version of the plugin, or you could download the latest "unstable" release of Construct.

  • When serializing the data in a vector you need to serialize the size of the vector and then loop through and serialize separately each element. Here's an example:

    // RUNTIME serialization
    void ExtObject::Serialize(bin& ar)
    {
    	if (ar.loading) {
    
    		// Load vector size
    		int vectorSize;
    		ar >> vectorSize;
    
    		// Temporary string to hold the loaded element
    		CString tempElement;
    
    		// Load each vector element
    		for (int i = 0; i < vectorSize; i++)
    		{
    			ar >> tempElement;
    			myVector.push_back(tempElement);
    		}
    
    	}
    	else {
    
    		// Save vector size
    		ar << (int)myVector.size();
    
    		// Loop through the vector and save each element
    		vector<CString>::iterator i = myVector.begin();
    		for ( ; i != myVector.end(); i++ )
    		{
    			ar << *i;
    		}
    
    	}
    }[/code:13klpbmo]
    I hope this helps.
  • I could be wrong, but I don't think Construct uses a specific color for transparency. Normally you should load images that already have an alpha channel; for example, PNGs.

    However, you can get rid of the background around that art by selecting the outside part with the magic wand tool and deleting it.

  • I wonder if is possible to do in top down view race game, that camera follow the car like in 3d games.

    Like from behind? You can't do that, the camera is limited to two dimensions.

  • Can't you just drag the condition to be a subevent?

    That's an event, he wants to drag a condition out of an event and place it in a new sub-event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been considering giving this a go lately, although learning Winsock is currently a roadblock as there's not much in the way of decent tutorials for it, nor are there any other decent networking libraries that I can find.

  • Try looking into the "Instance hit" option with the bullet behavior. I'm not able to make an example right now, but if you need one I can pull one together later. The wiki-page for the bullet behavior should be able to give you a good idea of how it works, though.

  • Put all of your music and sound files in the "Files" folder.

  • Since I'm more skilled with C++ now I'll look into it again. It might not be too tough to do what you need. No promises, though.