Funky Koval's Recent Forum Activity

  • sendspace.com/file/xobe0a

    I switched the RTS behaviour from Custom to Avoid "Solid" and made Sprite and Sprite4 have the Solid attribute. Based on the way your game is set up, do not give Solid to the actual character sprites. Since they overlap the red sprites, they won't move, as to RTS, they are in a blocked cell.

  • Ah, I see the issue. I've run into it before...

    It seems that custom obstacles don't work reliably/at all...

    Switch the Pathfinding type to Around "Solid" and give Sprite4 the "Solid" attribute. If you need to toggle the collision, remove the attribute when needed via System actions and regenerate the pathfinding grid.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • One of the RTS actions should be "Set Object Type To Avoid" - that will make the character avoid the object and its instances. AFAIK, you do not need to refresh the pathfinding grid for it to work.

    You could also alter the RTS behaviour manually based on distance checks to have avoidance, but I prefer the first method - much simpler...

  • I have an effects chain consisting of Distort Normal and NuovoFill.

    The issue appears only if NuovoFill is in Additive or Multiply mode - Raw Color is fine.

    When the NuovoFill color is not modified during runtime, it tints the underlying Distort Normal properly. However, if I change the tint color during runtime, the Distort effect gets shifted according to what particular color I choose.

    For example, if I set NuovoFill to Multiply red (255,0,0), the distortion will be proerly positioned and tinted. However, if I change the color during runtime, even to the same red, the distortion will shift to the left. If it's green, it will shift upwards. It's like the tinting gets multiplied over the original sprite texture, changing the normal map and in turn causing Distort to shift it. The effect is not cumulative, so if I do a color change to red again, it will not shift further.

    I hope this makes sense. Is there any way to rectify this behaviour? Thanks in advance.

  • Thank you. Yes, this is exactly what I'm after.

    And this method is similar to the alternative one I wrote...

    Now I see that the "precision" problems I had weren't really related to accuracy - unlike you, I was calculating the distance without regard to the "Player" heading, which was throwing my results off.

    Again, thank you.

  • I'm trying to create a system, where a bunch of equally-spaced "Line" sprites keep their distance to a "Player" sprite and constantly face it, except when the "Player" moves forward/backward relative to its heading - then the distance will increase/decrease.

    I have a system working, using 0,0 as a reference point by which all the distance data is calculated... Problem is it only works in the 0-90 degrees range of "Player" angle.

    I believe that I need to flip the reference point horizontaly/verticaly/both based on the "Player" angle, but as to how eludes me.

    Here's a zipped .cap file is anyone would be willing to help out - much appreciated.

    The data for the "Line" spacing and the maximum distance a "Line" can be at before being put back at the beginning of the sequence is inside the Data text object as a private variable. Each "Line" also has a Distance variable which stores the distance for the current loop, for final position calculation.

    sendspace.com/file/c2el80

    As a footnote, I had a second system for achieving the same result which used a delta of previous and current "Player" positions to calculate the distance change, but I ran into precision problems - so I hope to use this approach, with your input.

    Thanks.

  • R0J0hound

    Yup, understood, but this is similar to what I have and am trying to avoid - multiple SetArray sequences with the only difference being the object referenced.

    The UID option might work though, iterating through Family members, but using the UID as the object identifier to pick up the data.

    Thanks.

    Jayjay and Yann

    Noted, thanks. I've ran into a similar issue - i needed to calculate the point of intersection of a line and an elipse centered on each of my object instances...

    No crashes, but it halved my framerate when dealing with only a hundred or so objects.

    lucid

    I didn't know about this shortcut - thanks.

  • Thanks for the reply.

    Yes, I'm aware of how functions work. What I have are multiple objects with multiple instances - that's why I thought of this kind of substitution. Using families does not help - in fact, it crashes Construct randomly...

    In general, I find families quite finnicky for more "complex" operations - I mainly use them to assign private vars to many objects...

  • In my .cap, I have a lot of objects whose properties I need to store in a array, something like Set Array(1) to ObjectA.X.

    Right now for each object, I have a long list of these and the only difference is the object they reference.

    What I'm trying to do, without luck, is to call a single function which picks these parameters and to change the object called using function parameters. Something like:

    Function: Add Parameter "ObjectA"

    Call Function "Properties"

    On Function "Properties"

    Set Array(1) Function.Param(1).X

    Set Array(2) Function.Param(1).Y

    So that Function.Param(1).X becomes ObjectA.X

    I'm guessing there a problem with the syntax, but I can't figure it out.

    Help would be most appreciated.

  • I have a weird issue with using Distort Map that could be related to the Object Pairer.

    I have a family Family which is made up of two separate objects ObjA and ObjB. At the start of the layout, for each Family I spawn a third object ObjC and pair it to the Family, all in the same event.

    Later in the Event Sheet, I have a condition which picks the paired ObjC for each paired Family, compares a private variable in Family and based on the result either performs a Distort Map operation or deletes both the Family member and the paired ObjC.

    This all works fine when using Relative Distortion, but as soon as I switch to Absolute Distortion, it seems like the system forgets the pairing and deletes all the Family objects, regardless of the private variable check.

    I thought that the problem lies with pairing ObjC to a family instead of explicidly to an object, but I have a "For Each" condition, so the system should only pair to the currently iterated member of Family, right?

  • Thank you. That clears things up quite a bit.

  • I'm having a bit of a trouble getting LoopIndex and LoopLength to work as expected - LoopLength first:

    Say I have a condition of For "TestLoop" from 0 to 1 - I'd assume LoopLength("TestLoop") would be 2, since the system would first run through loop 0 and then loop 1, however LoopLength returns 1.

    If the condition is For "TestLoop" from 1 to 2, it returns 2 as expected. Does looping only work for positive integers?

    As for LoopIndex, does it return the currently processed loop number or the nth iteration of a loop? Say if I have For "TestLoop" from 2 to 3 and I have an action that makes use of LoopIndex("TestLoop") and the system is running through the first loop (number 2), would LoopIndex return 1 or 2?

    Sorry for possibly asking obvious questions, but the Wiki is very scarce on the topic of loop evaluation. Using Construct Classic 1.2

Funky Koval's avatar

Funky Koval

Member since 28 Mar, 2010

None one is following Funky Koval yet!

Trophy Case

  • 14-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies