AnD4D's Forum Posts

  • I think we need more than just a couple of people to get this in though...

    Seeing as we have the reset Global var action, I wouldn't have thought this would be hard!

  • Am I the only one who wants this? Are you all making tiny games or something?

  • Ashley - In developing my game at the moment, I need to go through the process of resetting all of my local variables and all of my instance variables (on my arrays) manually, one by one.

    It's proving to be very time consuming.

    Can we have something along the same lines of the Reset Global Variables action, but for local and instance variables, please?

  • Same here. I thought C2 DID load everything on start up though. I'd rather have a loader layout that can be used between levels.

  • You're telling me! I spent half an hour wondering why my game was working. First time I've noticed it.

  • Ashley - Just to follow up on this, another benefit to only having the relevant Local Variables appear is that if you use the same Variable name twice, on occasion it does not display the correct number.

    For example, everything in my game was working fine, but when loading up the debug to check out a "CurrentTurn" var, I noticed it was 0, when it should have been higher. I continued the game, and it didn't change. Eventually, I renamed the Local Var to "CurrentTurn2" and it appeared in my list, working perfectly. I just couldn't see the correct numbers.

    Is it possible to only show the local variables that exist on a given level, rather than all of them?

  • R0J0hound - Ahh, this "set x to sprite(sprite.iid-4).x+400" is what I've been looking for!

    Thanks!

  • Yeah, figured I'd need a new family. I currently have 21 and counting (very large game), so I'm trying to keep it down. Oh well!

    Thanks so much for the help!

  • Thanks a lot! I appreciate the help, but I do not believe this method will work.

    My game has 4 ships that I need to do this with, and all are already part of a family. I have tried to alter your code to allow a second sprite to be linked in via the same family, but it does not work.

    I will go with your initial advice, and just use separate objects. I was trying to avoid this, as my debugger is slowly turning into a nightmare, filled with objects. Sadly, groups do not transition over, so I need to scroll through dozens of objects just to find the one I'm looking for!

    I greatly appreciate your help though!

  • I've also tried doing it using the expressions within the Parameters for X, but not having any luck with that either.

  • I'm afraid I do not follow. If I have a choose by UID 1 (which is the copy) I will then need to tell it which one to pin to... but when I add a choose by UID 0 (The original) I can't separate this, as the two will read "Choose by 0 AND Choose by 1". I've never needed to do this, so never learned this part I'm embarrassed to say!

  • Nope, can't get pinning to work. It just tries to pin itself to itself, rather than the original. You can only choose the object from a list, rather than code it in and add a UID to the end

  • Hmm, I guess that could work. I'd need to have the object spawn itself, offset it's Y position, change the boolean, then pin.

    Nice, this could be a winner!

    This the only way to do it? Wish I could add extra parameters to these things so I can more easily reference them. Say for example I only want the object to follow on the x access, not both.

  • Not a very clear title...

    I have an object that I want to move using the arrow keys. Up down left right.

    Now, I also want to have a copy of the exact same object copy its movement exactly, but its Y position at a +200 offset.

    I've set up a boolean which separates them, so the arrow keys only effect the correct one, but how do I add in some code that gets an object to follow itself, but with a different boolean?

    I could do it easily with a different object, but I'm trying to cut down on my use of sprites.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The FPS drop only appears to be because I have so many variables on screen. I have say 10 levels, and each of those levels have 5 local variables. When I load up level 10, I expect to only see those 5 local variables. Instead, I see all other local variables, so I see 50 in total! This is what appears to be slowing things down, the fact that I can see everything at once. I know I can click on the eyes and hide and show certain things, but doing this on a regular basis for so many things is just tedious.

    Better organisation should help FPS and ease finding things.