R0J0hound's Forum Posts

  • Hmm... it works with my behavior.

    Try logging the array to the console every step of the way. You can verify this is added to the array by logging it to the array before and after. If it's resetting to empty every time then something is amiss.

    The actual oncreate function in my plugin looks like this:

    behtypeProto.onCreate = function()
    	{
    		if(!this.behavior.state)
    		{
    			this.behavior.state={
    				objList:[],
    				enabled:true,
    				sortOnce:false
    			};
    		}
    		this.state = this.behavior.state;
    		this.isoList = this.state.objList;
    		
    	};[/code:p2uj6fho]
    The only difference is I put the array in an object first, but that shouldn't be necessary.
    Otherwise i'm adding and removing from it in the same way.
  • I looked at what I did and the behavior type is unique per object type you add the behavior too. So I ended up adding it to the behavior itself like so:

    behtypeProto.onCreate = function()
    {
    	if(!this.behavior.mylist)
    	{
    		this.behavior.mylist=[];
    	}
    	this.mylist= this.behavior.mylist; // this is just for convienience
    };[/code:18t9uomz]
  • I handled that in my isometric behavior by managing my own list of instances in the behavior. The list is in the behavior type so any instance with the behavior can access it. Then I add and remove the instances under the create/destroy functions of the behavior.

  • You mean the instance that has the defaults for newly created instances?

    If you save you capx as a project folder and look in the xml files in the layouts folder then look at all the lines with say

    <instance type="TiledBackground" uid="0">

    The one with the lowest uid is the first I think. You probably want to use some searching software like agent ransack to automate the searching.

  • probably the way to do it would be to call a c2 function inside the checkanswer() function and set the global from c2.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The beta is as stable as any other release imo. It's labeled beta because that is where new changes are implemented first and sometimes there a glitches related to them. However in the case of the last beta, the fix was in response to facebook changing it's api.

  • int() works for negative numbers.

    int(3.14) = 3

    int(-3.14) = -4

  • It was just fixed in the latest beta, so I assume it works there.

  • You need a seperate frame per image.

  • Function.param(v) isn't right. To access the first parameter use function.param(0). So maybe set v to that first.

  • You need to look at what the tilemap plugin does when it modifies the tilemap. It looks like it sets some booleans indicating things need to be updated, then in turn the draw function calls another function that checks the booleans and updates as needed.

  • IJCT

    Best I can tell from looking at the events is they have to be done in order, and triggers can be run at any time.

    Basically the the three events are:

    "every tick" which calculates the stating velocities

    "the input check" which launches an actual physics object with the calculated velocities

    "the loop" which takes the calculated velocities and simulates physics steps to find the path of the ball.

    So if you want to launch a ball with a trigger such as a function you need to run the every tick event first somehow. Could be as simple as copying it.

  • There's this program that can do that:

    • Post link icon

    Gdevelop predates C2 and actually was made before the author was aware of Construct Classic.

    Also it initially had only win/linux export so the whole thing was designed differently.

  • When you load just re-create the objects from the array. The only problem is while saving can be done with a family, you need to create the individual sprites instead of creating the family.

    You can look here for something similar: