Look at this project. Im working on an AI scooter game, but i cant get the AI to shoot at you. Basically he walks around and if you walk in front of him he'll set out a little scanner. If it hits the player hitbox before it hits an obstacle it will tell the AI to shoot at you constantly until its dead or blocked by an obstacle. The only problem is it WONT SENSE THE HITBOX! I tried everything! I even actually PUT THE SENSOR ON TOP OF THE HITBOX AND IT STILL SAID FALSE WHEN I X2 CLICKED THE "TOUCHING HITBOX" SENSOR!
Last edited by trekkie2000 (2011-07-15 19:58:07)
Offline
Your enemyscanpen hides right when you click the green pen, since it's hidden it's not actually doing any of the scripts you're telling it to. If you show the enemyscanpen then the enemy detects you and shoots at you. Maybe if you used ghost to hide it instead of hide, then it'd work without the enemyscanpen being seen.
Offline
I think what Flait7 said is one of your problems - set the ghost effect to 99 instead and it should improve. I've also noticed another problem through. You've told the hitscan sprite to move forward until it's touching the edge, the player's hitbox, or the color black. However, the enemy's hitbox is black too, so it's going to the position of the enemy, seeing that it's touching the color black, and ending the script.
Offline