I tried to make temporary variable (var) and then I also tried local variables. Instances were created but again the "other" was not working. (Neither worked if I replaced other with the temporary or local variables.) And the project I experimented yesterday was corrupted and LGM gave
this error. (So, I tried the original project file again today.)
The project I tested worked in Game Maker. Could this problem happen because I've imported a project made in Game Maker? It's still weird how everything else in the imported project seems to work in Enigma except the with().
EDIT: Now it works! Although the solution is a bit gimmick...
else if !instance_exists(o_pla)
{
var pla1, ps1, pj1, pf1, psp1, pla2, ps2, pj2, pf2, psp2;
pla1 = player_1;
ps1 = p1[1];
pj1 = p1[2];
pf1 = p1[3];
psp1 = p1[4];
pla2 = player_2;
ps2 = p2[1];
pj2 = p2[2];
pf2 = p2[3];
psp2 = p2[4];
with (instance_create(64,200,o_pla))
{
side = 0;
player = pla2;
spede = ps2;
jumpspeed = pj2;
force = pf2;
sprite_index = psp2;
}
with (instance_create(560,200,o_pla))
{
side = 1;
player = pla1;
spede = ps1;
jumpspeed = pj1;
force = pf1;
sprite_index = psp1;
}
}
So, I got the thing working with this code. But as it can be seen, the solution demands more work compared to previous and there are many other situations where I've used to use "other" or such. It would be a lot simpler if the referring would work. I don't even know would it be possible to get following line of code working if referring to another object's variable doesn't work:
inst.helth -= hit - inst.defense;