tgeorgemihai's Forum Posts

    Thanks Ashley and Scirra team

    Great news for me, by the time my game will be finished, the Steam/Greenworks plugin will be even better.

  • ramones

    Thank you very much

  • Canvas or Paster plugin, but it won't be easy ... Better start with something else until you get a better hold of C2. Good luck

  • blackhornet

    Thank you for your help

  • Try Construct 3

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

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

    Thanks, I was looking at "Is on screen" at a property, not like a condition. This method works:

    Is this good, or is there a better way ?

    codah

    "Count" picks all the objects, regardless the conditions before (I tried it before opening this thread)... "PickedCount" counts only the objects that respect the conditions.

    My first method doesn't work because the condition "is on-screen" becomes 0/false when there is no on-screen object. An expression like "object.CountOnScreen" would had been useful in this case.

  • How do I count the on-screen objects ?

    I tried the following methods and they work, but when there isn't any on-screen object, it still counts 1.

  • blackhornet

    Thank you It works perfectly

    Can you explain me the following:

    -> What do you mean by "It's the annoying "can't pick until next top level event" feature of C2 getting in the way. Using visibility instead of create/destroy makes things easier." ? I see that you've made the enemy invisible when is destroyed as a walkaround.

    -> Event 36: Why did you add "wait 0 seconds" (skip one frame) ?

  • blackhornet

    Thank you again, but is still not working how it should:

    targetMode=1 -> target is destroyed when any enemy is destroyed (not only the targeted one)

    targetMode=2 -> works as intended

    targetMode=3 -> target is destroyed when an enemy is destroyed if the playerBox doesn't move

    I can't figure how to do it correctly... I tried "[invert] Object with UID target.targetID exists" (if that object doesn't exist) then call function "setTarget" (depending on "targetMode").

    Either there is an error in my logic, or there is a bug in C2, because I tried a lot of walkarounds, but no luck so far

  • blackhornet

    Thank you, but still it doesn't work how it should. If I destroy an enemy that is not targeted then I destroy the targeted enemy, the target remains in the same place in "targetMode" 1 and 2 .

    I tried to add "[invert] Object with UID target.targetID exists", after "enemy - On destroyed" but no luck ... That brings me to the question: How can I check when an object with a specific UID is destroyed ?

    For some reason, the "setTarget" function still picks the UID of the destroyed object.

  • blackhornet

    My logic was the following:

    -> Pick the enemy that has the same UID as the target.targetID

    -> If that enemy is destroyed or is not on screen anymore then call "setTarget" in order to find the next target.

    Can you show me how to implement it correctly in C2' events ?

    Also, do you know how can I check if there is any enemy on the screen ?

  • I was implementing a targeting system in my game, but I've got stuck when finding the next target.

    About my code:

    Local static number "targetMode" is the type of targeting the player is using as it follows:

    [1] When activated, targets the closest enemy at that moment. When that enemy is destroyed or offscreen, the targeting mode is disabled.

    [2] When activated, targets the closest enemy at that moment. When that enemy is destroyed or offscreen, targets the next closest enemy.

    [3] When activated, continuously targets only the closest enemy.

    Function "toggleLockOn" activates and stops the targeting system.

    Function "setTarget" should target the closest enemy at that moment.

    Function "releaseTarget" stops the targeting system.

    Function "targetIntro" is the nice effect when the target appears onscreen.

    The issue is that after I destroy an enemy that is targeted, the target remains in the same place, so I think the problem is in the function "setTarget" witch picks the same object even if the object should be destroyed.

  • lucid

    Thank you, my project is in a very early stage so I can wait until sub-entities are available in C2 plugin.

    My game is like Megaman, but with the possibility to aim and shoot in different directions (shoot while standing, walking, jumping, falling, etc), so making a separate animation with at least 3 directions/state wouldn't be the best choice.

    Any approximate date when the plugin update will be available ?

  • lucid

    What is the best way to make a character made in Spriter move his head and hand (with gun) to the direction of the mouse/enemy ?

    Also, can you send me new links for Essentials Basic Platformer Animated Art Pack, Essentials Game Effects Animated Art Pack and Essentials Adventure Platformer Animated Art Pack ... The links from the purchase page expired.

  • From what I know, the support for HTML5 in PSP Vita at the moment is crappy at best ... So unless you can code yourself (or somebody else) or port a browser as a wrapper, you can't play C2 Games on PSP Vita

  • I meant for during the game

    Not sure what you meant by "during the game" ... You don't have a background or what ?

    Better start with the basics: How to make a Platform game