I'm currently working on a shooter type game.
When the player shoots an enemy, I transport a new character called "Blood" to the location the enemy character was shot, using this code:
cBlood.ChangeRoom(1, mouse.x, mouse.y);
I noticed in some cases though, that cBlood does not transport anywhere near where the mouse was clicked (usually between -5 and -50 y coordinates from the click), and I wondered why. Then I remembered something about the .x and .y coordinates being screen coordinates and not room coordinates. (My room is infact a scrolling room in the dimensions 320 x 292)
So that means when I transport cBlood, he's changing to the screen coordinates of mouse.x and mouse.y, and not the room coordinates(?).
I think this is the case, and if it is, does anybody know how to override it?
That's exactly whatthe problem is, you're right.
This was asked in a slightly different context (Character.Walk not Character.ChangeRoom) not long ago here (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=30268.0). The same solution will work for you.
Works perfectly. Thank you.