99Instances2Go's Recent Forum Activity

  • for each x element

    every 1 second - set value at (array.curx , 1) to array.curvalue - 1

    timer = true

    Value at(a,b) implicates that this is a 2D array. With index a on the X axis. And index b on the Y Axis.

    For each element x ... runs trough all indexes on the X-axis. Meaning the array.curvalue contains a value stored on the X Axis (only).

    So, yes, you store on each each index 1 on the Y axis ... for each index on the X axis .. the value that is stored on that X axis.

    Rather.

    I like to recommend a global variable to remember what the Y axis is meant to be.

    Say Global variable 'Counter_Y' (number) = 1

    Every 1 second

    System ... For "index_X" .. from 0 .. to array.width - 1

    ______Array ... set value at (loopindex("index_X" , Counter_Y) to Array.At(loopindex("index_X" , Counter_Y) - 1

  • eli0s

    I just used (as you did) that many sprites (aka layers) to showcase the point. Most only need a foreground layer, a middle layer and a background layer. It is a flawless 'trick', with no overhead in events. In stead of fiddling with the parallax X&Y. And then complain that something that is wrong in the base dont work as expected.

    Your Showcase is just plain beautiful !

  • It is a different approach, but cant approach without info. It is an illusion to expect general solutions.

  • The problem is simple to solve: Do Not Use parallax X/Y 2 create depth. It just does not even work that way in the real world.

    Therefor, it is inessential to ask for something like a "...Parallax Origin point...", because it will not solve your problems.

    This is real depth:

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

    (sorry to bump a bumped old topic)

  • Are there move restrictions (obstacles.. etc) in play ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How do exactly do you move it ?

  • See if this makes sense to you.

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

    Added a debug view (debug sheet), i needed to see whats happening.

    Fixed the map mouse. (map mouse sheet)

    Made a strict Die/Mirror/create routine (iso miror sheet)

  • Explination

    map_enemy.health <= 0 Pick ALL map_enemy with a health lower then zero

    For each "map_enemy" Since two can die at the same time. There can be more map_enemy picked. Got to run trough all picked map_enemy's. For each does that job one by one.

    "iso_enemy" ... compare instance variabe ... iso_enemy.id = map_enemy.id Lets now add the iso version to the picklist

    ---- (action): "map_enemy" destroy Actions work on the picked objects only. And we have now picked dead enemys 1 by 1 and their iso versions

    --------------- "iso_enemy" destroy

    Once you get the hang on picking. Live is easy. I promise. : )

  • I did it like this:

    --(condition) For each "map_enemy" & map_enemy.health <= 0

    ---- (action): "map_enemy" destroy

    ____-- (subevent) For each "iso_enemy" & iso_enemy.id = map_enemy.id

    ____---- (action) "iso_enemy" destroy

    When I understand correctly you wanted me to put the "Pick by comparison" in the place of map_enemy.health <= 0 right? I think this is the same though.

    Nope.

    The problem happens on the moment that the enemy is losing health.

    As i said i gambled, you dont give that much info.

    I suppose it is with bullets, and you use 'on overlap'.

    Bullet is overlapping map_enemy

    For each map_enemy

    ...................... do your health thing

    I should have known that they do not directly get destroyed. Now, this is all it needs.

    But to be save (not sorry) you better keep the for each when destroying. After all it is possible that two enemy's go dead at the same time.

    Then the follow up is

    map_enemy.health <= 0

    For each "map_enemy"

    "iso_enemy" ... compare instance variabe ... iso_enemy.id = map_enemy.id

    ---- (action): "map_enemy" destroy

    --------------- "iso_enemy" destroy

99Instances2Go's avatar

99Instances2Go

Member since 12 Feb, 2016

Twitter
99Instances2Go has 2 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies