Graal Forums  

Go Back   Graal Forums > Development Forums > Gani Construction
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-18-2007, 04:22 AM
Cherrykao Cherrykao is offline
Banned
Join Date: Apr 2007
Posts: 37
Cherrykao is on a distinguished road
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.
Reply With Quote
  #2  
Old 08-18-2007, 04:38 AM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
Well you still have to do defaultattr for the body too. The script you have should work.
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #3  
Old 08-18-2007, 12:37 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
You have a good setup, I think it will work ;o
__________________
Reply With Quote
  #4  
Old 08-18-2007, 03:54 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
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.
__________________
Do it with a DON!
Reply With Quote
  #5  
Old 08-18-2007, 04:54 PM
Cherrykao Cherrykao is offline
Banned
Join Date: Apr 2007
Posts: 37
Cherrykao is on a distinguished road
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:39 AM.


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