Hi There,
I am new to Construct2 Community.
I am trying to achieve to create a plugin which is just do a simple math, alert result and return result to game like adding it to an array or to a textbox.
edittime.js :
AddNumberParam("1st Number", "description bla bla");
AddStringParam("2nd Number", "desc bla bla");
AddAction(0, af_none, "Do Sum", "SUMZZ", "SUMZZ", "num1 + num2 .....", "DoMath");
[/code:2lyjtg1k]
[code:2lyjtg1k]
runtime.js :
Acts.prototype.DoMath = function (numa,numb)
{
var total = numa+numb;
alert(total);
//return total; actualy right now i dont have any idea how to return...
};
[/code:2lyjtg1k]
I added a button to layout and when you click to button i expect see a single alert.. But when i click to button, it keeps showing same alert window non-stop..
Isnt there a way to run these actions once for every click ?