theoffspring18 Posted March 23, 2016 Share Posted March 23, 2016 Hi, i'm new to this community, so hello everyone! :D I try to implements melee attacks in the game, but nothing seems to workI followed this tutorials: http://www.garagegames.com/community/resource/view/20273/2#commentsa) create a new file under /art/datablocks/weapons/cricketbat.csb) paste in the Datablock and Image info from abovec) add a line to art/datablocks/datablockExec.cs ... to exec the new cricketbat.cs filed) open scripts/server/weapon.cs and add the onFire and Melee_Attack functionse) 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! ;) Quote Link to comment Share on other sites More sharing options...
irei1as Posted March 23, 2016 Share Posted March 23, 2016 (edited) 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 March 23, 2016 by irei1as Quote Link to comment Share on other sites More sharing options...
theoffspring18 Posted March 23, 2016 Author Share Posted March 23, 2016 You were right, my datablock file can't load: " preload failed for SwordImage : Bad Datablock from server" I'm gonna check my Sword.cs file Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.