enemy shot

Talk about making games.

enemy shot

Postby The achievement » Mon Mar 13, 2006 2:45 am

Hi can i use a rand() event just for any random enemy can shoot me, cause i really dont like timers i dont know how to use them, so can i do rand()1*10 on enemy shooting me?
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 Troodon » Mon Mar 13, 2006 12:19 pm

You can't do random time with rand() function.
You need to use timers...eden for 1 sec durations.
But it's much easier to use timer function wich Macslane made for us than do it in the global code. :D
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby The achievement » Mon Mar 13, 2006 4:04 pm

ok so i create a timer and put that timer on the bomb? from 2000 to 5000 ms. right?
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 Troodon » Mon Mar 13, 2006 6:55 pm

er...put the timer in the enemy wich creates the bombs.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby The achievement » Mon Mar 13, 2006 10:03 pm

i got ya! and what does er... mean? you mad or somthing
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 Troodon » Tue Mar 14, 2006 1:14 pm

'er' means that I freezed. (or something like that)
If somebody says: "Once upon a time there was...er...er...er....er", he has freezed. (I use it like that but I don't know how brithish and yanks are using it.)
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest