Wystan Posted March 18, 2015 Share Posted March 18, 2015 How to make npc shoot faster? Link to comment
Asgarath83 Posted March 18, 2015 Share Posted March 18, 2015 icarus spawnscript.there is a SET_SHOOT_DISTANCE or something like that as script parm, you can set amount of milisec between two shoots. Link to comment
Daedra Posted March 18, 2015 Share Posted March 18, 2015 How to make npc shoot faster? Or just edit weapons.dat Link to comment
Wystan Posted March 18, 2015 Author Share Posted March 18, 2015 Or just edit weapons.datYou're kidding don't you? Npcs shoot with their own firerate, not from weapons.dat. My briar is an uzi and has huge firerete but they shoot slow. Link to comment
Daedra Posted March 18, 2015 Share Posted March 18, 2015 You're kidding don't you? Npcs shoot with their own firerate, not from weapons.dat. My briar is an uzi and has huge firerete but they shoot slow. Yes i'm joking. Link to comment
Ramikad Posted March 18, 2015 Share Posted March 18, 2015 There's even a more convenient SET_WAIT that sets the firing intervals. It resets when switching weapons. Link to comment
Wystan Posted March 18, 2015 Author Share Posted March 18, 2015 And no way npc editing? Link to comment
Solution Langerd Posted March 18, 2015 Solution Share Posted March 18, 2015 The class of the npc is important too. Class jan and lando shots faster than stormtrooper i think (but it give the undisarmable bonus). The other shooting classes change their fire speed that depends on the game difficulty settings. In npc file ... no. You can only set fire distance . If you want npc that shoots faster or it using alt fire - use script. Asgarath83 likes this Link to comment
Wystan Posted March 18, 2015 Author Share Posted March 18, 2015 That's pretty clear now. Link to comment
Asgarath83 Posted March 18, 2015 Share Posted March 18, 2015 Yes i'm joking. Weapons.dat edit only the player shooting parameters :\ for NPC you need to edit the code, on weapons.h Link to comment
IrocJeff Posted March 18, 2015 Share Posted March 18, 2015 You have to do it through the command Set_Shot_Spacing in BehavED and play around w/ the timing. Link to comment
Ramikad Posted March 18, 2015 Share Posted March 18, 2015 You have to do it through the command Set_Shot_Spacing in BehavED and play around w/ the timing. Yeah, I meant that, not sure why I came up with SET_WAIT Link to comment
Jango40 Posted March 18, 2015 Share Posted March 18, 2015 Isn't it possible to just create a new class? Link to comment
Asgarath83 Posted March 18, 2015 Share Posted March 18, 2015 You have to do it through the command Set_Shot_Spacing in BehavED and play around w/ the timing. Yes this is the more easy way Link to comment
Langerd Posted March 18, 2015 Share Posted March 18, 2015 Isn't it possible to just create a new class?Pretty sure it is hard coded D: . It is part of the game but it also a function of npc itself. Link to comment
IrocJeff Posted March 18, 2015 Share Posted March 18, 2015 Isn't it possible to just create a new class? //Generated by BehavEd set ( /*@SET_TYPES*/ "SET_WEAPON", /*@[member='weaponx']_NAMES*/ "WP_BLASTER" ); set ( /*@SET_TYPES*/ "SET_ALT_FIRE", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_SHOT_SPACING", 1500 ); Here is a simple script you can use for any NPC. You can select their weapon, if you want them to use alt fire or not (set to true or false) and the shot spacing. That is as complicated as this is. You just muck about with the variables, like shot spacing. You can also set Aim, Aggression, vis range, hearing range, and more by adding them to the script. Then, give the NPC a spawnscript and a value (your script name) Key: SpawnscriptValue: Script folder name/fire_rate_1500 ( name of folder script is in & script name) That's it. Its much easier to script stuff plus you get the added benefit of being able to do much more with that specific NPC. If you want, for example, your stormtrooper to shoot faster but crouch, you'll have to script the crouching anyhow. Asgarath83 likes this Link to comment
Wystan Posted March 18, 2015 Author Share Posted March 18, 2015 Ok i'll do it this way. Link to comment
Langerd Posted March 19, 2015 Share Posted March 19, 2015 @@IrocJeff - do you have list of options that we can put in the script for npc ? Link to comment
IrocJeff Posted March 19, 2015 Share Posted March 19, 2015 @@IrocJeff - do you have list of options that we can put in the script for npc ? Not really, no. I went through Behaved a bazillion times and read all the commands for {E "set_types", <str>} which is what you'll choose for most of this. There are some decent descriptions there but you have to really go through all of them and see what is relevant to the NPC directly. Below is one of many similar scripts from my project. Do put the Default Behavior state in which i forgot to mention in the above posting example a few replies back. This script is an ambush script were a stormtrooper would run around a corner to intercept the player. I had a ton of these scripts in my project with different aim, aggression, ect. I also never used the waypoint system cause I never got it to work properly which is why I have the nav_goals set up. In the map, I'd just put combat_points all over the place. Worked out well. //Generated by BehavEd set ( /*@SET_TYPES*/ "SET_BEHAVIOR_STATE", /*@BSTATE_STRINGS*/ "BS_DEFAULT" ); set ( /*@SET_TYPES*/ "SET_RUNNING", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_AIM", 5 ); set ( /*@SET_TYPES*/ "SET_AGGRESSION", 5 ); set ( /*@SET_TYPES*/ "SET_ALT_FIRE", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_LOOK_FOR_ENEMIES", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_CHASE_ENEMIES", /*@BOOL_TYPES*/ "true" ); task ( "go1" ) { set ( /*@SET_TYPES*/ "SET_NAVGOAL", "pointa" ); } task ( "go2" ) { set ( /*@SET_TYPES*/ "SET_NAVGOAL", "pointb" ); } dowait ( "go1" ); dowait ( "go2" ); Here is one of a stationary stormtrooper crouched next to a crate or doorway or wherever. This one has the "set_no_combat_talk" set to false so this guy won't say " Hey, a Rebel" or "I should get a commendation for this" when he kills you. Also, he can see you at 2048 grid units away. Setting him not to flee means he'll stay put. //Generated by BehavEd set ( /*@SET_TYPES*/ "SET_BEHAVIOR_STATE", /*@BSTATE_STRINGS*/ "BS_DEFAULT" ); set ( /*@SET_TYPES*/ "SET_NO_COMBAT_TALK", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_VISRANGE", 2048.000 ); set ( /*@SET_TYPES*/ "SET_ALT_FIRE", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_CHASE_ENEMIES", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_CROUCHED", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_DONT_FLEE", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_AIM", 5 ); set ( /*@SET_TYPES*/ "SET_AGGRESSION", 5 ); Langerd likes this Link to comment
Spirit Posted March 26, 2015 Share Posted March 26, 2015 The rank key also influences the rate of fire, but sometimes yields... strange results... for example, alt firing and akimbo wielded blaster pistols. Also try the npc class, as it's been mentioned earlier, classes jan and lando shoot faster than stormtroopers. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now