Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualBrother Bob

Posted 22 July 2013 - 12:06 PM

EDIT: Nope!  the following doesn't work yet, it just keeps spinning around.

 

EDIT_2: Now it works! Reversing the positive and negative signs that are highlighted green fixed it

I tested it with some fairly ridiculous numbers like 5000 and -5000 and it still worked, so I think it's good.

 

//==================================================================================================

 

We could do something like the following with a variable called "targetAngle"

 

//=================================================================

ship_down_two() { ship_01_POSITION_Y -= 0.1;

targetAngle   = 180.0; }

//=================================================================

update(int value)

{

 

if(ship_01_ANGLE < targetAngle) { angle += 1.0; // When this was -= the ship kept spinning endlessly, this note is left here so people can see how a little thing can introduce bugs }

if(ship_01_ANGLE > targetAngle) { angle -= 1.0; // When this was += the ship kept spinning endlessly }

 

 

 

}


#7marcClintDion

Posted 22 July 2013 - 03:09 AM

There is far too much arrogance and out right abuse by site moderators, they are teaching other people to behave this way.  The posts I've made will all be shorty removed and replaced with this notice.  Game development is not the only thing being taught here, bad behavior is being taught as well.


#6marcClintDion

Posted 01 July 2013 - 07:37 PM

EDIT: Nope!  the following doesn't work yet, it just keeps spinning around.

 

EDIT_2: Now it works! Reversing the positive and negative signs that are highlighted green fixed it

I tested it with some fairly ridiculous numbers like 5000 and -5000 and it still worked, so I think it's good.

 

//==================================================================================================

 

We could do something like the following with a variable called "targetAngle"

 

//=================================================================

ship_down_two()
{
       ship_01_POSITION_Y -=     0.1;

       targetAngle    = 180.0;
}

//=================================================================

update(int value)

{

 

       if(ship_01_ANGLE < targetAngle)
       {
               angle += 1.0;                               // When this was -= the ship kept spinning endlessly, this note is left here so people can see how a little thing can introduce bugs
       }

       if(ship_01_ANGLE > targetAngle)
       {
               angle -= 1.0;                               // When this was += the ship kept spinning endlessly
       }

      

 

 

}


#5marcClintDion

Posted 01 July 2013 - 07:35 PM

EDIT: Nope!  the following doesn't work yet, it just keeps spinning around.

 

EDIT_2: Now it works! Reversing the positive and negative signs that are highlighted green fixed it

I tested it with some fairly ridiculous numbers like 5000 and -5000 and it still worked, so I think it's good.

 

//==================================================================================================

 

We could do something like the following with a variable called "targetAngle"

 

//=================================================================

ship_down_two()
{
       ship_01_POSITION_Y -=     0.1;

       targetAngle    = 180.0;
}

//=================================================================

update(int value)

{

 

       if(ship_01_ANGLE < targetAngle)
       {
               angle += 1.0;                               // When this was -= the ship kept spinning endlessly
       }

       if(ship_01_ANGLE > targetAngle)
       {
               angle -= 1.0;                               // When this was += the ship kept spinning endlessly
       }

      

 

 

}


#4marcClintDion

Posted 01 July 2013 - 07:35 PM

EDIT: Nope!  the following doesn't work yet, it just keeps spinning around.

 

EDIT_2: Now it works! Reversing the positive and negative signs that are highlighted green fixed it

I tested it with some fairly rediculous numbers like 5000 and -5000 and it still worked, so I think it's good.

 

//==================================================================================================

 

We could do something like the following with a variable called "targetAngle"

 

//=================================================================

ship_down_two()
{
       ship_01_POSITION_Y -=     0.1;

       targetAngle    = 180.0;
}

//=================================================================

update(int value)

{

 

       if(ship_01_ANGLE < targetAngle)
       {
               angle += 1.0;                               // When this was -= the ship kept spinning endlessly
       }

       if(ship_01_ANGLE > targetAngle)
       {
               angle -= 1.0;                               // When this was += the ship kept spinning endlessly
       }

      

 

 

}


#3marcClintDion

Posted 01 July 2013 - 07:24 PM

EDIT: Nope!  the following doesn't work yet, it just keeps spinning around.

 

EDIT_2: Now it works! Reversing the positive and negative signs that are highlighted green fixed it

 

//==================================================================================================

 

We could do something like the following with a variable called "targetAngle"

 

//=================================================================

ship_down_two()
{
       ship_01_POSITION_Y -=     0.1;

       targetAngle    = 180.0;
}

//=================================================================

update(int value)

{

 

       if(ship_01_ANGLE < targetAngle)
       {
               angle += 1.0;                               // When this was -= the ship kept spinning endlessly
       }

       if(ship_01_ANGLE > targetAngle)
       {
               angle -= 1.0;                               // When this was += the ship kept spinning endlessly
       }

      

 

 

}


PARTNERS