Jump to content

How to melee ?


theoffspring18

Recommended Posts

Hi, i'm new to this community, so hello everyone! :D


I try to implements melee attacks in the game, but nothing seems to work

I followed this tutorials:

http://www.garagegames.com/community/resource/view/20273/2#comments


a) create a new file under /art/datablocks/weapons/cricketbat.cs


b) paste in the Datablock and Image info from above


c) add a line to art/datablocks/datablockExec.cs ... to exec the new cricketbat.cs file


d) open scripts/server/weapon.cs and add the onFire and Melee_Attack functions


e) put the $melee_check2hit definition at the top of the ::Melee_Attack() function


I have got also added in player.cs :

mainWeapon = Sword;

maxInv[sword] = 1;


Nothing seems to work, when i left click nothing appears on the console, i tried to put some echo in the functiun to check if they are lauched but nothing happened.


I precise i have no animation for my weapons for the moment, just a DAE file i've downloaded from a site for the 3d model. And when the game start the player has no weapons.



Thanks for reading,

Bye! ;)

Link to comment
Share on other sites

Maybe a mistype in the script made it to fail to load?

I've had the issue of missing a ";" on a line making all the rest of the functions to not work.


Try to look from the start of the console log when you launch the game to see if there are any red lines showing errors.

Edited by irei1as
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...