Multiple possible tiles? Logical operators?

Get help using Construct 2

Post » Sat May 06, 2017 2:43 am

alright, here's the link:
https://construct3.ideas.aha.io/ideas/C3-I-172

and for the behavior, in-case anyone is interested:
Code: Select all
Cnds.prototype.CompareTilesAt = function (tx, ty, cmp, t)
   {
      var tile = this.inst.getTileAt(tx, ty);
      
      if (tile !== -1)
         tile = (tile & TILE_ID_MASK);
      
      var tileArray = t.split(",");
      var tileCmp = false;
      for(var i=0; i<tileArray.length; i++){
         if(cr.do_cmp(tile, cmp, parseInt(tileArray[i]))){tileCmp=true; break;}
      }
      
      return tileCmp;
   };

as far as I can tell from my own uses, it works well.
B
47
S
22
G
65
Posts: 1,129
Reputation: 38,399

Post » Fri May 19, 2017 11:09 am

Prominent wrote:yeah, that's an option, but still is not adequate in my opinion.
In my case, I just added the ability to specify multiple tiles via a string "0,1,2" to a custom Behavior (I created a behavior where I just add stuff that is missing from c2).. So now I can do it in a readable fashion. This should be made available by default though. I submitted the suggestion to their suggestion thing.


Sorry for my absence. I've been trying to finish getting a Minecraft server up and running.

I would love to see what you've done with your custom plugin that "adds stuff" that "should be" in C2. There are a number of little things that get me about C2 (nothing off the top of my head since I've been in java land the past few weeks) but it would be interesting to see what you got.
B
27
S
7
G
6
Posts: 268
Reputation: 3,852

Post » Fri May 19, 2017 5:10 pm

I haven't added too much, but I do have ability to set margins/edge style/fill style of 9 patches. Setting the frame duration of a sprite animation.
I can also retrieve those values.
I can also retrieve the imagepoint name if I give the animation/frame/point index.
I can also retrieve the image point index if I give the animation/frame/point name.

whenever I need some capability like those I just add it to this behavior.
B
47
S
22
G
65
Posts: 1,129
Reputation: 38,399

Previous

Return to How do I....?

Who is online

Users browsing this forum: Christmas, dop2000, Hyune and 17 guests

cron