I have coded my characters to life an item when I hit the up arrow and when they are overlapping said item. The problem is how to code it so that the character will only pick up one item instead of two or more if he/she is overlapping more than one. I've tried picking the object at random, but that only has sporadic success. Is there a way to make my character only pick up only one object every time?
n/a
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
29th May, 2006 at 07:40:20 -
I think the pick one object at random should work, just make sure you have that condition after the overlapping one. Eg.
Player is overlapping box
+ Pick a box at random
Not:
Pick a box at random
+Player is overlapping box
you could 'pick one at random' and drop it if more than one is lifted.
Although this will make them still be picked up, they will drop all the other items until one is left.
I didn't have this problem ever in any of my games.
I found the problem. I was using qualifiers instead of individual objects. I had no idea that would affect anything. With qualifiers, the pick at random wouldn't work, and the "up arrow is pressed" wouldn't work unless it was at the top of the conditions. Is there a way to make this work with qualifiers, or will I need a seperate event for keys, a seperate event for boxes, for bombs, etc.?
It should work with qualifiers. They can be a bitch sometimes but this sort of thing is usually okay. The order of your conditions is always very important.