Rhindon's Forum Posts

  • newt - Ah! Well, that much makes sense. :)

  • newt - Hmmm...that makes sense, but I'm having trouble conceiving it in my head as to how I'd do it in C2.

    Anyway, someone suggested I use the tilemap as an alternative. I'm going to give that a shot.

    Ashley - Mighty good question, sir. Heck if I have a good answer. I've been struggling to filter things down, but I suspect that my lack of understanding of all the finer points of how each action and event works (behind the scenes) is making it hard for me see what will or won't work.

    It's rather like when I learned just how For/For Each work. I THOUGHT they worked one iteration each tick. Turns out, as I learned later, they work until done, even if that means several iterations per tick. At least, that has been my understanding of late.

  • blackhornet - I think I'm following the logic in your capx...

    1. Bee object instance is clicked

    2. For EACH Bee in the Family, set the NextUID family instance variable to -1

    3. Call the Connect function with a parameter that plugs in the UID of the Bee that was clicked.

    4. On call of the Connect function...

    5. Pick the object that has a UID that equals 0 and set the NextUID value to UID of the object instance that was picked.

    6. Pick all instances of the Family whose NextUID value is equal to -1.

    7. From those selections, pick a random instance of the Family and set the UID of the Family to the Next instance variable of the Bee that was picked.

    8. Draw the line between the two objects.

    9. Call on the Function again and run it for all other instances of the Family whose UIDs are 0.

    How'd I do? I'm still not sure I fully understand the whole thing.

  • Ashley - I've been trying that, but I keep running into issues how how to do...

    -> Pick object instances that meet these two criteria.

    -->> From that selection, further pick from those instances.

    made a suggestion similar to what you're saying on the Facebook group. I'll give it a shot.

    blackhornet - Thank you, sir! As always, you're a tremendous help!

  • I don't really know WHAT recursion IS. LOL I'm about to find out... *CLICK*

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • blackhornet - Huh. So... Do something like "Pick Family" then "Pick Object Instance In Family"?

    Something like that?

  • [bump]

  • I did! Thank you. Sorry, my phone is horrible to reply with.

    My problem was that the red object plate had an initial value of 0, so line 24 automatically started to take effect. I changed the initial value to 2, and that solved the problem.

  • I'm trying to set up some events that compare the conditions of instances of the same object.

    For example, say I have two square instances. For all intents and purposes, they're the same. However, their instances variables may have different values and their coordinates will likely not be the same, and so on.

    I need a way to identify and compare two instances of the same object.

    So, say Square(1) has an instance variable value of 10.

    I need to way to check and see that if any OTHER Square(n) overlaps that Square(1), those OTHER Square(n) instances will have their variable set to 10, as well.

    Hopefully that's clear enough. If not, I'll give a more specific example from the game I'm making.

    UPDATE:

    Here's an example of the kind of feature I'm looking for...

    We have the Pick By Comparison event.

    Object: [select]

    Expression: [...]

    Comparison: < , > , == , =/= ...so on

    Value

    That usually works when comparing two different objects or properties of a single object.

    What I'm looking for would look more like this

    Object: [select]

    Instance one expression or value: [...]

    Comparison: [...]

    Instance two expression or value: [...]

    Because right now, when I'm comparing two instances of the same object, whether by Overlap, Pick By [...], For Each... I'm still running into problems in trying to identify each instance when needed within the larger comparison and testing.

  • I'm interested in this! :D Where do I sign?

  • CAPX: https://www.sugarsync.com/pf/D6025908_4317202_6015268

    I've got a door that will swing open when the character moves over the green pad. It should open a full 90-degrees. The open and closed values are stored to two instance variables (lines 2 & 3). I use the "rotate towards angle" action (lines 20 & 21), and at one point, it worked. Regardless of the parameter of how many degrees to move. Any ideas why it stops just a few degrees short?

    According to the manual, the action should rotate the full amount specified, but, suddenly it's not doing so.

  • Thanks, everyone.

    Ironically, while I waited for a reply, I DID realize - DOH! - that there is an action to rotate objects as keepee pointed out. Just wasn't thinking about it since I don't need it very often...yet.

    Anyway, all is working now. #FamousLastWords

  • CAPX: https://www.sugarsync.com/pf/D6025908_4317202_6004926

    I have doors that swing open clock or counter-clockwise. So that the doors don't swing open or close indefinitely, I'm using instance variables to define their open and closed positions. (That way I can pre-rotate them on the layout and then calculate the open and closed angles from that initial angle.)

    If I have one door set to an initial angle of 0 - it's closed state - I tell it to set its instance variable OpenAngle to Door.Angle-90. However, this produces a negative angle, and any further instructions I give it leaves C2 confused about what to do.

    What's a good way to efficiently recalculate this angle to a positive value of 270? (Sorta like going backwards in time...for instance, going from 1 o'clock back to 12 and not some odd time like negative 2 o'clock.)

    Thanks!

  • R0J0hound - Actually, after a few attempts, I got it nearly right! There's just a tweak or two that are a little off...

    https://www.sugarsync.com/pf/D6025908_4317202_6006503

    1 and 2 to switch view types. Arrow keys to move.

    Shift key to move backwards in view 1.

  • I want to create a camera perspective where the character is centered in the screen (using the ScrollTo behavior) and always faces a certain direction (270 degress). As he turns and moves around (using the 8Direction behavior), the layer, itself rotates. In comparison this is very similar to Mode7 rotation on the Super Nintendo.

    Does anyone have any suggestions?

    The trick I'm having is how to isolate the difference between the angle of the character and the layer while maintaining a constant angle value of the character. My first attempt ended up rotating the entire layer so much that it looked like a kaleidoscope doped up on Red Bull.