Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: Dendrobats on September 23, 2015, 03:51:35 PM
-
Hey,
I am trying to make some dinamic enities, but when I load them the dont recieve mouse interections.
They apear on scene but dont have any mouse imputs, Please help.
Code:
global MoveLayer = Scene.InsertLayer(4,"move");
var locx = actor.X - 80;
var locy = actor.Y - 40;
var num = 0;
var i;
for(i = 0; i < (ACpoints/3); i = i + 1)
{
var tile = MoveLayer.AddEntity("movepoint");
num = num + 2;
locx = locx + 85;
locy = locy + 45;
tile.SetSprite("interface\Battle\move"+num+".png");
tile.AttachScript ("scripts\myMoveTile2.script");
tile.X = locx;
tile.Y = locy;
tile.Active = true;
tile.Interactive = true;
and this is attached script:
on "MouseEntry"
{
this.SetSprite("interface\Battle\move4-hover.sprite");
}
on "MouseLeave"
{
this.SetSprite("interface\Battle\move4.sprite");
}
-
OK,
I found problem, it was because PNG was with some transparency.
Added it to sprite without pixel precise and now it works at should.