Thread: [HELP]

Results 1 to 7 of 7
  1. #1
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh

    [HELP]

    Well, I want to make something that when a sprite touch an other, the first one will goes back to Vector2.Zero,,,,,,I used:

    Code:
    if(vec == eVec || vec.X == eVec.X || vec.Y == eVec.Y) 
    {
             vec = Vector2.Zero;
             eVec = new Vector2(700, 100);
    }
    cVec -- Enemy Vector
    vec -- Player Vector

  2. #2
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    Not quite sure if these IFs will work like you want... but ok..

    Explain better the result you want and what are you trying to do.
    And whats actually your problem...?

  3. #3
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by Brinuz View Post
    Not quite sure if these IFs will work like you want... but ok..

    Explain better the result you want and what are you trying to do.
    And whats actually your problem...?
    well, when I move a sprite around, and it touches an other sprite I want the first one to get back on the start position... It works, but I need to put the sprites on the same location....

    For ie:
    At your game when you crash 2 planes (or whatever) your plane gets destroyed....

  4. #4
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    Well i stop drawing the plane.

    You mean you want to reset their position? If thats the case.. I dont see the problem

  5. #5
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by Brinuz View Post
    Well i stop drawing the plane.

    You mean you want to reset their position? If thats the case.. I dont see the problem
    huh? well, it resets the position only if the 2 sprites are in the exact position, but I want to reset it when they touches each others....

  6. #6
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    ha.. lol.. check my code.. you will find examples there mate

  7. #7
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by Brinuz View Post
    ha.. lol.. check my code.. you will find examples there mate
    xD it's gigant xD, Will take me a lot of time xD