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: Help, Boomerang xD  (Read 845 times)

0 Members and 1 Guest are viewing this topic.
Help, Boomerang xD
« on: February 07, 2007, 12:26:31 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 640
ok, I set in the create event something call "throwboomerang=0", when it ests to 1 the boomerang appears and goes to the direction link its facing.
The problem is that when it comes back it wont destroy itself, it will stay on link's head xD.
so I tried this.
in step event:
Quote
if alarm[0]=-1{
    move_towards_point(global.linkx,global.linky,5)
}
if distance_to_point(global.linkx,global.linky) <5 and alarm[0]=-1{
    instance_destroy()
}
in alarm 0
Quote
move_towards_point(global.linkx,global.linky,5)
and alarm 1
Quote
sound_play(Boomerangspin)
alarm[1]=5
and on create event this
Quote
alarm[0]=15
alarm[1]=5
throwboomerang=1
it works, comes back and the boomerang disappears, but then when trying to throw it again I cant, cuz it was destroyed.
Any way to fix this? Thanks in Advance guys.
Logged
This is an english website, please speak it.
l0l wut? o_0
Re: Help, Boomerang xD
« Reply #1 on: February 07, 2007, 12:40:02 am »
  • Doesn't afraid of anything
  • *
  • Reputation: +42/-0
  • Offline Offline
  • Gender: Male
  • Posts: 7002
set throwboomerang back to 0 i guess
Logged



i love big weenies and i cannot lie

mit

Re: Help, Boomerang xD
« Reply #2 on: February 07, 2007, 01:13:22 am »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
I think it would be a general better idea to create the object when he throws it, and destroy it when he catches it.
Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Pages: [1]   Go Up

 


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



Page created in 0.016 seconds with 41 queries.

anything