player pick up a heavy object
by Rob McNaughton · in Torque 3D Professional · 04/18/2014 (10:48 pm) · 2 replies
I would like to keep 3 weapons in the players inventory and then allow the player to pick up a large object like a crate. When holding the crate the player can't use or switch weapons until he drops the crate. Anybody seen a tutorial or samples to get something like that working? I have a basic FPS MIT 3.5 game I'm working on. I'm up for trying to figure it out myself but I am going pretty slow at finding a solution so far. I would love to know if others have this working.
About the author
Lead Technical Artist for Blizzard's "Team 1" working on StarCraft II. Rob has tinkered with torque for a long time and has yet to make something to show. Soon...
Torque Owner Robert Fritzen
Phantom Games Development
From there you can set a flag along the lines of:
%player.cannotChangeGuns = 1;
And then modify the switch weapons function to check for said flag. Obviously delete the flag when the player drops the crate.