Game Development Community

Shield and sword Help

by DejaBlue · in Torque Game Engine · 10/19/2005 (10:15 am) · 13 replies

I have bought the medevial weapon pack and trying to mount both shield and sword onto Orc. i have no problems getting either sword or shield to mount. but not both at same time.

I am using the RW shield.cs and sword.cs i have exec both scripts, i have added into inv both for 1.
on starting inventory if i add both

%player.setInventory(Sword,1);
%player.mountImage(SwordImage,0);
%player.setInventory(Shield,1);
%player.mountImage(ShieldImage,1);

it will only load the last one, if i comment out the sword the shield comes in fine, or vise versa, not the both same time.

in the shield.cs from RW it is mounting the shield to 31 (LForearm) i have tried

%player.mountImage(ShieldImage,31);
but also does not work.

is there something i am missing? i have also added the melee from
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5377

that works fine. just cant get a shield and sword at same time to mount any help would be highly appreciated

#1
12/15/2005 (1:49 am)
Did you ever figure this out?
#2
12/15/2005 (6:18 am)
Yes i did i added a mount node to the forearm in 3d studio max and had the shield mount to 3 worked great. now if i can figure out a better way to melee.
#3
12/15/2005 (6:21 am)
@Deja, are you using the original Server Side Melee tutorial, or Server Side Melee Redux?
#4
12/15/2005 (6:47 am)
I have tried them all :P atm i am using your melee dreamer. sofar got all errors out bot and me both melee fine, except when bot kills a player , player doesnt respawn, not to sure of why this would happen.and the bot i am using is the AIGuard.
#5
12/15/2005 (6:51 am)
@ Dreamer seems server side uses collision to do everything and works fine with bot, i do your melee Dreamer and it is doing random melee with random different swings. which is more of what i want. not sure if it is caused by the NOT using collision, so the engine maybe doesnt know that i am dead or not, wife has been looking at code off and on. so if you have any ideas why this might happen pleaseeeee yell.
#6
12/15/2005 (6:54 am)
It has something to do with either OnDamage, OnDisable or OnDeath (can't remember which at the moment), it's because of the way damage is being applied
In short, what's happening is the players death isn't properly being accounted for.
Listen man, I'm re-writing this stuff for 1.4 I'm actually at a stage where Melee is being completely re-worked.
My advice right now is to toss Redux, I should have something new up in a few days to a week or so at the most.
#7
12/15/2005 (7:00 am)
Great Dreamer cant wait to try it, sofar melee is back bone of our RPG and well without it, cant work :P. one thing i noticed about the melee was the check for AIPlayer seemed to always comeback with gameconnection. i pulled the bot stuff into the bot's cs file and kept our melee where it was. couldnt get the bot part working the way it was, until i moved it over guessint the aiplayer check was error. ATM been working on other stuff so be great to see any new changes to code for 1.4
#8
12/15/2005 (7:07 am)
Melee is actually being based on the Melee in RTS.
Adapted of course with my usual RPG based stuff.

In the meantime you may wish to cheat and just create a healing spell for your player, keep it hot keyed and when he's close to death just cast a heal on him, since on the tutorial you are working on, death never was implemented properly.
#9
12/15/2005 (7:16 am)
@dreamer
qill the new melee give chance to dodge or riposte by chance? i own the rts addon also but havent had a chance to look into it at all.
#10
12/15/2005 (7:17 am)
Well I intend to add it as a skillset yes, but in it's default configuration no.
Listen I've hijacked this thread too much already, drop me a line via email and we can talk more later.
#11
12/16/2005 (5:07 am)
@Dreamer - I'd be very interested in seeing your melee code for 1.4 when you're done with it. I'm working on an RPG as well. Will you be posting it as a resource?
#12
12/16/2005 (2:34 pm)
Heres another way I got the shield to mount to the player with out changing the model
around line 274 in shapeBase.cc
change
mountPointNode[AIRepairNode] = shape->findNode("AIRepairNode");

to
mountPointNode[AIRepairNode] = shape->findNode("Bip01 L Forearm");
then added this in game.cs to function createPlayer()
%player.setInventory(Shield,3);
%player.mountImage(ShieldImage,3);
#13
12/16/2005 (5:33 pm)
Yea i did this also at one point and thought i should learn more about nodes so i created a mount node on forearm and such and mounted it that way