Bug in collision + keydown combo?

Non-platform specific questions.

Bug in collision + keydown combo?

Postby irblinx » Sun May 28, 2006 8:21 am

I'm pulling my hair out of this one.

I'm creating a vertical scrolling shoot-em-up and to try and cure a problem with my player ship not destroying properly I added a bounding if statement to the collision event a power-up actor.

Having done this my ship now flies off in the direction of the keypress when the collision takes place, I've tried just taking the if statement back out but it makes no difference. Is there some bug at work here or am I missing something obvious?

The only event which the power-up actor has is a script editor one;

MissilePU Actor - Collision with ship actor event
Code: Select all
if (canshipcollide ==1){
 
  missiles = missiles +10;
  if (missiles > 10){
      missiles = 10;
  }

 missileHUD.textNumber = missiles;
 DestroyActor("Event Actor");

}


canshipcollide is a global variable set by the ship on creation and only set to 0 when the ship's animation is changed to explode.

The ship's movement is controlled by cursor keys (currently only left and right)

ship actor key down (right) event
Code: Select all
if (x < rightside){
    x=x+shipspeed;
           }
irblinx
http://www.irblinx.me.uk/Crania.htm
Current projects: Crania deluxe for Mac, iCrania
User avatar
irblinx
 
Posts: 122
Joined: Wed Apr 19, 2006 11:15 am
Location: Manchester, UK
Score: 6 Give a positive score

Postby irblinx » Sun May 28, 2006 2:12 pm

I seem to have fixed this by switching the collision event onto the ship actor instead, so it seems like a bug to me
irblinx
http://www.irblinx.me.uk/Crania.htm
Current projects: Crania deluxe for Mac, iCrania
User avatar
irblinx
 
Posts: 122
Joined: Wed Apr 19, 2006 11:15 am
Location: Manchester, UK
Score: 6 Give a positive score

Postby makslane » Sun May 28, 2006 2:15 pm

Where are you destroying the ship?
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby irblinx » Sun May 28, 2006 2:29 pm

It isn't destroying the ship, it's power-up's, i.e. upgrade weapons, , add missiles etc

The collision event was on the power-up actor but I have now changed it to the ship actor.
User avatar
irblinx
 
Posts: 122
Joined: Wed Apr 19, 2006 11:15 am
Location: Manchester, UK
Score: 6 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest