|
a question Displaying 1-6 of 6 total.
1
Ulver
|
anyone know of a good way to put a sword in a CHR's hand other than drawing it in the frames of the .CHR file? Like say when you start the game you have no weapon. Then you find a rusty sword and once equiping it it appears in your hands and when you attack you swing it and stuff. Whenever you equip a new sword you can tell wich one you are using just by looking at what it in your character's hands. You would have to draw animations for the character's swinging action but would it be possible to draw the sword into his hands from a seperate PCX file? That way you wouldnt have to make a huge space in the .CHR file frames to draw the swords on... throwing off the hot spots even more. possible? impossible?
just thinking...
Posted on 2001-07-10 17:27:22
|
TheGerf
|
You could have a small pcx of the sword itself, and tcopysprite it onto the right coordinates.
IE. if the sprites hands are at +2 (x), -20 (y) of the sprites pixel coordinates:
tcopysprite(player.x+2, player.y-20, image_width, image_height, swordPic);
If the sprites hands move in the walking animation, however, you need to do something to find what frame it's on.
TheGerf, not just any gerf.
Posted on 2001-07-10 17:32:05
|
invicticide
|
The old FF Reprise demo had a free movement thing that checked for frames, I think. Try that.
Also, you could just create multiple CHRs. One with sword, one without. Of course this is a pain if you have lots of different swords, but Verge isn't a *perfect* engine.
CHRs aren't that big, file-size. Having several CHRs won't bloat up your ZIP too bad. It is kinda inconvenient.
As for the hotspots, you *can* position them however you want, and that part works fine, it's just the size that's not implemented. So as long as a 16x16 obstruction works for you, having a 32x32 CHR (to accomodate for the sword... whatever size is cool tho) won't pose an obstruction problem.
That is all.
--Invicticide
Posted on 2001-07-10 20:24:53
|
Zeke
|
Could it work to have one CHR file for the player, and a separate one containing just the sword animation? That way you could add the sword itself as an entity to the map, positioned relative to your character. To step through its animation you could use entity.specframe[]. Different swords would each get their own CHR file rather than a PCX. If you want the player drawn beneath the sword (like a layer below) you might have a problem getting two entities on the same tile. I'm not sure.
The real problem, as it appears to me, is that you would still have to include the hand holding the sword in the sword CHR, and not in the player CHR. That could cause problems if he's NOT holding anything. Also it seems you would have to have 4 different animation sequences: one for each direction. Depending on the number of frames you want for each sequence, and the total number of swords, that could add up to a lot of drawing time. (But maybe that's not a problem for you. Anyway I guess you'd have the same case with the PCXs)
This would save you from having to draw the player several times over. How does that sound?
Posted on 2001-07-10 23:20:57
|
rpgking
|
You can use a PCX sword and put in the the .CHR's "hands". I've done this in my realtime battle system which is/was at the VergeSource. Just make sure that you draw the sword at the player's "on-screen" coordinates with the following functions:
int entity.screenx(int choice)
{
return entity.x[choice]-xwin+8;
}
int entity.screeny(int choice)
{
return entity.y[choice]-ywin;
}
Hope this helped,
-rpgking
Out of clutter, find simplicity.
-Einstein
Posted on 2001-07-11 00:09:57
|
rpgking
|
I didn't mean to include the "+8" at the end of the first function.
Out of clutter, find simplicity.
-Einstein
Posted on 2001-07-11 00:10:54
|
Displaying 1-6 of 6 total.
1
|
|