TELLES0808's Forum Posts

  • Lets use the tools designed for this.

    Containers, timers and booleans.

    https://drive.google.com/open?id=0B1SSu ... XVGcEQxMW8

    edit: as mentioned above

    I explained a complete workaround where he will be able to pick parts at any time.

    He containers is nice and only work when he want something spawned and pinned on the creation event, else, you should create and pin in in runtime like I described.

    For example, a Player shooting an array and the box is a separated object. If you place it as a container, then, it will spawn with the player and will be shown all the time, while you can create and pin it at runtime and delete it when its usage is finished.

    Another example is, what usage have a damaged hull on a brand new enemy? If you use container to spawn the damaged hull, it will be shown on the screen, or you can make it invisible and use the container, but once again, you'll need to pick it and turn it visible, plus, 100 enemies dragging on the screen a sprite object while it's not necessary is a waste of resource and memory (100x updating the position of the invisible damage hull sprite).

  • I'll suggest you the easiest way:

    Setup your combo animations to not loop. Setup an instance variable to the player and call it by Combo.

    On the event sheet, you'll need to setup the follow:

    Condition:

    Player pressed the attack button (A for example);

    Action:

    Set Player.Combo = choose("1", "2", "and so on");

    Sub-Condition 1: Invert (Player is playing "Combo"&Player.Combo);

    Sub-Action 1: Set Player animation to "Combo" & Player.Combo (where the first "Combo" is the combo animation name);

    Sub-Condition 2: Else AND Player animation frame = Player.AnimationFrameCount;

    Sub-Action 2: Set Player animation to "Combo" & Player.Combo (where the first "Combo" is the combo animation name);

    Condition:

    Invert it (is Pressing Attack Key) AND Player animation = "Combo" & Player.Combo AND Player animation finished;

    Action: Player.Combo = 0;

    I do believe it need some adjustments but will give you the idea.

    The problem with combo is:

    The player should press a key to start attack, but, it also need to check if the player is not performing an attack already, if not, start, else, wait it finish and attack again.

    To check it, you should make an instance variable where you'll store the combo number and check over the animation combo index if he is performing it.

    If you want give the player the right of perform the same attack in a subsequent combo, you should improve this code.

  • Pin always when you need something pinned on a moving object, else, pin and unpin. Try avoid check too much events at once in everytick and if possible use "triggers" and "else" where possible to make your events light, running only the necessary.

    You'll see it and understand better while you mature your usage of C2.

  • You can setup an instance variable right after creating the part with the UID of the created enemy, because the created enemy is in the same pool of objects you're dealing while creating the part.

    Example:

    On some event condition: System create enemy on layer X at X and Y position;

    Create (or make the enemy spawn at any of its reference points) "Hull part 1" at Enemy.X and Y;

    Pin "Hull part 1" on Enemy;

    Create (or make the enemy spawn at any of its reference points) "Hull part 2" at Enemy.X and Y;

    Pin "Hull part 2" on Enemy;

    If you're not creating the enemy in the same event, you still able to pick the part and set it to the enemy by conditioning the enemy with something.

    An example:

    On Enemy Health = 0 (it will pick the enemy destroyed in that moment);

    Create Object "Hull with debris" on Enemy.X, Enemy.Y (or make the enemy spawn it at any of its reference points);

    Pin Object "Hull with debris" on Enemy;

    Or another sample:

    On Enemy change animations to "Boss Part 2";

    Create Object "Powerful weapons" on Enemy.X, Enemy.Y;

    Pin Object "Powerful weapons" on Enemy;

  • Use the follow conditions:

    Condition:

    On Player Moved: Change animation to "Walking"

    Condition:

    Player is moving AND Player speed > 80: Change sprite animation to "Running"

    ELSE: Change animation to "Walking"

  • Using touch:

    On double-tap over card:

    Sub-event: Is Ass => Go to top;

    Else => Go to right;

    Using mouse:

    On double-click over card:

    Sub-event: Is Ass => Go to top;

    Else => Go to right;

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Give them "instances" or "object names", where the key will have the desired behavior, like pronouns and so on..

    For each type, one dictionary.

    I would add with dictionary an array, maybe it turn things easy, but...

    Check what key is being called with the word and change its color to the correspondent instance.

    Something like this:

    Condition: On word created;

    Sub-Condition 1: Is instance (or object name) = "Pronouns";

    Sub-Action 1: Change text color to red;

    Sub-Condition 2: Is instance (or object name) = "Verb";

    Sub-Action 2: Change text color to green;

    etc...

    Using an array within, you could check inside the array what word it was and setup accordingly its X,Y2.

  • You did right, also, you can use dictionary instead of global variable.

  • I add some steps inside each event and check it on screen by doing something like this:

    Condition 1: Set text Debug to "Debug start";

    Condition 2: Check something;

    Action: Append text "newline & Step 2 Success" AND do the action for this Step;

    Sub-Condition 2.1: Check something;

    Action: Append text "newline & Step 2.1 Success" AND do the action for this Step;

    Sub-Condition 2.2: Else Check something;

    Action: Append text "newline & Step 2.2 Success" AND do the action for this Step;

    And so on...

  • I understand your difficult to express yourself in english while it's not your main language. By understanding it I can feel what you mean and I'll try my bet.

    You don't need an array for it, just a global variable is sufficient.

    While you create an object on the screen, it have something called Instance Variable on the left side of the screen. By default it's empty, but you can change it by adding a Boolean variable, for example, called Type. Set the default to be "false".

    I don't know if you're creating your buttons on the screen or they are permanent, so, I'll assume the first, you're creating your buttons on the screen while the game is running.

    While creating your buttons on the screen, you may use the follow event sequence;

    Question start:

    Action: Create Sprite Button 1 at X1,Y1;

    Create Button 2 at X2,Y2;

    etc;

    Now, you'll change it to:

    Create Sprite Button 1 at X1,Y1;

    Set Sprite Button "boolean" variable to "true" (or "false" depending of your wish);

    Create Sprite Button 2 at X2,Y2;

    Set Sprite Button "boolean" variable to "true" (or "false" depending of your wish);

    They are in sequence, so, you'll be able to know what button have the true answer and will be able to check if the player has pressed it, adding points to his score.

    To check it is simple:

    Conditions: Click or Touch on the object AND Object Boolean Variable is true;

    Action: Add 10 to the Score Global Variable;

    Condition: Else

    Action: Subtract 10 points (or do nothing, depending of your wish)

  • You still be able to open it.

    I'll ask you to do some steps:

    • Change the file extension from ".capx" to ".zip";
    • Extract it;
    • Open the ".caproj" file with notepad;
    • Find the line with <saved-with-version>24000</saved-with-version> and change the "24000" to "23900";
    • open the .caproj using C2;

    That's it. =]

  • Depend of what behavior you're using to rotate. It's a physic element or you're rotating it by the object directly?

    If you're using the physic it will work, else, every time you rotate your object directly, it will not notice the rotation, because it will happen exactly in the moment of the action and only on the next tick will happen again, so, your "is rotating" will not detect it.

    To avoid this situation, use it as a sub-action of the same condition:

    Condition: "Some condition":

    * Action Rotate Object;

    * Action: "Do something else"

  • -1 * -1 will give you 1... while -abs[-1 or 1] always will give you -1

  • David, I know you don't have a C2 license, and I don't know if you're able to see the debug without it, but if possible, there will have a ribbon with what is consuming your resources and how much.