limiting a bot/player to weapon it starts with
by Donald Teal · in Torque 3D Professional · 09/22/2010 (10:48 pm) · 4 replies
what is the best way to keep a bot from being able to to pick up weapons?
I have animals like dogs and such that are melee based but they tend to grab weapons if they are dropped.
and a rotwieller looks awefully funny with a rocket launcher sticking out of his head. I have tried several things to do this and nothing is working so far.
and even changed this in weapon.cs
to this
I have animals like dogs and such that are melee based but they tend to grab weapons if they are dropped.
and a rotwieller looks awefully funny with a rocket launcher sticking out of his head. I have tried several things to do this and nothing is working so far.
datablock PlayerData(WarRottwielerData : DefaultPlayerData)
{
shapeFile = "art/shapes/actors/warRottwieler/warRottwieler.DAE";
boundingBox = "0.75 0.8 1.3";
swimBoundingBox = "0.75 1.5 1.15";
maxInv[RocketLauncher] = 0;
maxInv[RocketLauncherAmmo] = 0;
maxInv[Crossbow] = 0;
maxInv[CrossbowAmmo] = 0;
maxInv[Halberd] = 0;
maxInv[Hammer] = 0;
maxInv[Transweapon] = 1;
};and even changed this in weapon.cs
if (%shape.getClassName() $= "AIPlayer") {to this
if (%shape.getClassName() $= "AIPlayer" && %shape.getDatablock().getName() !$= "WarRottwielerData") {About the author
#2
ment they could not pick up at all and
ment they could pick them up but had none in inventory
If this is incorrect please could you explain why
09/23/2010 (11:04 am)
well my understanding was that maxInv[RocketLauncher] = 0;
ment they could not pick up at all and
%player.setInventory(RocketLauncher, 0);
ment they could pick them up but had none in inventory
If this is incorrect please could you explain why
#3
09/23/2010 (12:48 pm)
Last time I checked, leaving out maxInv for a weapon, makes the player run through the item and not being able to pick it up. Comment out that line - maxInv[RocketLauncher]=0; and see if you can still pick it up as a player, then try it with AI. I'm assuming that you have seperate datablocks for players and AI ?
#4
09/23/2010 (2:16 pm)
we have player and ai datablocks using the same models. most ai are also available as playable characters.
Torque Owner Jules
Something2Play