The Daily Click ::. Forums ::. Klik Coding Help ::. Enemy shooting an object
 

Post Reply  Post Oekaki 
 

Posted By Message

MasterM



Registered
  02/01/2002
Points
  701

I am an April Fool
29th August, 2005 at 17:20:32 -

Okay this is a quiet easy one still I am too stupid to fix it:
My enemy is supposed to shoot an object into it’s own direction (0 or 16) every second.
My enemy has got the ball movement- The bullet has some “custom movement”.

-If the enemy is facing right (0) Set Alterable Value A of Bullet to 1
-If the enemy is facing left (16) Set Alterable Value A of Bullet to 2
So that the bullet will move into the direction its shoot at.

Alterable Value A of Bullet = 1
Set X position of Bullet to X position of Bullet + 6

Alterable Value A of Bullet = 2
Set X position of Bullet to X position of Bullet – 6

So like I said I did that so that the bullet will move into the direction its shoot at/the enemy is facing to the moment the bullet is shoot BUT OF COURSE once the enemy will turn into the other direction the bullet that was moving right will suddenly turn left (Which is all logical).

How can I fix that?
I already thought with my value I would give every bullet an independent value and it wouldn’t care anymore. I hope you people get my problem and can give me a solution.
Thanks


 
Image

JoeCapricorn



Registered
  23/08/2005
Points
  11
30th August, 2005 at 00:23:26 -

Why not just every so and so seconds shoot a bullet in the direction of the enemy?

 
la la la

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
30th August, 2005 at 01:01:11 -

Every 1'
+Enemy is facing a direction(0)
--Create Bullet at (wherever)

Every 1'
+Enemy is facing a direction(16)
--Create Bullet at (wherever)
--Bullet: set flag 0 on

Bullet: flag 0 is off
--Set X position of Bullet to X position of Bullet + 6

Bullet: flag 0 is on
--Set X position of Bullet to X position of Bullet – 6

 
n/a

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
30th August, 2005 at 03:03:58 -

Couldn't you just put a flag there? When bullet is 'shot', the flag turns on. Then add a 'flag _ is off' condition to the enemy facing event..

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

MasterM



Registered
  02/01/2002
Points
  701

I am an April Fool
30th August, 2005 at 08:09:11 -

there are many ways
i could have also done set value of bullet to direction value of enemy...
i just used the ball movement and create at since i am lazy
thx anyway

 
Image
   

Post Reply



 



Advertisement

Worth A Click