|
||
|
|
#1 (permalink) |
|
Forum Novice
|
hi again..
im trying to make something .. with a picturebox that shows an animated char with a random item equiped and stuff.. using this piece of code to get the frame of it: Animations.GetAnimation(TileData.ItemTable(i).Anim ation(), action, direction, h, False)(N) where i is the item/body, h is the hue, and N is the frame number k so this part works.. but now the wierd part im trying to align the item to the character... and that's making a bit of a problem since every item got a different point where to start drawing, if i try a chain coif it uses one special point. but another piece of head wear uses another point... and after like 3 days of searching and trying and doing and especially hoping, i still haven't found anything that gives me the info to do that anybody got the solution? *Sham |
|
|
|
|
|
#7 (permalink) |
|
Forum Novice
|
i am using pictureboxes... the problem only is... (don't mind the characters they are supposed to make tiny pictures to explain things)
i got 1 character size this: +++++++++++++ +++++++++++++ +++++++++++++ +++++++++++++ +++++++++++++ +++++++++++++ +++++++++++++ +++++++++++++ +++++++++++++ +++++++++++++ +++++++++++++ +++++++++++++ thats the size of the actual character... now the size of a chain coif: ++++ ++++ ++++ ++++ so i can put that on the character.. BUT the bandana.. (same layer as chain coif) is this: +++ +++ +++ in other words.. items of same layer differ from size (where they don't in gumps) so how to make sure the chain coif will be placed correctly AND that the bandana will too... cuz if i now change bandana to chain coif. i got to redo the coords where to place it in the image.. and i don't think you're supposed to do that for 500 different equipable items |
|
|
|
|
|
#10 (permalink) | |
|
Forum Novice
|
Quote:
min x: 0 max x: 13 min y: 0 max y: 15 k so you got a semi-square item now.. but check this center.x = 7 (seems correct, 13/2 = 6.5 ~ 7) center.y = 41 err don't get me wrong, but if an item is 15 pixels wide, how can the center be 41? (makes no sense to me, i've tried it and it diddn't work either) @ceday: different items got different sizes, and they all need to be in the same place, if you put on a 5x10 pixel item.. you need to make sure it fits the place it's supposed to be.. but if that item gets replaced by another item (same layer, so same use, so it has the same place on the character) the size can be 2 x 4 pixels... so the x and y offsets don't match (it will cause the item to be placed at the wrong position), and if i try center values they don't match either so is it just me or is it something wrong with my script or whatever? |
|
|
|
|
|
|
#11 (permalink) |
|
Forum Administrator
Join Date: Aug 2002
Posts: 2,850
|
It's been a long while from when I've last mucked with animations. But, I believe it goes something like this...
If you want to draw a frame standing at (x, y), you use: x -= frame.Center.X; y -= frame.Center.Y + frame.Bitmap.Height; |
|
|
|
|
|
#12 (permalink) |
|
Forum Novice
|
thanks krioss.. that works perfectly, images are at the positions where they are supposed to be....
*edit* i keep getting error when i give action > 3, is there any reason why (i ripped pols client.inc file since it shows basic animation numbers, that list goes from 1 to 30+, though here it won't get past 2) |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|