dop2000's Recent Forum Activity

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • Whoa, that's a very cool game!

    I didn't notice you have two very similar looking variables Control_ID and Control_AI.. But I still think the mistake is in the first condition - D_Fighter_Ruleset Key "Animation_Name"=Fighter_Control.Control_ID

    When you have two Fighter_Control objects with different Control_ID values, this condition will pick only one D_Fighter_Ruleset instance, belonging to the first instance of Fighter_Control. If you need to check the dictionary for both fighters, you need to add For Each above the condition.

    .

    The rest of the event looks ok to me, although I would strongly recommend removing Trigger Once from sub-events. Trigger Once doesn't work "per instance", so in case of multiple instances it will almost certainly cause bugs and problems.

  • It's hard to tell from the screenshot what are you trying to do there. If these events are located at the top level (not nested under a function or something) and executed on every tick, then the problem must be with the condition where you pick dictionary instance - D_Fighter Key "Animation_Name"=Fighter_Control.Control_ID.

    If you don't pick the correct Fighter_Control instance first, then this condition will use Control_ID value of the first instance. And will probably pick only the first dictionary instance also. So if you need to process all Fighter_Controls in this event, you should add "For each" at the top.

  • Your enemies can't walk because there are no actions telling them to walk. Yes, you are setting variables, but it isn't enough. You need to run actions like "Simulate control" or "Set vector".

    Also, in events 13-16 replace Enemy_bases with enemy_direction. If you pick an object in the event, you should use the same object in actions. If you pick a family in events, you should use the family in actions. If you mix them like you did, your code will not work correctly with multiple instances.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 280 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