Event Sheet Search for specifics

0 favourites
  • 15 posts
From the Asset Store
- This pack is suitable for shooting games, running games, platform games, and side-scrolling...
  • How do I search all event sheets looking for a specific action Setting an Instance variable?

    Search doesn't seem to like wildcards.

    I tried:

    "Set <variable name>"

    "<Objectname> Set"

    and lots of other variations.. nothing works. I have SO many actions that have the object's name and use the instance. I only want to see where I am using the Set Action because I'm trying to debug something... its REALLY hard to see!

  • Can you post an image of what you action are trying to capture in your search?

    However, in general if you are looking for a set action:

    Main method:

    1. Left click in an event sheet

    2. Ctrl+F

    3. Type in the search bar without quotes: Set [variable] to

    4. If you want further specificity then add in the value name just after the "to" in step 3: For example, Set [variable] to "Help".

    5. Ensure that all event sheets option is toggled

    6. Click Find

    Alternative method:

    1. Locate object in the project assets window

    2. Right click the object

    3. Click edit instance variables

    4. Find the variable you are look the set actions for

    5. Right click that variable

    6. Click find all references

    7. A search bar should show up with results

    8. Click the search bar at the top of the project assets window

    9. While the cursor is active in this search bar: Ctrl+F

    10. In the browser search method, type in the search bar: Set [variable] to

    11. You can now cycle through all instances of Set [variable] to that are present in the search results you produced from finding all references of the variable.

    *Note I wrote this off the stop of my head just from memory of the habit but this should help, but if you need something more specific, please clarify.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • so I have 126 results, all I want to see is all the places I'm setting the instance var ParentUID

  • 1. Left click in an event sheet

    2. Ctrl+F

    3. Type in the search bar without quotes: Set ParentUID to Player.UID

    4. Ensure that all event sheets option is toggled

    6. Click Find

    You can then further specify using the browser search method if other objects have the same action as muzzleFlash

  • 1StepCloser thanks yes I still get lots of results because of the ParentUID is on other objects as well

    I need to somehow only select muzzleFlash: Set ParentUID but I can't figure out the syntax.

  • After generating the list of Set ParentUID to Player.UID:

    1. Click the search bar in the Project Window (The window that lists your project assets)

    2. Ctrl+F

    3. In the browser search bar (Should be in the top right) search for muzzleFlash: Set ParentUID to Player.UID

    4. View the search list you generated (Not the browser search, but the one you generated beforehand that created a list of searches in a Construct 3 window itself) all instances of the muzzleFlash: Set ParentUID to Player.UID should now be highlighted.

    5. Click the up and down arrow in the browser search to jump from one to the next.

    *Note the browser search will pick up any text that matches the search term if its visible on the screen (this includes text in the current event sheet you are in) so you might have to move through the search until you reach the list of search results you generated.

  • 1StepCloser does the search results need to be in a window or at least not in a popup? my search results are in a pop-up dialogue box... hitting CTRL F does nothing.

  • The search results will be in the same dialogue box as you attached as an image. That is the list you generate, and then you open the browser search through the project window (search bar at the top of that window). Click that search bar, then CTRL+F.

  • you cannot Search that result window. I can open it to a window and I can search it.. but that is useless since it can't take me to the code. I have thousands of events and actions and need the GoTo option.

  • At this point, you just click the arrows to move to each one in the list, it skips to the exact match you have in the browser search, then just double-click the currently highlighted result to go to the code.

  • 1StepCloser I appreciate you trying to help, but haha that's such a convoluted approach! I mean, it works, sort of--I still have a scroll through a huge list. I think the Construct Team can do a little better than that!

  • I used to think the same way, so now I will introduce you to the concept of DRY:

    en.wikipedia.org/wiki/Don%27t_repeat_yourself

    In a case such as this where you are not pleased with the available methods of searching it's now time to look at the problem in a different way.

    You have the problem of needing to change too many actions of the same type. In the DRY mindset there shouldn't be a repetition of the same action to begin with. Thus, my recommendation is to create a function along the lines of "Set muzzleFlash", you can make it more specific but in general this function should be comprised of actions you find yourself constantly repeating in your code:

    Function: Set muzzleFlash(ParentUID):

    Action: muzzleFlash: Set ParentUID to ParentUID (In most cases I imagine the value you are passing in is Player.UID for the ParentUID parameter)

    I would refrain from repeating the same form of code throughout your projects because over time the required refactoring of code when changes are made becomes unreasonable.

    Now that you have a function set, let's say later on you need to add an action to set a variable in muzzleFlash, or you need to make an edit to how variables are set in this function, you now have two benefits:

    1. You can find all references of this specific function in your search results.

    2. You can edit the function to effect all instances where you are calling the function.

    Just my 2 cents.

  • no, I had a bug and I could see I was setting the ParentUID to a valid value, but at runtime it was null. I couldn't find where else I was setting it.

    I recently moved a bunch of code to #includes to be reused and I thought maybe it was something I was doing there.

    However, the problem ended up being that I forgot to add an object to this new layout and because that object never got created, when it spawned a new muzzleFlash it couldn't spawn anything because it didn't exist in the layout, so the next time I referenced a new muzzleFlash, it never was spawned so it picked the previously created muzzleFlash and put a null value (because I reference an object that didn't exist as the Parent) in the instance ParentUID.

    so the problem came from moving to a new layout and reusing existing code.

    But that's how debugging goes, you investigate one area to make sure you aren't doing something you overlooked and then from there you eliminate all the easy stuff. It was in that elimination phase that I was trying to rule out just assigning it a value I did not mean to... and the search function was making it really difficult.

    I've been working on this game for about 19 months, so it's pretty large! I won't be done for another 10-12 months.

    thanks for the help!

  • Cheers, I hope it turns out well, and even if it doesn't, then I hope the journey has been rewarding/meaningful for you.👍

    P.S. Just saw the project on twitter, well done, it looks great.

  • 1StepCloser oh it is! and thanks!

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