Custom Sword Gani help

Hi, I am trying to learn about ganis and custom items
so i took an sword script from a random server and ve modified a little

with his 3 files

i’ve put it on my server and the animation works, but the “sword” is invisible even if i’ve set one with setsword command
so he literaly moves his arms with nothing in his hands

i’ve uploaded the ganis

I am missing something?

Probably uses a setplayerprop. Too lazy to download the rar just open up the gani and you’ll need the images that go with it to make your own sword.

Oh, okay i just was opening them with graalshop
now i get it

another question: image must be in /images/? or in /ganis/?

images i believe.
you might have to delete filenamecache.txt though if there are problems. that always seems to fix those image related issues.

Here’s a better answer. When you get an image in your graal files, it is cached with byte size and what not. So it’s better to just rename the image something else and use that. Also, yes the images go into images and ganis go into ganis.

___Merged doublepost__________________

Also there is a typo somewhere in this line, see if you can find it O_O.

triggeraction playerx+1.5+vecx(playerdir)*2,playery+2+vecy[COLOR="Red"](playe rdir)[/COLOR]*2,demonblade,;

Thanks Pyro and Kondie

Jatz the only dif between
and me
is that he’s a troll and everybody fell upon him

That thread is nothing but useless. I actually found an old thread about Custom Swords and it was exactly what this guy was looking for. If he needs the link to it I’ll be happy to show him. But that is just spam Jatz.

I would like you could share it to me
even if i’ve solved my problem
i want to learn so much as possible =)

Here you go!
the original thread is here

if (weaponfired){
  if (this.inuse=0){
    setsword ,2;
    replaceani sword,zodswordattack42;
    replaceani idle,zodswordidle;
    replaceani walk,zodswordwalk2;
    setplayerprop #P2,sword001.png;
  else {
    setsword ,0;
    replaceani sword,sword;
    replaceani idle,idle;
    replaceani walk,walk;
if(keypressed && strtofloat(#p(0))==83){
  triggeraction playerx+1.5+vecx(playerdir)*2, playery+2+vecy(playerdir)*2,beginnersword,;
if (actionbeginnersword){
  if (playerhearts>0){
    setani hurt,;


ben_sword001.png NOT THAT FUCKING HARD

looks familiar…hmmmm, where have I seen that code…


Hey I used this script, worked quite well! However I have a slight problem! I want it to unsheath and after it attacks, the character dissappears, it seems to have problems going from attacking to idle, but it helps to take a step forward he appears again, but standing still=NONO.

Anyone who can help me there? :slight_smile:

Ganis have the ability to set to a different gani at the end of the animation. The gani it’s trying to set to probably doesn’t exist, or you don’t have a copy of it.

I went through the script and it’s no other ganis there needed, it’s three ganis…Idle, walk and attack…I attack and it should go back to idle…but it doesn’t


Question about how sword damage works…
If I duplicate sword and rename it sword2 it still does damage. Does this have something to do with the sprite still being changed? And will this fix that, so I can do a custom damage system with triggeractions?

Dude, next time, look at when the thread was created and think, man, is it worth being trolled for a necro post? Make a new thread, this ones dead

blaze he’s not trolling
blaze that thread is a bit old but not that old
blaze his question is about content found in the thread (I think)


You should probably try looking over what you right before posting to improve readability but meh…
To change how much health a sword would take using a custom damage system you check the paramaters of the triggeraction sent to the player.

triggeraction playerx+4,playery+2,hit,2;

hit is the name of the action of which you will call
the number after that is a parameter and will be sent with action hit.

too check on the receiving player:

if (actionhit)playerhearts -= strtofloat(#p(0));

#p(0) refers to the first parameter sent (#p(1) would refer to the next parameter if there is any, and so on) and strtofloat converts the parameter which is a string when sent to a floating point (or what ever graal does…)

good luck and remember have apply logic coz in the end this shit is really simple…