rpggamer
User
Yes I like DBZ... You got a problem?
Posts: 12
|
Post by rpggamer on Nov 13, 2005 20:27:21 GMT -5
hi i need help w/ some codes (or preferrably drag and drop if possible, as i dont know much GML...) any way im making a game simalar 2 final fantasy but i cant get how 2 make separate health/magic counts 4 the allies and i got a turn base system using drag and drop but it would only work if i had 1 player character so ill need help w/ that(by turn based i mean like the old final fantasys not the new ones where the enemy attacks at random intervals) the good news is that i got my resources and a rough story line! But mainly i need a system of turns and info on how 2 get seperate bars 4 each ally also if any1 can give me a tutorial 4 making an inventory/equip screen i would appreciate it. any1 who helps will get a garanteed spot in the credits as well as a copy of the game if u want (i'll e-mail u the address to where u can download it) but im almost clueless i tried gm community but they didnt help at all... so can any1 give me a hint at least? P.S. i use GM 6.1 and its not registered and srry 4 the long post
|
|
|
Post by IsmAvatar on Nov 14, 2005 10:49:36 GMT -5
for separate health/magic counts for the enemies, first you need to have tried it already. I assume that when you specify "separate", you have tried it and found out that they all have the same count, and hurting one hurts them all. There's 2 ways this problem could occur - oftentimes both ways will appear. 1) You are using global variables for the health and magic. Solution: Don't. The variable "health" is reserved as a global variable. use something like hp and mp. Use the variable dnd's to assign/update them. If you don't know how to check if they are out of health, simply put an if statement in the step event: if variable is less than or equal to 0.
2) Things that effect these bars are applied to "Object:". Solution: If it's already inside the monster object, you can simply have it apply to self. If it's inside some other object (such as something that damages them or ups thier MP) in a collision event, simply apply to Other.
For a more specific answer, ask a more specific question.
|
|
rpggamer
User
Yes I like DBZ... You got a problem?
Posts: 12
|
Post by rpggamer on Nov 14, 2005 14:55:47 GMT -5
ok thx but what i meant was how do i get more than 1 bar 2 appear ive tried using "draw health" in drag and drop but it dosent work even if i used a different object as 4 a more specific battle system i have decided that i want 2 be able 2 have a system of speed where the charachter (or monster) w/ the highest speed attacks 1st then the second highest and so on so how would i do that? also i need some AI codes 4 the monsters (ive tried using drag and drop but it only will work if i got 1 character because the monster will attack as soon as it is hit w/ any thing so it dosent wait 4 the others 2 attack) i have the system where the monster dies when its hp runs out but mabey i wrote it a little 2 confusing (even i had 2 reread it twice 2 remember wat i had meant) i just want the hp/mp bars 4 my allies visible
P.S.plz give me an easy code im new 2 gml and thx 4 your help! also how would i post a test demo on a website so i can link it here 4 u guys 2 see it? oh and of course wat would i call u in the credits? by ur screen name or by somthing else?
|
|
|
Post by IsmAvatar on Nov 14, 2005 19:57:07 GMT -5
look up the draw_healthbar function in the manual. When it asks for "amount" simply substitute in your health variable (hp). If you want to draw it relative, say you want it x: -4 and y: -8, you'd do draw_healthbar(x-4,y-8,...
You can just credit me as IsmAvatar
|
|
rpggamer
User
Yes I like DBZ... You got a problem?
Posts: 12
|
Post by rpggamer on Nov 14, 2005 20:44:38 GMT -5
ok thx im still waiting on ai tho can any1 help me w/ that and also ism, i got ur inventory example off your site so thx 4 that 2!
also, i want 2 put the finished (or unfinished in case of a bug that needs 2 b witnessed 2 assess the problem) game on a website how would i do that
IA: merged logged out post
|
|
|
Post by IsmAvatar on Nov 15, 2005 23:28:59 GMT -5
|
|
rpggamer
User
Yes I like DBZ... You got a problem?
Posts: 12
|
Post by rpggamer on Nov 16, 2005 15:10:31 GMT -5
thx your the most helpful person that has helped w/ this rpg ;D oh and i found another inventory that fit in w/ the games theme better although yours was great!!! Edit:no longer need ai tuts! W00T! still trying to figure out how to get the equipscreen to equip the weapon sprites on the battle room screen tho
|
|
rpggamer
User
Yes I like DBZ... You got a problem?
Posts: 12
|
Post by rpggamer on Jan 8, 2006 17:37:48 GMT -5
ive tried making an equip menu and every time ive only ended up either: a) producing "ERRORS" or b) confusing myself more than usual and it still wouldn't work maybe im just hopeless or maybe it is something obvious that i didn't realize but somehow this ain't working...
|
|
|
Post by IsmAvatar on Jan 11, 2006 12:56:41 GMT -5
If you want us to help you you're going to need to provide a little more info than "I'm making an equip menu and it doesn't work."
|
|
rpggamer
User
Yes I like DBZ... You got a problem?
Posts: 12
|
Post by rpggamer on Jan 11, 2006 18:53:24 GMT -5
o sorry u have a point there...heh heh... well i got the items and what they're supposed to do pretty much down and im having trouble with the actual equip screen itself. Basically it will look like a ff7 pause menu, for familiarity reasons, but i want the equipment screen to have a seperate inventory from the items. I can't figure out how to do this because it just adds weapons and items to the same one. Although this isn't nesscary it might help players be more organized and leave more spaces open for other items. And i suppose i could use a variable if i needed to, like "swordequiped=true" then something like if swordequipped=true { draw_sprite(x,y,spr_sword) (stat increase code here) } in the draw event but then it would take a while cause i would have to do this for every weapon not to mention the code for the weapon only being able to be used on only particular characters.Does this look right?: if weapon_id=character_id { exit } else { show_message(This weapon can't be used by this character!) also now that im thinking (for once lol ) i realize that im gonna need to do a character stat screen i can draw the stats and such but i wonder how i might go about making a section showing the equipped weapon, armor, materia, ect. ...*sigh* more variables...? Once i get this done and get a decent demo together i will post in the WIP section here so get excited(not for the dl time tho... freewebs is slo i hear...)thanks in advance for the help i hope my first RPG is at least a good effort for a new guy EDIT: fixed a typographical error i just make too many these days...
|
|
|
Post by IsmAvatar on Jan 11, 2006 23:18:29 GMT -5
you're going at the wrong idea. Instead of having an equipped variable for every weapon, I doubt you'll be able to equip every weapon, let alone 2 weapons (if you do, that's fine, just double whatever I say). As such, you just need 1 variable storing which weapon is equipped. This variable can store whatever you want, as long as it makes it easier to display the weapon later. For example, it can be either an object id or a sprite id. I just helped someone who had 20 different gun objects in a game and each one had its own bullet. I deleted those 40 items and added an obj_gun and obj_bullet which contained a bunch of arrays for their info (the array indexes were each of the different guns). I then used the sprite index to reference it. When I wanted to draw it, it was right there, and I didn't have to worry about adding the gun into the room and having it fire off in the inventory (heh) cuz you clicked the mouse button.
Does that make sense? Basically I just said you should only use 1 variable which contains which weapon is equipped. Dual wielding? No problem - have 1 variable for the left hand and one variable for the right hand.
|
|
rpggamer
User
Yes I like DBZ... You got a problem?
Posts: 12
|
Post by rpggamer on Jan 12, 2006 21:54:19 GMT -5
ooooo i see the light! and it burns my eyes !!!!!lol but thank you very much! im not going to include dual wielding but i can use that for the armor, accessory ect. very, very VERY helpful!
|
|