dop2000's Forum Posts

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

  • So, the main object is Fighter_Control, it's in a container with a Dictionary. And you also have Fighter_Images family, which should be linked with each Fighter_Control. Is this correct?

    Is the Control_AI variable unique for each Fighter_Control instance? If it is, then it should be enough to associate Fighter_Images instances with their corresponding Fighter_Control, and to pick them in any events.

    But from your screenshot it looks like Control_AI is not unique, for example can it be -1 for both Fighter_Control?

    If Control_AI is not unique, or if its value can change during the game, then you should add another instance variable Fighter_Control_UID on the Fighter_Images family, and use it to link images with the control instance.

  • Check out this demo:

    howtoconstructdemos.com/create-a-realistic-chain-or-rope-with-physics

    Don't use Pin with Physics objects. If you need to fix it in place, set it immovable.

  • You are just guessing, you need to read about arrays.

    construct.net/en/make-games/manuals/construct-3/plugin-reference/array

    freecodecamp.org/news/data-structures-101-arrays-a-visual-introduction-for-beginners-7f013bcc355a

    You now have a 2-dimentional array. X index is the level (character or object). In Y=0 index you have XP requirement for the character leveling up, in Y=1 index you have have char_level requirement for the object upgrading. So you need to lookup the correct Y index.

    In my opinion this array structure is confusing, especially for a beginner. I suggest making two separate arrays - one for character leveling up, another for your object upgrading.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Set Position will "teleport" the object instantly. If you need to move it over time to that position, use MoveTo behavior.

  • Add this action immediately after "Array Push Back":

    BursLevel Set at XY

    X=self.width-1

    Y=1

    Value=int(tokenat(tokenat(s, loopindex, newline), 2, ","))

  • Old functions are working in C3 runtime. And I hope will be supported for a long time (since they are used in many games).

    I actually had to add old Function object into a project recently, because I really needed duplicate functions with the same name in multiple event sheets. And I couldn't find a simple substitute for this with the new functions.

  • You can create a sprite like this with image point in the center and then spawn a new instance of this sprite every second at an increasing angle.

    Another option is to draw on a Canvas object.

  • In this case yes - you can use the same text file and add upgrade object's level to each line. You will also need to set array height to 2 and update some events

  • Why are you posting in C3 forum then? You are confusing people!

    Upgrade which object? I am guessing you have many different objects in the game? Does every object in the game requires the player to be level 5, to upgrade the object to level 1?

  • What object?

    Are you trying to make a database of items in your game? For example, item "small dagger", requires the player to be level 1. Item "large axe" requires level 9. Item "epic sword" requires level 25, and so on. Is this what you want?

    Then you need a separate file for this. And since you are using Construct 3, it's better to choose array file (not text). Right-click on Files, select New -> Array.

    You can edit data directly in the table, and store many different stats for your items - damage, price etc.

    Here is a small demo:

    dropbox.com/s/w82kn9iefrylkr0/ItemsArray.c3p