Access pixel from a bitmap of other sprite

For developers using the Construct 2 Javascript SDK

Post » Tue Apr 12, 2016 1:08 pm

I am working on a plugin, which needs more than its own texture, it also needs to have an access to another Sprite's texture pixels.

I created an action:
Code: Select all
AddObjectParam("Map", 'A map should be white with black regions');
AddAction(19, af_none, "Set map", "Map properties", "Set map to {0}", "Set the map.", "SetTheMap");

Then I added a function to actions:
Code: Select all
Acts.prototype.SetTheMap = function(map){
   /// here I need to access the map's pixels.

How do I access map's bitmap's pixels? Is it possible?
Posts: 30
Reputation: 540

Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests