RobiWanKen0bi Posted August 14, 2023 Posted August 14, 2023 Hey everyone! I've been thinking on how to add Kyle's signature kung fu moves to player at some stage of the map via code. Now I know I can use the cheat "Iknowkungfu", but I want it to be done differently: scripted at level start in a code. The "WP_MELEE" simply doesn't work that way. It only adds punches, but no kick. Is there another way then? affect ( "player", FLUSH ) { set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_MELEE" ); } Also another request: I know the Kyle Boss with his lightsaber is hard coded, but if I spawn him through code he never uses his moves. But if I spawn him through cheat "Npc spawn Kyle_boss" then he uses his moves frequently (pulls away player's saber, kungfu kicks and punches around...) bigphil2695 likes this
Solution Linken Posted August 21, 2023 Solution Posted August 21, 2023 So the "code-less" workaround would actually be to utilize the cvar g_debugmelee 1, you can have it set in your menu on startup so it's impossible to miss. Also if you want another npc to use Kyle's melee attacks, make sure their npc class is CLASS_KYLE and they have the "1" spawnflag activated in their npc spawner. RobiWanKen0bi and bigphil2695 like this
RobiWanKen0bi Posted August 25, 2023 Author Posted August 25, 2023 Yes he has the class_kyle, but I missed the spawnflag, that must be it. Thank you! I'll wait for awhile if someone has a solution via code for the player, but if nothing else works, then I'll try it your way, Linken.
Linken Posted August 25, 2023 Posted August 25, 2023 If you want the player to have the melee attacks by default, then do the cvar g_debugmelee 1. RobiWanKen0bi likes this
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