Rikushi's Forum Posts

  • Why are you picking Family1, and not Spawner sprite directly?

    Because i need to work with family in my main project. And i try to make example project as similar as possible to main.

    You can also use "System Pick All Family1" condition in a sub-event.

    Good to know that method exist. But i think "for each" is better for almost all tasks. Because you can limit the amount of objects to be selected.

  • Solved.

  • Hello.

    I have a problem with collision/overlap detection while checking multiple objects at the same time.

    There is a spawners objects.

    Spawners spawn new type of objects when they are active. Each new spawned object is further away from spawner.

    When spawned object collide or overlap any blocker (special object or other spawner), spawner that spawn that object must stop spawning new objects.

    Everything works fine as long as only one spawner is running.

    But when several spawners work at same time, some collision/overlap checks are ignored. The more spawners are running the more mistakes happend.

    Example:

    LMB on spawner - switch ON/OFF.

    RMB anywhere - swtitch ON/OFF all spawners.

    drive.google.com/file/d/10w1kifAChGq7gmDlqgfBux359_g853AE/view

  • I'm already tried "sub events" and "for each" methods without any result.

    //UPD

    Solved.

  • Hello, i have an issue with picking right instance of sprite from family.

    There is spawners family.

    When the spawner is on, it starts shooting bullets.

    Every bullets have variable that contain UID of spawner that spawn that bullet.

    When a bullet hit something, spawner firing that bullet must be deactivated.

    So i use the "collision of bullet with object" event to detect hit and "pick spawner by UID" to deactivate it.

    Everything works fine with any objects exept other spawners.

    There is a conflict of choosing right instance.

    Example:

    drive.google.com/file/d/1Tf1XGyza0NeJuxHswyiy4av3xo5KPomy/view

    LMB - activate/deactivate spawner.

  • Thank you. Now everything works perfect.

  • Thanks for trying.

    But your solution doesn't work.

    Case:

    LMB on power source - power source is on lamp is on.

    LMB on same power source - power source is off but lamp is still on.

    Lamp is off only when any power source is not overlap the detector or power source from second lamp is on.

  • Thanks a lot. Your solution is work perfectly.

    I thought that if overlapping use same mechanism as a collision so detection of elements will follow the same rules.

    But i have a next level problem. Now we have 2 detectors, vertical and horizontal.

    If any of powered power source contact with any of detector connected with lamp so lamp is on. If all power is off so lamp is off too.

    And i have a situation with "For each" + "or" + "else" events that i don't know how to solve.

    drive.google.com/file/d/1q6fDAZ3Z7NLdya7NZ1XyyIoLuLL5dAaf/view

  • Hello.

    I have an issue with detecting right instance of sprite from container who overlap sprite from family and have right variable value.

    Example:

    There is a lamp.

    There is a detector (or wire) in container with a lamp.

    There is a power source sprite from the family. Power source has on/off conditions. Any number of power sources can be placed on the detector.

    When detector overlaps with powered power source(atleast with one of them), the lamp turns on.

    If there is no overlap or power source is off, than lamp is off.

    Right now when powered power source overlap one of detector, all of detectors are powered. Even not connected with right power source.

    So i need help with finding the correct detector that is overlap the powered power source.

    Example project: drive.google.com/file/d/1CQOM7lY1qYWOMwRcClE3KRns1GMhRMNH/view

    LMB on power source is switching on/off state. Power source also have dragndrop behavior.

  • Solved.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm have a family and few objects in it.

    Family have LOS behavior.

    When i'm try to get LOS family to family, result is negative.

    Trying different cases and only last method of direct define objects have a result.

    http://c2community.ru/imagehosting/images/2018/Jul/13/111wjw.png[/img]

    I'm tryed to do same in a blank project, and LOS family to family work just perfect.

    Any suggestions?

  • Just set looping in animation properties.

    Yeah. Didn't think about that solution.

  • This method dont alow to loop animation that must be looped. Like walk.

    But combining your and my method together is a solution for my issue. Many thanks.

  • "For each" loops are quite slow. If you are planning to have 17 animations, with this approach you'll need at least 19 loops, which may cause performance issues. So I suggest to do everything in one loop (see the screenshot in my previous comment)

    Already did thanks.

    But now i'm have another issue with "Trigger once" condition.

    When i'm clicking on unit i'm setting up currentAnimation to "Clicked".

    Next, when setting art animation

    base curAnim = Clicked -> art set animation to Clicked Trigger once

    It work only for first clicked instace of object. The others repeat they animation. How do i can fix it?

    Example: h*t*t*p*s://drive.google.com/file/d/1AIIYMTTczNN2GW5z6HaDPUCPPlCV3hke/view?usp=sharing

  • Generally, when you pick multiple instances by UID, you need to use "For Each".

    Yeah, thanks. I'm already deal with that problem. I'm just tryed everything, and this one accidentally work perfect.

    drive.google.com/file/d/1eHDa-76T-BGPuREzOcwLVrIZ2xJEM1pI/view?usp=sharing

    Also, if you only have a few enemy types, it may be easier to combine them into two sprites.

    I'm may what i'm may. But what i'm need i'm described in a topic. There only example so simple, real project not so. 15 different units with 17 animations each. But thanks anyway.