Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Direction Problem  (Read 2366 times)

0 Members and 1 Guest are viewing this topic.
Direction Problem
« on: June 01, 2011, 02:21:47 pm »
  • Let's do this.
  • *
  • Reputation: +4/-0
  • Offline Offline
  • Gender: Male
  • Posts: 211
Hello, now I have another problem.
I have two objects. [Object 1] and [Object 2].
[Object 1] is an enemy, that can't move. But the enemy can spit cores.
[Object 2] is Link. He can move.
Now the enemy should split cores to Link.
But this is every time different, therefore I need help with this code.
How do you would build this code?
Logged
This is one of many tales Hylian lore speaks of...

Click here to check out my Deviantart!
  • Zelda Time Walker
Re: Direction Problem
« Reply #1 on: June 01, 2011, 08:15:45 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 57
What do you mean by "spit cores"? Is that a projectile weapon?

And what do you mean by it being everytime different?

If you want the enemy to shoot a projectile in link's direction, then use point_direction(link.x,linky.y,x,y) and set the direction of the projectile to the value of the point_direction function.
Logged
Re: Direction Problem
« Reply #2 on: June 02, 2011, 12:09:53 am »
  • Doesn't afraid of anything
  • *
  • Reputation: +42/-0
  • Offline Offline
  • Gender: Male
  • Posts: 7002
By cores, I assume you mean something along the lines of a deku scrub spitting deku nuts.

Quote
If you want the enemy to shoot a projectile in link's direction, then use point_direction(link.x,linky.y,x,y) and set the direction of the projectile to the value of the point_direction function.

This will be your best bet without getting into too much math, although I suggest you also learn how to do it manually just for your own education.
Logged



i love big weenies and i cannot lie
Re: Direction Problem
« Reply #3 on: June 02, 2011, 10:26:25 am »
  • Let's do this.
  • *
  • Reputation: +4/-0
  • Offline Offline
  • Gender: Male
  • Posts: 211
Oh, I used "cores". But I meant nuts.
And thank you for the command. Now this problem is finished.XD
Logged
This is one of many tales Hylian lore speaks of...

Click here to check out my Deviantart!
  • Zelda Time Walker
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.038 seconds with 45 queries.