99Instances2Go's Forum Posts

  • Give the bullet an instance variable 'damage'.

    When firing the bullet give 'damage' the value BaseDamage * (pct / 100)

    You need some logic to give a value to 'pct' (%)

    When the bullet hits, calculate damage based on 'damage'

  • Not really. But you can do this:

    Add an Array.

    Start with size (0,1,1)

    (A) is overlapping (B)

    _____For Each (A)

    _________Array > push ... value = A.UID

    The array contains now all UID's for (A)

  • Hell of a job. Sir.

    A lot of links are dead due Dropbox recently killing links to Public Folders.

    The polygon plugin still works fine. I can provide this download.

    The mkAraay plugin is rather recent and works perfect, I can provide this download.

    All others you marked (i think) are marked correctly.

    rexrainbow's plugins are a complete mess on the forums, but neatly listed on his own page:

    http://c2rexplugins.weebly.com/map.html

  • Oh i am happy with it as it is (how it works).

    I would like to suggest other names, to give it more an intuitive 'polar feeling'. But that is up to you.

    .OriginX i would name .PoleX / .PoleY. "Pole" is mostly used to point to that point. (i think)

    .DeltaX i would name .Radius

    .DeltaY i would name .Azimuth. "Angle" is taken. And Azimuth means the angle to a reference angle.

    You could add that 'reference angle' (the polar axis, up to you), but i guess that will complicate things for most users. Everyone is used to zero angle as reference.

    Say you have two objects under an angle(x1,y1,x2,y2)

    Say we can set an expression .ReferenceAngle to that angle. (or leave it to a default zero)

    Then we can set .Azimuth with .ReferenceAngle as the angle from where .Azimuth starts to rotate from.

    Now we can easily go along with rotated coordinate systems.

  • That is exactly what i missed for a long time. Ima snap this tomorrow.

  • Burying a trigger that deep down in conditions for no apparent reason will bring you soon or later into problems. Because the trigger needs to discover the whole logic path up to the parent condition to find out if it is allowed to run its actions.

    Better change that 'On destroyed' event to a top level event.

  • Github is still here:

    https://github.com/jamessun/construct2-zack0wack0

    But it is not updated for 6 years, and the creator seems MIA for 5 years.

    Are you sure that you want to dive into this with no support ?

  • 7Winter answered your question as exactly as possible.

    But lets dive a little deeper in the problem. And then i have to start with putting your question in question.

    Size(In C2 language) is (indeed) width & height combined. I suppose that when you want to add 1 to the size, that you want to add 1 to the height and 1 to the width. That will only work for square objects. And, if you keep adding 1 (a constant), the rate of the scaling will be different on a slow machine (compared to a fast device). And, obvious, adding 1 to a sprite with size 1000 pixels gives a total different perception than adding 1 to a sprite with a width of 1 pixel. (in the last case it just doubles, in the first case it is even hard to see a difference).

    So, allow me to dive into this in steps. To start with, it easier to use 'scale' in stead of 'size'.

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

    But this has still the problem that the scaling rate depends on the FPS linked to the device. We solve that with using dt. You should always use dt if you do something per tick.

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

    To be complete lets do the same with 'size'.

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

    Now both 'solutions' still have a 'perception' problem. The rate is unnatural. It seem to scale faster when it is small and slower when it is big. Lets do something about that. Here you see 2 sprites grow, so you can compare. I am not smart enough to do that using 'size'. So i fall back to using 'scale'.

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

    Or, lets even do it even 'supernatural'.

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

  • Ahhhhh, you are right, that capx was close to rubbish. Allow me to make a correction.

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

    About THAT 'for each'. That is a loop, running trough all (picked) instances.

    Personal i do not like a 'for each' as 'first' condition, because it runs trough all instances.

    With a lot of instances, that is gonna hurt performance.

    Worse, I have seen a lot of projects with several 'for each' loops running trough the same instances.

    I try to avoid that.

    I have no problem with a 'for each' after pre-picking conditions. Like this:

    Player has LOS to Spawners

    For each Spawners <---- runs only trough those that are in range (picked)

    You see the difference ?

    Not that i am that bright to always know how to avoid such a root 'for each'.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What did i miss ? (not the first and not the last time that i did something wrong)

  • Personal, i am not that happy with that 'for each'.

    Just have to be aware of the different 'timings'. The animation changes when in/not LOS, the bullet fire happens once on approach. As you see, those are totally different 'timings'.

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

  • C = lerp(A, B, 12*dt)

    The 'lerp' is of no importance. See it as a range.

    C is in the range (A to B), where B = 100 and A = 0%

    Say A = 2 and B = 6. Then the range is 4.

    Then 100% = 4

    Normalised 1% = 4 / 100, or 1 step = 4 / 100

    Say C = 2 ... how many normalised steps to make that 2 ? Well 2 / (4 / 100) = 50 ... To 100 that is 50 %

    The lerpfactor goes from zero to 1.

    So in .. 2 = (lerp,4,6,x) ... x = 0.5

    Generalised.

    lerpfactor in % for C between A and B = C / (B-A/100)

    That also gives negatives. When A is bigger then B. Up to you how you wrap you mind about that.

    For me that just means that the range has a negative growth.

  • I do not know how to make Familys play nice, friendly and useful with Containers. I did't catch that it is about family's.

    When family's are in play, i use an instance variables to pair objects.

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

    But why not make it yourself a lot easier ? Talking extensively about 1000 "faces" now. Even assuming that they all have different properties like Jumpiness, that can be written in a .json (in a text editor, or a online json editor)

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