dop2000's Recent Forum Activity

  • That makes sense, although what could I use as an alternative? If I wanted to run something only once when the animation starts, or only once when a frame starts what would I use instead of trigger once?

    You start animations in some events, use the same events to run your code, or call a function from there. For frames - you can use "On frame changed" event, it's triggered only once for each frame.

  • I would suggest using function maps instead.

    Ashley I know about function maps, but they are not very well suited for large projects like this. At the moment I have about 7 "shared" functions in 10 different layouts. This number will likely grow to 10-15 functions and there may be 50-100-150 layouts in the game. With new functions, imagine the list I will have to scroll through in the Call Function dialog, or in the dropdown box for Map Function dialog! And I will need 1000+ actions just to create this huge map.

    Old Functions are closer to triggered events, and there is nothing wrong in having the same event like "On Item clicked" in multiple event sheets. So it seems fine to me to have the same function "Item_Click" in multiple sheets. If this was a design mistake, it was a fortunate one.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Think of it as the same one function spread over multiple event sheets.

  • WackyToaster Yeah, I used this method too - calling functions by name from an instance variable. But if I have 100 scenes with 10 custom functions that I need to call from each scene, I will end up with 1000 different functions names! Re-using the same function name in every scene is so much more convenient.

  • Since the rope is made with Physics, you should only move it with Physics actions. And don't apply too much force. If you try to pull it with some other behavior (Platform, 8-direction), it will break.

  • Here is an example of a simple follower for 8-direction

    howtoconstructdemos.com/simple-follower-for-8-direction-behavior-capx

  • You forgot to assign a tag to the music in event 13.

    Also, you might want to add "Trigger once" to event 50.

  • You need to post your project file with the imported tileset.

  • Save the file to your computer.

    Launch Construct 3. In Construct 3 menu select Project -> Open Local File. Or click "File" button on the start screen.

  • Why would you actually need duplicate functions? That doesn‘t sound that great. What‘s the exact use case you have? Just curious :)

    I'm making a point-and-click adventure game with lots of layouts (scenes) and hundreds of different items. There is a single MAIN event sheet included into all layout event sheets, which handles all the core mechanics in the game - clicking items, dragging items, combining, destroying, gestures, tasks etc. So far so good, right?

    But sometimes I need to run custom events and actions, for example, in "Save the princess" scene when a sword is dropped on a dragon I want to spawn blood particles. I can't do this in the MAIN sheet, obviously. That's why I am calling a function "Item_Arrived" from the MAIN event sheet whenever any object on the scene has arrived to its destination. And I have duplicates of "Item_Arrived" function in every small event sheet for every scene.

    So in the princess scene inside this function I can check if the item_code=sword and spawn blood. In another scene in the same function I can do something else.

    I have several such functions ("Item_Clicked", "Item_Arrived", "Task_Completed" etc.), with duplicates for every scene.

    If I had to create the same system with new functions, I would either have to make a very complex function map, or use a huge single function with hundreds of sub-events.

  • Open this file with Construct 3.

  • It doesn't matter what you use, dictionary or array. But since you have 1000 levels, array is preferable.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 279 followers

Connect with dop2000

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

30/44
How to earn trophies