Flawed event sheet...

0 favourites
  • 10 posts
From the Asset Store
14 amazing sound files of game events like Level Ups, Level Completes, object spawn, object taking etc.
  • Ok C2 community...

    Not sure if my syntax is correct here... I'm having trouble getting my Lives Counter global variable to work right. I'm using sprites instead of a text box for the numbers, but I doubt that has anything to do with the problem. People familiar with the event sheet may see what I'm trying to accomplish here... I want to subtract lives from the global, and get to the corresponding layout and have the animation(s) operate correctly... So far it's not becoming a reality with this event added in

  • You are ANDing PlayerLives=3 with the trigger - break it out as a sub-event like the others, or the rest of the code will never be run, as PlayerLives won't be 3.

  • blackhornet

    Thanks for the advice! I had a similar thought, but I believe your route would be the best option. Again, thank you for the quick reply!

  • blackhornet

    I'm still having problems getting it to work (even when I branch it out in a sub-event) but I think it's the way I have the syntax set up... Will re-arrange things and hope for the best...

  • I just typed for 20 minutes and hit the wrong tab... smh. Quick version (forgive me people):

    Is there a way for one event on a separate sheet and layout to trigger a action (or affect another event) on a total different sheet and layout??? For example: If I want my player to lose a life, and upon losing the life is "transported" back to the UI for player lives remaining, is this even possible? The fact that I'm using sprites for fonts may complicate things (i.e. Player Lives x 3, x2, x1 etc...) If I need to upload jpegs of what I'm talking about please let me know... I'd be happy to make a ton of printscreens if it might help facilitate this process...

  • You can include Event sheets in another Event sheet. Put your common code on one, and include it for any others that need it. Right-click at the very end of an Event sheet to see the popup menu with "Include event sheet".

  • blackhornet

    I figured that out earlier, unfortunately that's not going to solve my issue... I got the event to run (after checking my logic... If one thing isn't in the right place.. well you know) but now I'm having trouble with the "right" animation running... It's suppose to set the UI for player's lives to the number 2, but it goes straight to 1 and I have each font on a separate animation frame so I have no clue what's wrong with it now... unless my syntax for subtracting lives is "off" somewhere in the code, it shouldn't be acting all squirrelly like this...

  • BTW I totally got rid of the syntax pictured above in the initial post...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • blackhornet

    Thanks again dude! You got my mind going, and hopefully I got this syntax on the right track... so far so good... Finally got the sprite/font thing situated (I think... fingers crossed)

  • My Geezzz.... I FINALLY FIGURED IT OUT!!!! lol! It was as simple as "whatever you have on one sheet, has to be done in the other"... I'm wondering if blackhornet's idea of adding the whole event sheet would have been a better choice but I got it to work, and I have a "heads up" for the next problem (which I'm sure is right around the corner lol!) I really appreciate the reply dude...

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