Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

New forum theme up and running!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Need help! Throwing shurikens?
« previous next »
  • Print
Pages: [1]

Author Topic: Need help! Throwing shurikens?  (Read 4613 times)

Offline adzox

  • Member
  • Initiate
  • *
  • Posts: 7
  • Uh...Guy...Dark...???
Need help! Throwing shurikens?
« on: August 14, 2008, 08:48:25 AM »
Pliz I need  help with my ninja game! I want to throw a shuriken at an enemy, but how do i tell the game that it's a hit? ???
Logged

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Re: Need help! Throwing shurikens?
« Reply #1 on: August 14, 2008, 09:11:07 AM »
We can' t help you if you don't explain what the problem is.
 Saying that you are throwing a shuriken can mean many things.

But if you are talking about a skill called "throw shuriken" then you have to insert some numbers in the "effect rating".
if it is an item, then make it a skill scroll that invokes a skill called "shuriken" and then the above.

If you outside battle, then create an event and set the X and Y cordinates equal to two varaibles.
Then make the X and Y cordinates into variables of all the enemy events.
next create a parralel process that checks if your shuriken collides with the enemies, In other words: If the shuriken's X&Y is the same value as one of the enemies' X&Y.
Next, lower the "enemy health"by having a varaible for every enemy event on the map. When they are hit, increase the variable by 1 or 2 or 3 ect. Then have a second page on the enemy event that have the precondition that the enemy health variable is above - let's say 20(wich in this case means the enemy's max health). This page should eb blank as the enemy is dead.

So yeah, explain better.
Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

Offline adzox

  • Member
  • Initiate
  • *
  • Posts: 7
  • Uh...Guy...Dark...???
Re: Need help! Throwing shurikens?
« Reply #2 on: August 14, 2008, 10:16:43 AM »
Well, yeah its outside. Thanks for the explanation! I will put you in my credits! P.S Sorry for the bad explanation, i've been looking for help in 3 weeks now so i was kinda stressed.D.S
Logged

Offline lonewolf

  • lonewolf
  • Leader
  • *
  • Posts: 2,049
  • from the Kiowa apache tribe
Re: Need help! Throwing shurikens?
« Reply #3 on: August 14, 2008, 11:15:34 AM »
if you need the battlesets  and charasets of the shuriken
give them the credits as they made some good ones

http://www.charas-project.net/forum/index.php?topic=22155.msg13145#msg13145
http://charas-project.net/resources_download.php?id=32584&file=resources%2FCharasets%2F29082_1174438070.png
« Last Edit: August 14, 2008, 11:20:20 AM by lonewolf »
Logged
A real friend is one who walks in when the rest of the world walks out

Offline adzox

  • Member
  • Initiate
  • *
  • Posts: 7
  • Uh...Guy...Dark...???
Re: Need help! Throwing shurikens?
« Reply #4 on: August 14, 2008, 02:03:08 PM »
Thanks! Well, i kinda got a problem...when i press the throw button it does not work, so i checked the code and i couldn't see any problem...(Well im not so good in this, but still) This is the codes In common event:
Shuriken Hit: Paralell Process, Switch Shuriken throw.
<>Branch If variable ShurikenX Is Equal To MonsterX
   <>Branch If variable ShurikenY Is Equal To MonsterY
       <>Varable Operation Add 1 To Monster1

Shuriken Throw: Parallel Process
<>Main Menu Acess Forbid
  <>Key input process:Shuriken Throw Key
  <>Switch Oper.Switch Shuriken Throw ON
    <>Branch If Hero faces up:
      <>Move Event:Shuriken Up 10 times
      <>Turn Switch Shuriken Throw OFF
    <>If Not:Branch If Hero Faces Right
       Bla Bla Bla...You get the point.

Theese are those on the map:

Shuriken:
Setting Hero Coordinates And Monster Coordinates

<Page 2>: Change Event location to Hero coordinates

Both are parallel process. one without switch and page 2 with switch Shuriken Throw.

Of course í also have my victim, Mr. Brian: You can just kill him!!(Yes he is innocent so he won't attack back, hehe)

Any Ideas???
Logged

Offline Muraiko

  • Cuddly Wuddly Snuggly
  • Zealot
  • *
  • Posts: 606
  • I'm really 4 years old... born on leap year...
Re: Need help! Throwing shurikens?
« Reply #5 on: August 14, 2008, 02:41:05 PM »
If all the corrdinates stuff is too confusing, or just doesn't seem to work, then you could always just use the hero.

When you shoot the shurikan, just turn the hero into the shurikan graphic, and make him run forward, but you'll also need another event on every map that's going to be the hero's dummy, and is the same charset as the hero, so turn on a switch when you shoot, and teleport the dummy to the hero's X, and Y, corridnates, and the switch should make him visible. Then simply make the hero run forward, because he looks like the surikan, and for all the enemies, you could just have the condidtions be "If collistion with hero" to check simply check to see if they got hit.

Of course, it IS the hero, so if you shoot at a place that's supposed to teleport you, you'll probably teleport if you shoot at it, unless you change that.

And the camera WILL be following the hero all the time, so it might look weird if the camera is always focusing on the surikan... but you coud just lock the pan state to prevent that.
Logged

http://www.charas-project.net/forum/index.php?topic=23774.0

Offline adzox

  • Member
  • Initiate
  • *
  • Posts: 7
  • Uh...Guy...Dark...???
Re: Need help! Throwing shurikens?
« Reply #6 on: August 14, 2008, 03:40:05 PM »
Oh god thanks, that made sense to my brain! !!!WOW!!!
Logged

Offline adzox

  • Member
  • Initiate
  • *
  • Posts: 7
  • Uh...Guy...Dark...???
Re: Need help! Throwing shurikens?
« Reply #7 on: August 14, 2008, 04:07:57 PM »
Can you send in a code, for me, when i press the button the floor becomes like walking on ice.
Logged

Offline Muraiko

  • Cuddly Wuddly Snuggly
  • Zealot
  • *
  • Posts: 606
  • I'm really 4 years old... born on leap year...
Re: Need help! Throwing shurikens?
« Reply #8 on: August 14, 2008, 05:35:08 PM »
Okay, but my scripts have lots of unneccisary stuff, and kinda messy, so I tried my best to clean it up it a bit. Here it is:



I'll explain everything step, by step.

The first Key input is just to check if you pressed the button. In my case, it's the shift key.
The move event is just to change my character to a bullet, and unlock her facing.
The next branch you should just ignore. I used it just to know what weapon she has equipped. Too lazy to delete that... (-_-)
Ignore the labe as well please!!!
The branch is to check if the shift key was pressed, or whatever it's going to be in your case.
Forgot to delete that too! Please don't mind the variable, and branch for the bonus variable. I just used that to implement a critical hit system.
Of course, the branches to know what way your character is facing, and to show the right battle animation for each direction.
I then turn the hero to transparant, so when she turns into the bullet without really showing too much attension, it'll probably work without that step though
Memerize the hero's posistion into three variables.
Change the hero to the desired graphic. Bullet, arrow, shurikan, whatever.
And then you move the hero one square forward. Just to make sure that nothing gets in the way, but It'll probalby work without that step as well...
And then you teleport the dummy of the hero to the memorized location earlier. I called my dummy, "Substitue".
Turn the hero opaque, so they can be seen
Finally, make them move forward, and set it to repeat pattern. I increased the move speed to the max in mine, just so the bullet will fly fast.
Please don't that "Attack number" conditional branch. Too lazy to delete. Not required.
The switch, "Chakira" is just so that her dummy will apear, and make it look like she's staying in place, while she shoots with her gun!
You then have to decide how long you want the projectile to be there. I use just one second, but It'll differ, depending on your projectile's speed.
Finally, after the wait time, I reset the hero's speed back to normal, so when you move around again, you won't be like, the god of speed.
Switch "Chakira" off, just so the dummy will disapear
Recall the hero back to their origanal location, the one you "Memerized Location" for from the begining.
And finally, change the hero back to their normal sprite.


Of course, you have to copy, and paste that for all directions, unless you don't have different battle animations for each direction.

If you're going to put this in the common events, then you'll NEED to have the dummy be the same "Event ID" on ALL maps that you can shoot in. So if it's the first event made, make sure it's the first event made on ALL OTHER MAPS.

And you'll have to make sure that the "Map Transistions" Are instantaneous, or else it'll take forever to get teleported back.

Also, so the camera doesn't go crazy on you, you'll have to put in "Lock Pan State" in the begining, and "Unlock Pan State" At the end.

So, yeah. That's what I made and used, and it works perfectly well for me. Hope you understand that, and didn't get too confused, especially with all that extra junk that I didn't delete in there...
Logged

http://www.charas-project.net/forum/index.php?topic=23774.0

Offline jj1546

  • panda
  • Initiate
  • *
  • Posts: 63
  • Its dangerous to go alone, take this -Cave dood
Re: Need help! Throwing shurikens?
« Reply #9 on: August 14, 2008, 06:12:24 PM »
I agree with Muraiko ive tried making a space shooter in the past using cordinates and you have to set X and Y for every single enemy.
Logged

Offline adzox

  • Member
  • Initiate
  • *
  • Posts: 7
  • Uh...Guy...Dark...???
Re: Need help! Throwing shurikens?
« Reply #10 on: September 05, 2008, 01:27:56 PM »
Thx very much i think i understand better now!
Logged

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Need help! Throwing shurikens?
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum