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: ZELDA GAME HELP, WHEN HITTING A BAD GUY????????  (Read 1805 times)

0 Members and 1 Guest are viewing this topic.
ZELDA GAME HELP, WHEN HITTING A BAD GUY????????
« on: February 14, 2007, 03:13:00 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 51
Hi
I need some help. when objlink collides into objbadguy, link loses a 1/4 of a heart, but it takes all my hearts away, be cause objbadguy is still hitting into objlink. so how do i made link fly back a little bit when he get hurt or a different way.
Thanks alot
~CJ~
 :)
Logged
~CJ






Re: ZELDA GAME HELP, WHEN HITTING A BAD GUY?????...
« Reply #1 on: February 14, 2007, 03:15:12 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
Just work out the vector that the enemy is currently traveling along, reverse it and project the enemy along it by several pixels.
Logged
Re: ZELDA GAME HELP, WHEN HITTING A BAD GUY?????...
« Reply #2 on: February 14, 2007, 03:18:33 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 901
OR, if you would prefer something a little more basic... make it so when you get hit you turn into something like ObjLinkGetHurt... or something of that matter, so then when he is only trying to find objlink, he will back off until you set the alarm for him to change back.
Um... there's a few other ways, but try Infinitus and mine out first. :P
Logged
Re: ZELDA GAME HELP, WHEN HITTING A BAD GUY?????...
« Reply #3 on: February 14, 2007, 03:20:48 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Female
  • Posts: 2374
Or, you could just use the same object, just add an invincible script that blinks his image_alpha for a few seconds, and at the time you get hit, you set an alarm which will stop the script.
Logged
Re: ZELDA GAME HELP, WHEN HITTING A BAD GUY?????...
« Reply #4 on: February 14, 2007, 03:28:54 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 51
BlueMonkey i have a time line to make him blink, but i never made a script before, do u have an example or your own script you can help me with.
Thanks
 :)
Logged
~CJ






Re: ZELDA GAME HELP, WHEN HITTING A BAD GUY?????...
« Reply #5 on: February 15, 2007, 01:46:34 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Female
  • Posts: 2374
Ok, I will try to make an example, but it's meant to be learned from, not copied from. As in, you will need to modify it to match your engine.
Logged
Re: ZELDA GAME HELP, WHEN HITTING A BAD GUY?????...
« Reply #6 on: February 15, 2007, 02:41:56 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 51
Thank you very much and, i wont copy it, all examples i use i always remake them and learn how they work. And of course i will give you credit for the example in my game.
Thanks again
~CJ~
Logged
~CJ






Re: ZELDA GAME HELP, WHEN HITTING A BAD GUY?????...
« Reply #7 on: February 15, 2007, 04:12:39 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1393
create a variable like "hurt" or something in ObjLink. Set hurt to false. In the collision event put (this might not be correct, haven't used GM in like 2 years):

if hurt = false {
[insert damage code]
[desired alarm] = [desired time]
hurt = true
}

and in the alarm event just put: hurt = false
Logged


"It is a terrible thing for a man to find out suddenly that all his life he has been speaking nothing but the truth" - Jack, The Importance of Being Ernest
Re: ZELDA GAME HELP, WHEN HITTING A BAD GUY?????...
« Reply #8 on: March 27, 2007, 09:03:50 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 51
Ok, I will try to make an example, but it's meant to be learned from, not copied from. As in, you will need to modify it to match your engine.

Hi bluemoney did u every make that example for me.
Thanks
 :)
Logged
~CJ






Re: ZELDA GAME HELP, WHEN HITTING A BAD GUY?????...
« Reply #9 on: March 27, 2007, 10:26:34 pm »
  • Doesn't afraid of anything
  • *
  • Reputation: +42/-0
  • Offline Offline
  • Gender: Male
  • Posts: 7002
tad bit of a gravedig, so i'm gonna lock.  See InvaderLupus' post before yours he gave an example =)
Logged



i love big weenies and i cannot lie
Pages: [1]   Go Up

 


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



Page created in 0.317 seconds with 57 queries.

anything