linkman2004's Forum Posts

  • Thanks for the comments, guys. Glad you're all liking it so far.

    but a tip I've noticed to get people to try your stuff, is to post an exe sample as well

    that way the lazier folks (myself included were it not for said plugin devness) can try it out before they install a new plugin they may not be interested in

    This is a good point. I'll look into bundling a bunch of examples into an EXE later on.

    p.s.: For STABLE examples use the STABLE version of Construct. I had to download Construct 99.3 for trying the examples.

    Whoops, sorry. I always forget about this. I'll try and make all future examples for the current stable build.

    Question: Would collisions and bumping work or be possible?

    That's actually a good idea, and it should be rather easy to implement. I'll try and squeak that into the next build.

  • You could add all of your messages to a list box, then get the text from a random line. Here's an example for how it could be done:

    Random message example

  • Although this object could pretty much qualify as done, I'm going to post it here as a beta for now to make sure the bugs are worked out. Anyways, onto what this plugin does.

    What it does:

    This is essentially a far more advanced version of my Orbiter behavior. BUT... instead of merely rotating an object around another object in a completely predictable/stable orbit, this acts more like a gravity well. You can set an object to act as a satellite, an attractor, or both, where every object could have it's own pull on the others and orbit the others as well.

    Also, you can apply forces to the objects(in a way similar to the physics behavior) to make them move in certain ways. You can use the movement actions to make a space ship movement, for example.

    Parameters:

    <img src="http://files.getdropbox.com/u/917406/parameters.png">

    Actions:

    <img src="http://files.getdropbox.com/u/917406/actions.png">

    Expressions:

    <img src="http://files.getdropbox.com/u/917406/expressions.png">

    Conditions:

    <img src="http://files.getdropbox.com/u/917406/conditions.png">

    Download:

    DOWNLOAD NOW - 102KB

    Examples:

    Gravitation example pack - 22KB

    Full documentation will come when I release the completed version. If you have any specific questions about what something does, go ahead and ask and I'll explain. Be sure to let me know about any bugs you find, and have fun with it.

    By the way, just thought I'd mention the speed impact of this object. I would keep the amount of objects simultaneously orbiting and attracting to around 100, depending on what type of processor you have. Although it's good to point out that this object is 5-10 times faster than doing the same thing through events.

  • I didn't even think of doing that with the angle() expression. I'm using the function to get the angular speed of an object based on it's separate X and Y speeds.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A function I didn't realize was missing until I found out how amazingly awesome it is is atan2(). Any chance it could be added for the next build?

  • In the projects tab on the right, right click the "Objects" folder and click "Add object folder". You can then drag the objects from the "Default" folder to your new one.

  • Conditions and events are generic programming terms. Conditions are like IF statements, where you check the value of something. Events are things such as keyboard key presses or mouse clicks. They're not specific to any one program.

  • Ooooooooo... it turns out the problem was something entirely seperate from the GetData() code.

    Sorry for all the trouble, and thanks for the help.

  • So, if I understand this correctly, your example would merely return the value of the integer that MyIntPointer is pointing to, right? My code:

    	int* MyIntPointer;
    	int MyInt;
    	MyIntPointer = &MyInt;
    	MyInt = 5;
    	stuff = (*i)->GetData(1, MyIntPointer);[/code:jwg63bgz]
    The code I put in the GetData() function is the same as what you have.
    
    Shouldn't what I have above return 5?  I'm using a Construct expression to access the value of stuff, but it always comes back as a random value between 20 million and 25 million.
  • I've fiddled around with it the way you show, changing the asterisks and stuff, but I can't get it to work. That, and i don't know what's up with *MyInt. Do you have a working example of the code I could look at? I have trouble grasping this stuff alot of the time.

  • I'm still not entirely sure I get this. This is what I have in GetData():

    long ExtObject::GetData(int id, void* param)
    {
    	switch (id)
    	{
    		case 1:
    			return MASS;
    	}
    	return 0;
    }[/code:vw3xcad2]
    This is where I try and retrieve something:
    
    [code:vw3xcad2]stuff += (*i)->GetData(1, (float)param);[/code:vw3xcad2]
    Thing is, it throws a fit about how "param" is undeclared, and how it can't convert from "void *" to "float" and stuff.  I'm not exactly sure what you were getting out, so I'm getting kind of confused here.
    
    The plugin I'm working on is a gravitation behavior.  You put it on objects and you can set weather objects are attractors and/or satellites.  Kind of like a much more advanced version of my orbiter behavior.
  • Bleh, I'll try.

    By the way, I have another question and I'm sicking of making new threads, so I'm going to ask it here. How does the GetData() function work? I know lucid asked about it, then he figured it out, and then he didn't tell anybody what he did. I know you have to specify the values to return inside the function and assign what seems to amount to an access number to it.

    Thing is, I don't know what the second parameter when calling it is supposed to be. So, how would I use this to access a value from one of the objects that my vector(from the other threads) is pointing to?

  • There are no limits on anything like this as far as I'm aware. The real question is why you'd want that many.

  • I don't see the physics object on the CVS.

  • I lied, here's another question. How would I go about making a universal setting for a behavior, for example, something like the physics behavior where the gravity parameter is universal across all objects with physics?