part12studios's Forum Posts

  • LittleStain, Ok I was able to make that expression work so yea that's very cool. I'll see what I can do with that now that i've seen it work.

    VictoryX that is a way to do it and that does give me some ideas, but it wouldn't allow me to slow down the object as it approaches the edge to trigger a turn around event.

  • oh wow that's so cool that you can just plug in objects names like that LittleStain! i love it.

    i don't know if I understand how to do that "on end". where would I access that event? I don't recall seeing that anywhere I've been in but maybe i'm looking in the wrong place?

    thanks!

    Caleb

  • ok i'll search around for it.   I've never come across a behavior called that.   thanks for the tip! :)

  • yea that does do the trick, but what about interpolating to specific locations?   this is a great simulation for the fishtank for sure, but i feel like this doesn't offer a lot of control.

    another situation that i though would be related to this was if i wanted to have the fish move over to one side and stop.. then maybe in a given condition, then move to another spot with easing in/out.

    I did apply the sign suggestion and it worked well, but i was wanting to have a little more control over other situations.

    Thanks!

    Caleb

  • I have this animal that I want to blink it's eyes but only randomly. I'd like it to be seamless so it seems like maybe if there were some "on completion of animation" event i could randomly pick a number after each the main idle animation complete and if the number is a certain number, then it would play that other animation and when that completes, random again.. over and over.

    I just don't see how i can achieve that looking at an objects animation options. Any suggestions?

    Thanks!

    Caleb

  • Hi there,

    I have an object that I want to animate statically. I have a fish in a fishbowl that needs to swim to the left and to the right and back and forth for ever.

    Ideally it would be great to have him randomly drift up and down a little as well as left and right.. but most important is just knowing how to script an object to be able to go to a specific x/y coordinate and back to another. I think I can manage the flipping logic and all that.. its really just about how to tell

    My instinct was to use bullet, but that just wants go at a fixed speed and not care about location. I would really love to be able to use easing.. in and out.. so the fish isn't just moving at a fixed speed, but rather speeding up and slowing down as it turns around going back the other way.

    Thanks!

    Caleb

  • awesome thanks JJList and everyone for your input. This is great. I just know that offset/dragging will be something I need to use and this is a much more efficient way to achieve this effect

    Thanks!

    Caleb

  • 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

  • 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