Jump to content


Photo

Single Instance Variables


  • Please log in to reply
2 replies to this topic

#1 CaKsTeR

CaKsTeR

    GMC Member

  • New Member
  • 761 posts

Posted 24 April 2008 - 04:22 AM

Firstly, I've troubleshooted for hours, and haven't figured this out.
Secondly, I've looked through the forum for similar topics, and haven't found any.

Alright, so my problem is:

I have an object. obj_sign. This object holds a NON-GLOBAL variable called "bubble". In the creation code of each obj_sign I place on the map, I type in the following code:

bubble="insert sign text here"

Then, in the draw event, I typed this code:

draw_text(obj_player.x+35,obj_player.y-112,bubble)

According to what I've typed, it SHOULD only display the text that is given in that instances creation code, and yet it displays all the text from ALL the instances of obj_sign in that room. I don't understand why. I'm sorry if the answer is obvious, but I can't take it anymore ::lmao::

Note: Yes, I do have all that misc. stuff like getting rid of the text, etc.
  • 0

#2 Dangerous_Dave

Dangerous_Dave

    GMC Member

  • Global Moderators
  • 9276 posts
  • Version:Unknown

Posted 24 April 2008 - 04:27 AM

You are displaying all of the signs text at the same place (near the player). So each instance with its own text is drawing its own text there. You probly want to throw in a distance_to_object(player)<50
  • 0

#3 CaKsTeR

CaKsTeR

    GMC Member

  • New Member
  • 761 posts

Posted 24 April 2008 - 02:34 PM

Thanks so much!

Finally that bug is fixed, and I can continue living! ::lmao::
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users