part12studios's Recent Forum Activity

  • 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

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • Hey that's great. Where is the FAQ? I would love to know more about how picking objects works in Construct 2.

    Maybe if anyone happens to see the Turret Defense Template they could quickly explain how those turrets are clones of each other, but able to behave independent of each other and tell individual bullets which direction to fly.

    Thanks!

    Caleb

  • Hi there,

    I'm doing some work on a tower defense style game and i see the turret temple, but i'm still not seeing how i can have one turret on the screen and each behave independent..

    the issue i have is that when my turrets spawn bullets which shoot towards their target, one turret alone is fine because i set angle for the bullet and it shoots in that direction.. but if I add a 2nd turret, they are both targeting different targets, but all bullets move the same direction rather than each firing in their own correct / independent direction.    

    I suspect this is going to be a much bigger revelation than just turrets, but this seems like a good example to start with.

    Thanks!

    Caleb

part12studios's avatar

part12studios

Early Adopter

Member since 24 Dec, 2012

Twitter
part12studios has 1 followers

Connect with part12studios

Trophy Case

  • 11-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

19/44
How to earn trophies