part12studios's Recent Forum Activity

  • LittleStain i follow this, but "object is picked". I can't find an action that matches that.

    my attempt failed to result in a proper drag and i imagine the object is picked part is a big piece of it

    dropbox.com/s/ih8hjpukbmzy96f/TD_Test_4.capx

    Thanks!

    Caleb

  • Hi there, I was trying to figure out a way to do a drag / offset so when i drag something it doesn't snap to center.

    I found this thread scirra.com/forum/no-offset-drag-and-drop_topic47745.html but following the one available capx, it didn't work when I tried to reproduce it and all the while it struck me as oddly complicated to achieve the desired result.

    Of course the capx out there works great, but when I tried to replicate it, it failed, but it was kinda complicated so I couldn't understand the need for having additional instance variables "mangle"? "mdist"? i don't understand what those names mean related to the offset..

    I see the drag/drop behavior but it doesn't seem to address the idea of mouse offset.

    So yea I just wanted to see if there was some straight forward approach to allow you to touch the lower corner of a dragable object and not have it snap to center but rather let you drag it from where you touch the object.

    Thanks!

    Caleb

  • oh wow, Pin Behavior is awesome. :) I just researched that and yea that's pretty spot on as well! got it working after a quick read. that's handy and a lot less leg work.

    however i will say it was beneficial for me just to better understand how instance vars work.

    Thanks!

    Caleb

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok well chalk one up for figuring this one out thanks to MadFactory's advice.. now I get it.. understanding that a local variable is truly unique to THAT object on the screen.. thus allowing duplicate objects to behave independently.. very exciting! :)

    Thanks

    Caleb

  • I'm thinking through it and my math is kinda weak in this area, but it seems like there must be an expression that i could use that would work like this.. if i reference the X and Y of a master object.. and compare it to the local X and Y of a given object (since it's local each object would listen independently I believe)..

    so it's like yea some kind of offset.. noting initially where an object is in relation to the master object and then from there on.. any subsequent changes of the master position, all other objects would update.. but damn if i know how to pose this to C2.. heh

  • Hey MadFactory, Ok I'll try that. I was just trying out some stuff.

    I realize now also that I need to add some depth to the question, I would be looking to ideally having multiple common objects move in unison.. for example.. you have a space ship with two sets of wings. I wouldn't want to make 4 unique wing objects if i could instead use 1 wing 4 times.

    The intent is to make the idea of having numerous common objects that share the same basic properties

    With game salad this wasn't possible. I had to make lots of unique objects to attach them all and this got really cumbersome if you wanted to make simple changes because then you had to go in and make the changes by hand for each object.

    It's ok with 1-2 things, but when you get into having dozens of things on the screen it can become very ugly and difficult to manage.

  • I'd like to have something like a ship that moves around and have independent parts that move with it.

    With GameSalad I would have to make a master object and constrain global variables X and Y and have subsequent attached objects slave to that value, however I'm not sure with C2 because:

    1. if it's even possible to do this approach in the first place. I feel like the use of "every tick" should be avoided at all costs in terms of efficiency.

    2. if there isn't a smarter way to do it with C2.

    Thanks!

    Caleb

  • booya! ok now that makes sense and it IS great to see that the tutorial points out that this is unique to this particular behavior. I got it to work once I understood this distinction.

    However big props should go to JJList for coming up with a "roll your own" solution to turret independent behavior. :)

    Thanks!

    Caleb

  • LittleStain in it's simplest form, i have a have to have a bullet behavior on the bullet object or it doesn't move.

    when i add the unaltered basic bullet behavior, the bullet shoots to the right regardless of turret rotation.

    So I'm just not seeing where the turret is telling the bullet what direction to go.

  • okay, first question.. what is the green loop icon? you have it next to system in several places. That is new to me. I guess it's related to "for each" but i don't see why this would have an icon where other actions don't. Is there something special about it I should know?

    another thing. you have a system/else on line 3 all by itself. seeing it as it is by itself, i am surprised to see that works. wouldn't the else need to be linked to something to know what the other option is or is it simply that because it's the next function below the 2 line that it works?

    So you use this "for each" function, is this a key part of how you differentiate the saving of UID's to each tower individually?

    You use TargetUID for both Tower and Bullet. Is this needed or could they have been named uniquely?

    Also I noticed that you're not using the turret behavior stuff. As you can see in my prior capx, its about having a turret rotate and point to the target and i'm not sure if that would effect anything with your approach.

    Sadly after having gone through it to try and reproduce what you made in yours somehow it didn't work. I've attached the project here if you want to see what i did.

    I have to say this IS a very advanced / complex way to solve this problem. very impressive, but for noobs like me its a clearly easy to mix something up.

    here is the project dropbox.com/s/jt6g4icsdokxrx5/TD_Test_2.capx

    the only difference i can see is that i have two enemies on the screen already where you spawn an enemy from a spot. i'm not sure if that would matter.

    Sincerely,

    Caleb

  • Also for anyone who wants to see exactly what i'm seeing here is a link to the project dropbox.com/s/u20cq4809ao2ds7/TD_Test_1.capx

    I should have included this sooner.. see how the turrets track as they should but the bullets seem to be conflicted.

    I'm trying the method JJList made now. I just can't figure out what the template version achieves the same effect with a bit less work.

    Regardless I do like having a better understanding of how to utilize UID.

    Thanks!

    Caleb

  • ok yea now see that is what i'm talking about! i'll pick it apart further to be sure i really understand it (I.E. actually make my game do the right thing). What mystifies me though is that while you're doing it in a way that makes some sense, how did they get their tutorial to work.. i'll have to investigate further. :)

    Thanks!

    Caleb

part12studios's avatar

part12studios

Early Adopter

Member since 24 Dec, 2012

Twitter
part12studios has 1 followers

Connect with part12studios

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

20/44
How to earn trophies