Set text action and Instance Variables

0 favourites
  • 4 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Problem Description

    I have a Sprite that has a few instance variables.

    In the event sheet, I've added an "every tick" event with a "set text" action where I set it to show me the parameters of the sprites instance variables.

    If I delete one of the instance variables, the "set text" action is automatically deleted from the event sheet.

    Attach a Capx

    https://www.dropbox.com/s/t3cvnov0s3mzt ... .capx?dl=0

    Operating System and Service Pack

    Win 7

    Construct 2 Version ID

    r255

  • That's a part of Construct2. If you delete an object or a variable, it deletes any references to it in the code (since the code would be broken, referencing something that doesn't exist).

    You have to remove those kind of parameters references manually before deleting the variable. Or, if you have multiple sprites with the same variables, put them into families and assign the variables to the family, so you can add and subtract sprites without jeopardizing the code.

  • Ok ... but since I have other variables in that "set text" action that I reference, too, is it normal to be deleted ?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes, I believe so. Any action or condition that contains the deleted variable will be deleted, even if there are other variables mentioned (since you can't reference things that don't exist)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)