Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Gani Construction (https://forums.graalonline.com/forums/forumdisplay.php?f=50)
-   -   custom characters (https://forums.graalonline.com/forums/showthread.php?t=76343)

Cherrykao 08-18-2007 04:22 AM

custom characters
 
say like i make a custom character. the head files are named like myhead1.png, myhead2.png, myhead3.png, etc... and each of these files are arranged like this format:

http://i34.photobucket.com/albums/d1...crobo/head.png

then i make custom bodies in similar format as head files. I load all the head and body parts into graalshop and they appear on the left hand side of the screen.

I'm having trouble figuring out how to do a sethead, setbody, etc... in game using my own custom character.

Here's what I'm guessing i would have to do using ATTR such as:

ATTR[1] for hat
ATTR[2] for head
ATTR[3] for body
ATTR[4] for shield

so say like for the head, i edit the gani script and do:

DEFAULTATTR2 myhead1.png

,then for each body part, i would do:

SPRITE 400 ATTR2 0 0 30 30 head
SPRITE 400 ATTR3 0 0 30 30 body

and then in the game, i would just do:

player.attr[2] = "myhead1.png"; // or whatever head i want to use

Is my assumption correct or how do you guys recommend i do this?? thanks.

PrinceOfKenshin 08-18-2007 04:38 AM

Well you still have to do defaultattr for the body too. The script you have should work.

Chompy 08-18-2007 12:37 PM

You have a good setup, I think it will work ;o

zokemon 08-18-2007 03:54 PM

You can use player.head and player.body for the head and body just make sure the numbers in the body files names are 100 or greater if you don't want the default body coloring to appear on them. You should always try to save as many attrs as you can.

EDIT:
Use shield for the shield too.. Why do you think you can't use these? o_O

Just disable sethead, setbody and setshield in server options and script your own commands.

Cherrykao 08-18-2007 04:54 PM

Quote:

You can use player.head and player.body for the head and body just make sure the numbers in the body files names are 100 or greater if you don't want the default body coloring to appear on them. You should always try to save as many attrs as you can.
save as many attributes?? i believe the limit is 30 right and attr[1] is reserved for hats. i still have to gfx the head and body images, so i won't have anything to play around with right now, but thanks to everyone's comments, i have a working idea how to approach this, although i might run into some trouble later.


All times are GMT +2. The time now is 06:03 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.