How do I Follow this sprite in all of motion angels speed .

0 favourites
  • 11 posts
From the Asset Store
A various fantasy RPG characters sprites for creating a 2D platformer or sidescroller game.
  • Hi everyone

    I have two sprite I want when one of them collision with other ... Follow this sprite in all of motion angels speed ... the contiur & pin behavior didn't do what I want .... how can I do that.

    Thanks .

  • Hi everyone

    I have two sprite I want when one of them collision with other ... Follow this sprite in all of motion angels speed ... the contiur & pin behavior didn't do what I want .... how can I do that.

    Thanks .

    Sprite1>> On collision with >> Sprite2 :

    Action: Sprite1 >> set angle to Angle(sprite1.x, sprite1.y, sprite2.x, sprite2.y)

    Capx: https://www.dropbox.com/s/8nvme756ejhwm1p/Follow.capx?dl=0

  • Tarek2 great thanks to you

    I do that but I want do something else I want to follow in movement for the first sprite

    I.x ( the first sprite have movement rotation and I want the second sprite to follow this movement ).

  • Tarek2 great thanks to you

    I do that but I want do something else I want to follow in movement for the first sprite

    I.x ( the first sprite have movement rotation and I want the second sprite to follow this movement ).

    Im not really sure I understand you properly, it sounds like you want to imitate the other sprite movements, if so 99InstancesGo had a really nice example in this post

    If is not the one that you are looking for can you explain more what are you trying to accomplish or a capx will be more helpful

  • Hi man

  • Hi man

    Mihai769

    This post and the one you posted in the Education section (deleted) are of no relevance to the threads.

    If you persist in pointless posting you will be banned.

  • Tarek2 great thanks

    I do it the problem with me that I was make event do every tick and that make the bug I changed to do in start of layout and it fix I made it with pin behavior and it,s going good

    Great thanks for your help

    I want to now what's the different between every tick and on start of layout ....

    And I have one more question I make sprite swap object have bullet behavior .... I want this object to stop on mouse crosshere not to going out the screen

    Sorry for my a lot of questions but I'm very beginner on game develop and thanks again for your help 😀👍

  • ismailsawan

    Jejeje great that you fixed it because I have to admit that I'm completely lost with this post, my head is going like Meeeeh!! in the good way of course

    On start of layout: Is a trigger that is (Triggered or Fires) when the layout begins. Meaning that it Only happens once and it happens always at the start of the game.

    What are Triggers??

    This indicates that the event is triggered. Rather than running once per tick, this event simply runs (or "fires") upon something actually happening. In this case, the event runs when the layout starts. It is never checked any other time. Since triggers run upon an event happening, they aren't checked in top-to-bottom order like other events. This means the ordering of triggers relative to other events is not important (except relative to other triggers of the same type, since triggers still fire top-to-bottom).

    Normally you recognize the triggers by the green arrow and the most of them if not all start by (On)

    Example: On collision, On Jump, On Created, On Destroyed etc....... those are all triggers that run once every time the condition is met.

    Every Thick: is A condition which is always true Any Action you add here it will be updated 1 per thick which is = 60 times a second in most of the Pc, Meaning that is for actions that you need to update continuously none stop,

    You can test it out by yourself really quick all of this, you see this capx we wanna make the car1 follow the car2 continuously and we make this by setting the angle from car1 to car2, but once you run it the first time you will notice that it will not follow the car2 because the set angle action only triggers once and it will happen only once this will only work if the car2 will be not moving, but the car2 its constantly moving so the set angle it will have to keep updating every thick to keep track of the car2 angle, so this will only work if you use the (Every thick)

    So now move the Action from the (Start Of Layout) to the (Every Thick) and you will see that now is working great because the angles are keeping updating every thick, I hope it makes sense for you if not you can ask.

    https://www.dropbox.com/s/xzngq55uaiyqvf3/Follow2.capx?dl=0

    You should check the tutorials (system-conditions) and (How Events Work) to have a better view.

  • ismailsawan

    [And I have one more question I make sprite swap object have bullet behavior .... I want this object to stop on mouse crosshere not to going out the screen]

    I'm not sure if I understand

    I suppose that on (mouse crosshere) means that on mouse click object >> Stop object

    Mouse: >> On (Right or Left) clicked "object"

    ACTION: "object " set bullet Enable:>> to Disable

    you can always make a quick drawing picture explaining what you trying to do maybe will be easier for you, with steps 1, 2 etc....

  • tarek2 great thanks to you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ismailsawan

    No problem man, anytime

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)