Search the Community
Showing results for tags 'code'.
Hi, i start with a new fan mission but i get a problem, when i shot with a custom weapon that launch a lot of projectiles with a lot of spread,(like a shotgun) the projectile spread don't work, all projectiles are launched in to the same place (center view), it's very frustrating, maybe its a code bug, but in the weapon script "launchprojectiles();" the spread and the num_projectiles are not working. Please, if anyone knows how i can fix it, just leave a reply or any information about that. If someone works on the official code, maybe can fix that issue for the new release, that can be useful for people that wants improve the actual weapons. Sorry for my basic english, my mother language is spanish
This question addresses a feature I plan for my cyberpunk extension The Dark Module. It will eventually have an unified inventory, on which every item will be part of the same tool belt. I would like to know how I can combine weapons with item definitions, making them appear and be possible to select from the item browser. Basically I want to make the Blackjack / Sword / Arrows appear in the same inventory list as the Lamp / Compass / Lockpicks / Readables / etc: Just as you select the Lamp item and hit the "use" key to toggle the light, you could select the Sword item and hit the "use" key to select or holster the sword weapon. Obviously you can still activate weapons using their keybinds... although my mod will replace those with a customizable hotbar, which is what this feature is as a starting step for. Technical note 1: I'm aware that weapons are defined differently from player tools, using builtin idTech 4 entries of the form "def_weapon1 atdm:weapon_blackjack". This would obviously not change! What I believe I'm looking for is an additional definition per weapon, which separately creates an item entry for that weapon as well: When you pick up a weapon on the map, the player gets both the normal weapon entry as well as an inventory entry... this entry separately creates an item for that weapon in the player tools list, which activates its weapon when used. Technical note 2: Item dropping would have to be accounted for. If you select a Lockpick for instance, there is a key to hold the item in front of you then drop it to the ground. When doing this with a weapon, dropping the item should of course also unregister the weapon entry and make it unavailable. Obviously the weapon may not be selected while carrying its inventory entry as an item. What is the simplest and cleanest way to achieve this? Can I make the weapon definition register an item directly, or does that have to be a separate entity? If it's the later, how do I make it so that the weapon entity you receive from the map offers both the weapon definition and inventory item to the player simultaneously?
I am trying to compile the latest SVN engine, on openSUSE Tumbleweed (via gcc 4.8). Compilation goes well until the end, when the process mysteriously fails for an unexplained reason. The only thing that seems to be printed is the name of the file and something called "Error 1". Anyone else running across this, and knows of a solution? Thanks. cm/CollisionModel_load.cpp: At global scope: cm/CollisionModel_load.cpp:42:13: warning: ‘versioned’ defined but not used [-Wunused-variable] static bool versioned = RegisterVersionedFile("$Id: CollisionModel_load.cpp 6551 2015-10-15 18:48:23Z stevel $"); ^ In file included from include/boost/filesystem/path_traits.hpp:23:0, from include/boost/filesystem/path.hpp:25, from include/boost/filesystem.hpp:16, from framework/../idlib/../idlib/Image.h:29, from framework/../idlib/../idlib/Lib.h:230, from framework/../idlib/precompiled.h:106, from framework/precompiled_engine.h:28: include/boost/system/error_code.hpp:221:36: warning: ‘boost::system::posix_category’ defined but not used [-Wunused-variable] static const error_category & posix_category = generic_category(); ^ include/boost/system/error_code.hpp:222:36: warning: ‘boost::system::errno_ecat’ defined but not used [-Wunused-variable] static const error_category & errno_ecat = generic_category(); ^ include/boost/system/error_code.hpp:223:36: warning: ‘boost::system::native_ecat’ defined but not used [-Wunused-variable] static const error_category & native_ecat = system_category(); ^ scons: *** [build/release/core/cm/CollisionModel_load.o] Error 1 scons: building terminated because of errors.
How do I find an entity of a given class in the game's world using SDK code (C++) or/and script ? For example Quake has something like find(e); a built-in that returns entity when it finds it. Does Doom 3 SDK have something similar ?