A question regarding lots of sub-events

0 favourites
  • 3 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • Hello all, just a quick question:

    (sorry for the terrible title!)

    to explain better, I have an object that tells my sprite font what text to display when a key is pressed whilst overlapping it. The object has an instance variable that is different for each instance of it on the layout.

    Based of the variable in the event sheet i change the text to display.

    The sub-events that check what the variable is and tells what text to set has at least thirty different variations (desk, sign, tree, etc.)

    I'm sure the system I have is quite inefficient, but will it lag the system if i continue to use the instance variable to base the text off of? as far as i can tell it has no effect on the game's performance.

    (Certain areas on the event blocks have been blanked out for privacy :P)

  • It won't affect the performance. To trim it down you could put the animation name and text to display as instance variables on the Interact object. Then it would be one event 'set animation to Interact.var1' and 'set text to Interact.var2'

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks for the quick reply lionz! I'll probably look into more efficient ways to store text in the future, but if this works for now I'll keep using it. I'll also work on minimizing the animation code as well.

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