Game Development Community

Melee resource help

by Don Weatherby · in Torque Game Engine · 11/01/2006 (7:59 pm) · 9 replies

Hi I am trying to impliment melee in my game and well i went to a resource for help but am having a hell of a time getting it to work. ANY HELP at all would be absolutly awsome!

I went to this thread
--------http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10986\

its under programing resources/physics/simple melee system.

and well so far i have a sword model and the scripts needed but when i go to get it in the editor i can only find it under static shapes and so i cant pick it up as a wep and am havving trouble getting it.




EDIT:sorry for the double thread! its in the public discussion to srry! ps. please help me lol!

#1
11/02/2006 (11:30 am)
Any one? help would be much apreciated! thx!
#2
11/02/2006 (11:52 am)
Did you implement the engine changes in C++? Did you exec the sword.cs script file from game.cs?
#3
11/02/2006 (5:01 pm)
Yes i did i changed the necesery files in player h and blah blah and execed it in games.cs its all there in the resource but for some reason it comes as a static object or static shape so i cant pick it up for some reason.


here is the link to the resource of the simple melee system i got.

Click Here to go to resources/programming/physics/simple melee system
#4
11/02/2006 (9:12 pm)
Ive tryed everything i can think of but failed to get this working i can make a sword apear but it only is in the "static shapes" catagory so i cant use it as a wep having a hell of a time with this im gonna look at some more resources thx.

Any help would be much apreciated im still messin with it. thx!
#5
11/04/2006 (5:31 pm)
Any one?........
#6
11/04/2006 (5:39 pm)
Hmmm.... I would try figure this out, but I don't like to mess with C++.
Not yet anyways. So yeah, sorry, I got no idea whats wrong.
#7
11/04/2006 (8:13 pm)
The fact that it is appearing as a static shape has nothing to do with melee resource. You must have a script error in your sword.cs file, or you failed to exec the file. Try running it in debug mode and then check your console output.

The other thing i can recommend is getting the realmwars source from CVS, it's where the melee resource came from.
#8
11/04/2006 (9:18 pm)
Check server/scripts for sword.cs.dso, if you dont have one then you have error in the script. Like Afrim said check the console. Search for crossbow in player.cs and game.cs that show you how to start with sword in hand. Change the starting equipment and allowance inventory.

game.cs

   // Starting equipment
   %player.setInventory(Sword,1);
   %player.mountImage(SwordImage,0);
   %player.setInventory(CrossbowAmmo,999);

player.cs

   // Allowable Inventory Items
   maxInv[BulletAmmo]   = 20;
   maxInv[HealthKit]    = 1;
   maxInv[RifleAmmo]    = 100;
   maxInv[CrossbowAmmo] = 99999999999999;
   maxInv[Crossbow]     = 1;
   maxInv[Sword] 		= 1;
};
#9
11/06/2006 (8:28 am)
I will have to try that in game.cs to maybe just start with the sword and i need to check if i have a sword.dso i know i have sword.cs and i preety sure my inventory is already up to date as far as allowing it in it thx for the info im gonna check this more thx!