dop2000's Forum Posts

  • May I also suggest making a better English translation for future videos or hiring someone who can translate them into English.

    Even in that simple video it was difficult to understand you sometimes. If you are planning to release a paid Udemy course and teach more advanced stuff, you will need quality English translation.

  • Hi thanks, but that's not quite what I was aiming for. I did have it similar to this at one point, but it's the opposite to what I'm aiming for.

    The screen (the one that's spinning) should always have a straight selection box, while the actual sprite off-screen can have whatever angle selection as required.

    Don't ask me how, but I did it! I was throwing random sines and cosines into the formulas and BAM! it worked! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    https://www.dropbox.com/s/lmie9krwnz0kt ... .capx?dl=0

    Well, not random of course, it's based on this rule, but still I was quite surprised when I found the right combination or angles and expressions.

  • Yeah, polygon checks are slow, especially when there are thousands of them performed on every tick.

    But this is not a secret knowledge..

    And there are many situations where you need collision checks, and where it's impossible to replace them with simple events like "compare X/compare Y".

    Are all your optimization tips about decreasing the amount of collision checks?

  • Lots of ways to do this:

    You can place several instances of an invisible sprite named SpawnPoint on the layout and when you need to spawn a fruit you do

    System->Pick random instance of SpawnPoint

    SpawnPoint -> Spawn Fruit

    You can make a single Fruit sprite with multiple animations (apple, pear, orange etc.)

    When you spawn or create a new Fruit, set its animation to choose("apple", "pear", "orange") - this will set random animation.

    You can then get fruit name using Fruit.AnimationName expression.

    Or you can create different sprites for different fruits and add them all into Fruits family.

    When you create/spawn Fruits family, a random family member will be created.

    Also try searching this forum and Tutorials, there should be lots of examples of such games.

  • Or use Replace expression:

    Set text to replace(varLineOfDialog, "[name]", varCharacterName)

  • Wait 0 is not needed, and, in fact it may result in potion being spawned twice if another bullet hit the enemy in next tick.

    Object is not destroyed until the end of the tick, so even if you change the order of actions (destroy enemy -> Create "potion" at enemy.x,enemy.y) , it will still work.

  • Create a text file and import it to your project.

    Use AJAX to request this file and then parse the text with tokenat, tokencount expressions (with newline as separator).

    There are plenty of examples here.

    Or you can use CSV plugin:

    Or built-in XML plugin.

    Here is a dialog system where lines are loaded from XML:

  • That's probably because you are mirroring or changing the angle of an existing bullet instance.

    You should set the angle in the event where you create/spawn new bullet.

  • Your cell size is too big and gaps are too small.

    Read about the cell size here:

    https://www.scirra.com/manual/154/pathfinding

  • Problem Description

    Sorry for the confusing title, this bug is quite weird and it's difficult to describe it...

    After moving a sprite with Drag&Drop behavior to a folder, "Is touching object" event is not working correctly.

    Attach a Capx

    https://www.dropbox.com/s/vjm5k49g5ifps ... .capx?dl=0

    Description of Capx

    Small project to demonstrate the issue.

    Steps to Reproduce Bug

    • Run the project, try dragging the green sprite, note that the text says "Background NOT touched"
    • Move the TaskDrag1 sprite out from the folder
    • Run the project again, drag the sprite, text now says "Background touched"

    Observed Result

    Inconsistent results depending on whether the sprite is in the folder or not.

    Expected Result

    "Is Touching" event should be registered for tiled background.

    Placing the sprite into a folder should not have any effect on events.

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: YES

    Operating System and Service Pack

    Windows 10

    Construct 2 Version ID

    r255

  • Your link doesn't work..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • AnD4D

    Not sure if this is what you wanted..

    https://www.dropbox.com/s/nc4etntyw8oz2 ... .capx?dl=0

  • Use "AJAX Request URL" action.

    Just put the name of the project file in the URL field.

  • Create a family with this sprite and change your event to this:

    Sprite is overlapping SpriteFamily -> Destroy Sprite.

  • There are a few ways you can do this:

    1. create separate animations for the character sprite holding different weapons.

    2. Pin weapon to an image point (might need a plugin) or origin point of the character sprite. Mirror both the character and the weapon.

    3. Set weapon position/angle/mirrored state on every tick to character's position/angle/mirrored state.

    See this post:

    As for firing a bullet, you need to set bullet angle (or bullet angle of motion) to 180 when the character is mirrored.