lukezero's Recent Forum Activity

  • Hi,

    No need to ever tag me. I don’t look at alerts and I skim over all the new posts when I visit the forum.

    I’m guessing you’re trying to do it by moving the head and having it leave a trail that everything else follows. One way to do it is add the head’s position to the front of an array, and just always position the body parts from an offset in the array. Finally you’d want a way to remove stuff off the back of the array when it gets too big.

    The main complexity here is the offset calculation. A simpler formula could be (self.iid+1)*30 to just have each part be 30 frames (or 0.5 seconds at 60fps) behind the part before it.

    (self.iid+1) gives 1,2,3,…etc
    (self.iid+1)*32 gives a distance of every 32 pixels: 32,64,…etc
    (self.iid+1)*32/100 if the head always has a speed of 100 this converts the distances to times
    (self.iid+1)*32/100*60 Finally this converts the times to frames. 

    So events would look like this

    Start of layout
    — array: set size to (0,2,1)
    — body: set offset to (self.iid+1)*32/100*60
    
    Every tick
    — array: push front head.x
    — array: set at (0,1) to head.y
    — body: set x to array.at(self.offset,0)
    — body: set y to array.at(self.offset,1)
    
    Array.width>6000
    — array: pop back

    You’d just move the head however you like. And at 60fps and the head moving at 100 pixels per second the body parts would be connected. There are likely many improvements to this idea but that’s the simple gist.

    Sorry about that, but I was desperate.

    Thanks again for the great help! You're the man! :D

  • I'm almost there! :D

    I completely forgot to assign ID values ​​to the enemy's head and tail.

    I did this with the vertebrae in the loopindex, but I had forgotten about the extremities (head and tail).

  • R0J0hound Master, do you know what is happening here?

  • Now I tried using Array, but it didn't work. The head goes to the top left side of the screen and the vertebrae to the bottom right. I don't know what to do anymore. :(

  • Since I'm a designer and not a programmer, I've been using AI to program, but I still haven't been able to get a functional routine in C2. :(

  • Thanks, man. I know that behavior. I already test it, but unfortunately it didn't worked. :(

  • Sorry, dude. I use C3 too, but in truth I just have the C2 license. I tried to implement your routine on C2, with some change (due to Follow absence), and it wont worked. :(

  • You can try Follow behavior:

    https://www.dropbox.com/scl/fi/7cg90t64mgbzicjcr6ost/FollowSnake.c3p?rlkey=w55m1m9ormzhzhp8pf0hahh5u&st=wg6gg94k&dl=0

    Unfortunately, this routine didn't work for me in Construct 2. I had to make some adaptations, as C2 doesn't have the Follow behavior. :(

  • You can try Follow behavior:

    https://www.dropbox.com/scl/fi/7cg90t64mgbzicjcr6ost/FollowSnake.c3p?rlkey=w55m1m9ormzhzhp8pf0hahh5u&st=wg6gg94k&dl=0

    Thanks!

    I'll test it! :D

  • Hi guys!

    I've been trying to implement a modular shooter-style floating boss in my 2D platform game since yesterday, but I haven't been successful yet. I've tried using Physics' Revolute and Distance Joint, but it's been very buggy. I've tried implementing an algorithm (I confess, with the help of AIs) to keep the boss's sprites cohesive, also without success.

    My goal, as you can see in the image below, is to have the head either follow the player, but keep a good distance from him (~35 pixels), or circle around the top of the screen, while the player destroys its parts until only the head remains, which is the final target.

    Can anyone help me with this routine or have a similar example to share?

    Thanks in advance for your help. :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Things you can search for is “trail”, “scarf”, or “cloth”. To get some ideas I realize the forum search isn’t the best, but you can also utilize google to search for posts too.

    At a glance of looking at footage of that game the scarf just looks like it’s a trail left behind from the neck. With maybe some waviness from a sine wave based on how far along the scarf. Or something.

    I don’t have a lot more to add at this time.

    Thanks one more time! My english isn't good enough yet! ^^

  • Help! R0J0hound ^^

lukezero's avatar

lukezero

Member since 4 Oct, 2014

None one is following lukezero yet!

Trophy Case

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

14/44
How to earn trophies