sgn15's Recent Forum Activity

  • eli0s

    it's ok already. I just forgot that I clicked undo on the changes I made to layer's scale but I forgot to change it back to 0

    Can you teach me how to create multiple lifebars (for multiple bosses) ?

    So far, this is what I did.

    Start of Layout

    ->store the number of boss objects (using count) into a global variable

    Then using that value, I need to create that same number of lifebars for each of the multiple bosses (top down from right side of screen)

    The single lifebar at the left is for the player.

    How do I position them (without overlapping one another) and also how to differentiate which lifebar is for which boss?

    Please see attached pic for reference

  • exactly, you intend to make the value the same for all?

  • not sure how to do your ideas, guys. This problem arises in situations I have "stairs" kinds of floors, meaning I have different floor object instances at different heights. The changing of size happens in air, so as soon as enemy overlaps any floor object, it gets stuck there forever (since my events are supposed to work when the enemy falls on floor)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

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

sgn15's avatar

sgn15

Member since 20 Sep, 2013

None one is following sgn15 yet!

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

14/44
How to earn trophies