sgn15's Forum Posts

  • Either increase the "width" of your enemies or make another detector object that is pinned to each of your enemies (which basically tries to do the first idea I said without changing your enemies' width directly)

    so if you use 2nd idea, check if bullet detects either enemy or detector object

    use pinnedUID to check which detector object belongs to which enemy

  • It's possible

    Example:

    Family A:

    obj a

    obj b

    obj c

    instance variable Z

    Family B:

    obj d

    obj e

    obj f

    instance variable Z

    NEW FAMILY C

    obj a

    obj b

    obj c

    obj d

    obj e

    obj f

    NEW instance variable Y

    +whatever condition here

    Set Y to Family A's z variable

    +whatever condition here

    Set Y to Family B's z variable

    You have to use 2 events. Add the "For Each" accordingly

  • Either remove 1 object from 1 family and use the family variable which has maintained that object

    OR

    just use another family with both same objects and add a new family variable for this new family.

    continuously transfer the value of the old variable to new variable

    Then use this new variable for whatever you need

  • You need to rename either 1 or both of the variables with same name. This rule applies to behavior names as well. I don't think the sub-family concept is possible.

  • yeah, just use instance variables and put/modify their values for each instance so each button will do something different from other buttons

    or 4 different button objects but all are part of a family and you use family instance variables instead.

  • use System: For Each (object name) on your events.

    and you could identify which enemy is partnered with which enemy box (or vice versa) by using this method:

    pin the enemy to the enemybox, then you can use the condition "Pick by evaluation"

    For example:

    +EnemyBox: Life > 0

    +For Each EnemyBox

    -> your actions

    -(Sub event) Pick Enemy where EnemyBoxUID = Enemy.pin.pinnedUID

    -> your actions

    Pick Enemy where EnemyBoxUID = Enemy.pin.pinnedUID

    means that you pick the enemy object that is pinned to the specific instance of the enemybox object

    you can use it the other way

    Pick EnemyBox where EnemyBoxUID = Enemy.pin.pinnedUID

    means that you pick the enemybox object that you pinned the specific instance of the enemy object to

    Read more about both concepts first on the manual to understand it better before attempting to use it.

    as for reacting independently, you have to use random to randomize the AI. of course use "For Each" in the events.

    reply with my name if you need a capx sample.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My enemies have platform behavior and they have a mode where sometimes they change size (height or width or both), and when they change size and the new size overlaps a solid object, they became stuck in the solid object.

    How do I fix this without removing the "changing size" feature?

  • Use System: For Each (object name)

    and also use the instance variables' values as conditions.

    Somewhere in your events, you have to randomize OR use another way to put different values in each instance variable of each object instance, because otherwise, using "for each" would be pointless.

    families is for grouping different objects together.

    Family "ENEMY" would include: Soldier object, Boxer object, Swordsman object, etc.

    Based on your description, For Each is what you need, not families. Read more about For Each in the manual.

  • eli0s

    My layouts are horizontally longer than the window size, so the game levels have a scrolling effect.

    I'm still using your method (destroy existing ones then create new ones). I did not use set position.

    I removed lifebar's anchor behavior, then I tried walking the character until the camera moves. The lifebar isn't scrolling.

    I put back the anchor behavior, the lifebar moves with the scrolling BUT it seems to fail to keep up with the scrolling. It's like there's an "earthquake effect" or "teetering effect" on the lifebar (not sure if I described the effect correctly) while the camera is scrolling.

    how do I fix this?

  • oh? I was using the Set Position since I already have 1 instance of it in the layout. ok. Now, I first used Destroy on the existing one then create a new one. Never thought of that. Thanks!

  • yeah i tried the left and top of viewport too. doesn't change the position. It doesn't do anything.

  • What is the expression for the x and y positions of the top left corner of the screen?

    I need it for my lifebar. I already have anchor behavior and also separate HUD layer with 0,0 parallax. But I want to set the position through events because there are multiple layouts (levels) and I want to avoid having to manually move the lifebar for each layout.

    I already tried scrollx, scrolly and windowheight, windowwidth. so far, they don't work. I use start of layout as condition.

  • any help?

  • Kastas

    thanks. It worked. I would like to ask you some help again in my expanded pause menu.

    First, these are my events

    http://oi60.tinypic.com/bh13mh.jpg

    When I pause my game, (without leaving the current layout), I create the pause menu objects and text objects, basically pause has 3 options: Continue, Save and Exit, and Exit (go to Main Menu). MPause_Index refers to the option which I am pointing to, since it has only 1 value at a time.

    Option 2 (Save and Exit) is blank (no action), don't know how to do the save yet.

    Option 3 (Exit) works fine.

    Questions:

    1. When I change the order of the groups, moving the group "Pause" before the others, all 3 menu options become the same color (this should be impossible). I thought the pausing itself should be at the top since codes are read top to bottom?

    2. When I select the first (continue), GameIsPaused is not being set to 0, so the game isn't being unpaused, and also, another set of pause menu objects are being created again and again every time i press enter while already in pause.

    3. While in pause menu, when I press up, the player (which has platform behavior) is still showing walk animation first frame only, so the disabling of the platform when GameIsPaused = 1 doesn't work.

    help please. thanks in advance

  • Hi, can you give me a screenshot of the events? I can't open it because I am not yet up to date with the latest version. I can't download anything that big filesize on this connection at the moment.