cacotigon's Recent Forum Activity

  • Ashley, I've discovered another bit of strange behavior with the pick although I'm not willing to discount the possibility that maybe I'm just misunderstanding how the pick is working in this case.

    <img src="http://dl.dropbox.com/u/12667027/Construct%202/ForloopPickBug/forlooppickfailure%20screencap.png" border="0">

    Since I've reset my pick list, how come referencing a specific BaseArray via a (UID) index doesn't seem to be working properly?

    I created this capx from scratch to test it.

    Forloop Pick Project

  • Ashley: I don't think that this is an event code copy problem, I think it's related to my prior misunderstanding of the Construct pick inheritance as in forum post:

    Pick inheritance post

    Thanks!

  • Ashley: Regarding Option (3), that's what I had initially; separate array objects, the problem with this is that I have a rexrainbow function which takes an array as a method parameter. Normally, I would consider putting all of my arrays into a single Family, but I assumed that cast to Family like ArrayFamily(Function.Param(0)) where Param(0) is a UID of an Array belonging to ArrayFamily would fail or would have some unexpected results since Family is still fairly new and Family behaviors are not yet implemented.

  • Ashley

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU!

    That's exactly what is happening! I had no idea that a PICK command in a subevent could only pick from its inherited "pick list" which happens on a Create object command. Subeventing the Pick UID code under a Pick All completely fixes the problem. I think I've got a much better understanding of the code-flow now. Also, I created a completely new project and tested extensively with sprites/arrays/etc and there doesn't seem to be any bugs. Hurray!

  • As a possibility, you can at the top of the event sheet, do a specific object spawn with a bunch of branching if statements for which object you want to spawn. After that, you can use events which act on the Family, however, as mentioned in the r75 event log, families do not support added behaviors, and instance variables.

    To get around this, you could have a single object called ChessPiece and have different animations each of which corresponds to a different piece, queen, king, rook, knight, bishop, and pawn. Then you can just set the appropriate animation, and use event conditions which compare against a pieces current animation.

  • You could have a 2D array where the Y value is associated with the language and the X value is each respective string. Then at the beginning you could have a menu layout for choose language and a global var called ActiveLanguage. Then whenever you set a text object to a string just pull the appropriate one from the array.

  • Kyatric, as I mentioned before, this code is from a much larger project, one where I initialize several different arrays, each containing different information. Sorry, can you explain what SOL means? Thanks for the info about the function plugin, I will try removing it and seeing if the same problem occurs.

    Yann, that seems strange, especially since I can access the arrays class properties immediately after create object including the UID, which would seem to indicate that the object has been already created. Unfortunately, if I make this change, my code order is going to get messed up, I guess I might have to make a IsReady var and group everything else under.

    I'm still kind of unhappy about this, in normal Construct behavior, after you create an object, any further commands will act on that object essentially an automatic pick operation occurs, so why doesn't a deliberate pick work? So frustrating.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh I know that, I create objects on layout start and then save there UID values into associated global vars.

  • I'm so frustrated I feel like punching a baby.

    Can anyone please tell me what the heck is going on with this code? A pick operation is not picking *anything* even though the UID is valid and the object type is correct.

    I'm seriously about to cry, I've been at this for the last two hours.

    Here's the capx for anyone who could shed some light on this...

    (It's pretty simple)

    Pick failure project

    I gutted the project file so that it would be a small capx download, cause this originally comes from a much larger project.

    Help me obi-wan kenobi, you're my only hope (bends over really ackwardly)

    -- cacotigon

  • Just to give everybody a heads up in case you want to copy some event sheet code between different projects, it might not show a warning message, BUT trust me, DON'T DO IT.

    If you attempt to copy over an event sheet that contains references to objects which don't exist in the current project, Construct will warn you about that. When that happened, I tried to create the objects which were referenced and give them the same names, and then copy over the event sheet. At that point, Construct didn't throw any warnings or errors, everything looked just fine, the entire sheet copied over, and it looked like I was going to be saving some serious time, since I've got a lot of projects where certain event sheets (which I essentially use as containers for each respective sprite's logic) were nearly identical.

    Fast forward to almost two hours later, where some of my scripts just weren't executing properly, and I finally narrowed it down some pick events were not matching known UID values, meaning that even though they appeared to be doing a pick on the same object as the last project with the same name, they obviously contained some address references that were different. Both the Pick operation code and the Create Object code was stuff I had copied from the aforementioned project's event sheet.

    After re-creating the aforementioned picking and associated create object commands from scratch, the code worked. Anyways, this is just a heads-up to anyone thinking of trying to open up multiple projects in the project tab and trying to copy over event code. As it stands now, unless you really ENJOY putting tons and tons of Append Text statements in your code, I wouldn't recommend trying it.

    -- cacotigon

  • Hey R0J0hound, thanks for the link. I went ahead and implemented that in my code. Works great!

  • Just some observations and suggestions regarding keyboard shortcuts.

    The keyboard shortcuts outlined in the keyboard tutorial such as Add Action (A), Add Blank subevent (B), and Add Condition (C) don't work unless a condition/event/action is first highlighted with the mouse. Unfortunately, you can't navigate within the event sheet using tab / arrow-keys, unless you have clicked and highlighted, this seems to defeat the purpose of a hotkey, since I have to use the mouse in the first place. And after every event/condition/action creation, the event sheet loses focus and I have to click inside of it again.

    Another similar thing happens when you bring up the Add Events or Add action box, the cursor is automatically in the 'Search box' which is a very useful feature for quickly finding the right event / condition, unfortunately, let's say I type 'time' to only find the time actions under System, now I see four different options, but you can't use the arrow keys to navigate down there, you can't even tab down to it, so I have to type in the full beginning part of the name and narrow down the 'results' to 1 before I can hit the 'enter' key and proceed.

    Small things like this, especially for a keyboard warrior like myself would really help to maximize our workflow. I know the idea of Construct is to try to get away from scripting, but I think keyboard navigation would be really useful for those of us with netbooks, etc when we don't have a proper mouse available, etc.

    The first time I used Construct, it felt like I was playing Diablo, I had to click the mouse so many times. :) A while back I suffered from tendonitis primarily from excessive mouse usage, (I know I know play me the violins), but it would really be great if we could minimize the amount of mouse usage.

    Thanks a lot!

    -- cacotigon

cacotigon's avatar

cacotigon

Member since 10 Mar, 2009

None one is following cacotigon yet!

Connect with cacotigon

Trophy Case

  • 15-Year Club
  • x2
    Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies