Is there a way to do this?

Talk about making games.

Is there a way to do this?

Postby The achievement » Wed Mar 15, 2006 7:53 pm

Ok well i want my superduper boss to shoot his weopen when i get to him at the end of level one. I dont want him to just shoot, i want him to shoot when i get there, when i can see him. is there a way i can do this?
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby Novice » Wed Mar 15, 2006 10:50 pm

Check the distance betwen the player and the boss and then create a timer that will make the boss shoot. distance is checked using this code
Code: Select all
distance(player.x,player.y,boss.x,boss.y);
Why do i always get stuck?
User avatar
Novice
 
Posts: 399
Joined: Mon Aug 29, 2005 10:54 am
Location: Relative
Score: 5 Give a positive score

Postby frodo » Tue Mar 28, 2006 6:17 pm

you mean he shoots without you pressing the botton that makes him shoot?

to do that, do:

collision on any side of finish-->createactor("bullet"....)

hope that works.
User avatar
frodo
 
Posts: 127
Joined: Tue Mar 21, 2006 6:53 pm
Location: universe
Score: 2 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest