Main Menu
  • Welcome to The RPG Maker Resource Kit.

Setting Hero x and Hero y

Started by Manaxaus, June 15, 2009, 12:27:23 AM

0 Members and 1 Guest are viewing this topic.

Manaxaus

Hi im new to the board. I've been trying to find info on this and as far as i can tell im pulling my hair out trying to search looking for the information. If someone could either point me to a post or post the necessary info that would be awesome.

I'm working on a abs system much like zelda. I want to make events follow the hero so i can use them to my will as weapons and people. I don't know how to store values or set up Hero x and Hero y in to the vars so i can change event location to the heroes.  My test weapon is a boomerang type thingy i want to fly out from the hero so many spaces and re turn so many spaces also things like swords and such just chilling near the hero instead of having to change the chip set each time.

so thanks in advance with help with this. i'll be on later to night...

Or explanation of how a better abs system that does the same thing in a better way would be good too. because i probably don't know any better than to use events as weapons on every map ;"D
Who said i was Wack?

Kokowam

Shut up and actually look in the RPG Maker. There's a built-in option for miscellaneous things to store into variables where HERO X IS AS WELL (I haven't tried 2k/2k3 but I've heard the only different between 2k/2k3 and XP is one thing in 2k3 that XP doesn't have)

If you don't know how to store values at all, give up on making an ABS. ABS is one of the harder things to event.

modern algebra

Well, no need to tell him to shut up. We're here to help. Not ALL PEOPLE WHO ARE NOT IMMEDIATELY GOOD WITH RM SUCK AND CAN NEVER POSSIBLY FINISH AN ABS! GIVE UP NOW!!!

Anyway, mastermoo is right. Under Variable Operations, there is a Sprite option, and under that you can choose an event or player, and then there is another drop down menu with options like Map ID, X-Coordinate, Y-Coordinate, etc...

JUst hit the X and that will set the variable to the sprite's x-coordinate
Same thing for Y

Manaxaus

#3
Thanks modern algebra, I recently found a tut on something completely different and found how to at least set the values.
I've been toying with events following the char and trying to get the hero to activate their movement script. so far not much luck but i have some ideas with having the event's not directly on top of the char but some one to the side. so i'll go from there.

how is an abs with guns and range weapons usually done? events or images?


Thanks again for the actual help

Also this is my no nothing abs system thus far

http://www.youtube.com/watch?v=k9hX6moAjOI

so im not gonna give up ;"D
Who said i was Wack?

Grafikal


Kokowam

Quote from: modern algebra on June 15, 2009, 02:10:21 PM
Well, no need to tell him to shut up. We're here to help. Not ALL PEOPLE WHO ARE NOT IMMEDIATELY GOOD WITH RM SUCK AND CAN NEVER POSSIBLY FINISH AN ABS! GIVE UP NOW!!!
But if they're reluctant to look through the variable operations themselves, why bother helping them? If they asked something, like, "What does the operation "mod" do?" or "What are tips for good mapping?"

(First one's probably bad as it could probably be found in the help file and the second's easily found in all "HELP WITH MAPPING" topics where everyone replies with basically: "use diversity, make nature random, keep man-made places not as random, make sure things aren't empty" (not saying those are bad tips))

But those are the system mechanics and things that one learns over time, not something where you pull down a bar that has, yes, the words "Hero X" (at least in one of the more recent RPG Makers but it still says (if MA is right) "X-Coordinates" and "Y-Coordinates." Don't see how you can miss that). And YES, I am getting defensive. :mad:

@Manaxus, please do not use images as you would need an image for every possible position your character would be in. Then you would need to show and remove images constantly. The best way would be to use an event. And, as I've said, you probably do not have the ability to make an ABS on your own. Not meant to put you down, but, as I've said, it is one of the more advanced things you could do through eventing. hbgames.org has a good tutorial, if I recall correctly so you should at least look that over and either follow it or learn from it.

^ Yes, I calmed down MA. You have valid points, too, but it's dawieb;aw. I know why Falcon flames so many newbs, and it's frustrating to see them not looking through the Maker before asking questions.

DUDE THIS POST IS LONG

modern algebra

Well, assuming that he evented everything in that video himself, he is not a terrible eventer as the menu appears to be custom. Not knowing that an event command exists doesn't mean that he's automatically bad at eventing, or that he won't be able to do what he wants to do.

And yeah, events are probably best for making an ABS.

Manaxaus

#7
Thanks for your comments. I never said i was a nub, just a nub on the form. I do have some knowledge, I Never knew there was even a setting for HeroX and Y to be put in to a var. I searched the forms but the search fails since i can't seem to search topics, Thus i need you wonderful people to point me in the right place. I  often see on this form that one would say look at this tut or look at this post but a link is rarely given.Thus im back to using the search function:"{

And as for my game i coded that segment 3-4 years ago it's been a while. so forgive me if im not up to speed with everything. I've toyed around with the events and yes it's probly beyond me. however, i came along a tut somewhere about setting and enemy range in a radius. so i may be able to work something with that.(for ranged weapons) as for non raged weapons i have 9 different sword values i intend to code. If i branch that crap out of one event and copy pasta for more and change the necessary values i should be good. (and i need to brush up on some animations so the Acton of the char doesn't' look soo tacky.)  As i said before ranged weapons like bows guns and other items elude me. I will try to find that tut, and see if i can learn from it.

Thanks again

@master moo..Okay cool
@Modalg..Thanks,..I'll have fun with the events :"D

Anymore helpful tidbits?
Who said i was Wack?

Kokowam

Oh, here's a helpful hint: THINK. I don't mean this in a condescending way. Really, think everything out. The tens upon tens of event code that you write because you had an idea on how to make the event could maybe have been done in a complex manner that requires maybe only a couple of lines of code and could be easily copy/pasted for future uses.

Manaxaus

thank you. i understand that and it is one reason i need to nerf most of the game and start over. so im starting with the "hardest thing" the abs system. If i think and i don't see any other way right off the bat then i probably wont see it with out a helpful "hey how about this" type dealy.

;"D
Who said i was Wack?

Manaxaus

So i've managed to find this little tid bit from a some obscure site. however, i can't seem to get it to work correctly any ideas?

I can't seem to access the common event when its on. or something like that.

I also can't seem to get the shift key to work. perhaps i have the input wrong?

Who said i was Wack?

modern algebra

Have you turned the "Bring 2a on" switch ON?

Manaxaus

Yes i have. i currently turn it on manually using and event switch(action key)
Who said i was Wack?

Manaxaus

#13
so i got it to work with my main action key. is the shift key something else other than 7?

i am now looking for something called this [Ineluki Key Patch] i cant seem to find an active link

never mind it wont work right anyways. ;"{
Who said i was Wack?

Ocean

#14
Tutorials

These are old tutorials from Gaming World (2005 and before I believe), which are text documents because the old mainsite doesn't exist anymore. I just put some stuff related to ABS' there, I did not check how good/bad they are or if they rely on pictures which are no longer present, but it might still be useful. Check them out and see if they help.

Also, Shift key is 7, and it does work for me.

What I usually do is whenever the hero uses the attack key (I use the enter key for that), I turn on an attack switch. Then I get the heros x and y values, and the x and y values for the enemy character sprites. For ranged attacks, I determine if I want fixed value or not. Then you could do something like this:

If Hero is facing right
 If Hero Y = Enemy 1 Y
   If Hero X + Range >= Enemy 1 X
     If Hero X < Enemy 1 X
           Does damage to enemy, flash enemy, kills them if their HP variable is 0

then do something similar for the other directions/enemies.
Basically what this is doing, if the hero is facing right, the enemy has to have the same Y variable or else they'll be higher or lower on the map and you shouldn't be able to reach them. If the Hero X + range is greater than or equal to Enemy 1 X, and the Hero X is less than the Enemy 1 X, that means that the enemy is in between you and the maximum range. Try that out with some values:
If Hero X is 16 and hero range is 4, and the Enemy 1 X is 19...
Hero X + range = 20. 20 >= 19 so the enemy falls in there. But now to make sure they aren't behind you... Enemy 1 X is not less than 16, so they are able to be attacked.

I won't do the same for the other directions, so plug in some values and try it out. They are not exactly the same code. If you are facing left, the Hero X - range has to be less than the Enemy X, while Hero X has to be greater than Enemy X. It would be best to look at the map, place an example and try to calculate it so you get what I'm doing here. X and Y are 0 at the top left corner, and are highest at the bottom right corner, so keep that in mind.

There's probably a better way of doing that too, I think one of the tutorials there might have it, that's just a way I used to do it a while ago.

Ocean's Dreams blog! Contains RPG Design topics, Game updates and others!
Also check out my tumblr for smaller but more frequent updates!
http://http://oceansdreams.tumblr.com/


Manaxaus

#15
Thanks for the great help! I managed to actually get the range weapons working and such. I'll post a demo of it soon but yes, the key to make it work was very similar to what you said. And i might of done it a simpler way as well. well as much as i need. I did not start making the Enemy have rage yet. Now if i can just figure out why my 7 input proc is not work's ;"{ i'll be a happy camper ;"D

New edit as of 6/25/09
http://www.youtube.com/watch?v=S8Vl1zvjPuI

what i got done so far.
Who said i was Wack?