it should as long as objcharacter2 is in the room and you might want it to be the same spelling as the object name
if instance_exists (objcharacter2) {x=objcharacter2.x};
so if theres a cap in the name then you make that same letter a capital ok
yeah it does have the correct spelling....but this is to be done with a health bar peoples.....can someone please explain how this will work in the situation i have......if you want pictures of my screen......plz tell me your email address
This error normally occurs because you are trying to use the variable of an object that doesn´t exist... In your case it is trying to access the x coord of objcharacter2, which means that an instance of that object doesn´t exist yet... Try changing the code to this and see what happens...
if instance_exists (objCharacter2) {x=objcharacter2.x};
...and if you want a more complete explanation then look for Flexaplex on the board index and in his sig there is a very good FAQ about the error you have recieved.
I hope that helps...
Yes bit will that help with my problem to do with the health bar positioning? I am sending a friend request so plz accept it.