[Resource] GSC give yourself the one_inch_punch correctly
-
Hi, I found a common mistake that some people do when they create mods that give someone the iron fist but it doesn't do any damage because they don't call monitor_melee_swipe() function in maps/mp/zombies/_zm_weap_one_inch_punch this function determine the damage for the iron fist.
To fix this problem just call monitor_melee_swipe() in a thread.NOTE: You should Include _zm_weap_one_inch_punch.gsc with:
#include maps/mp/zombies/_zm_weap_one_inch_punch;for monitor_melee_swipe() function.
The list of the one_inch_punch that you can use:
one_inch_punch_zm: Regular Punch
one_inch_punch_upgraded_zm: Upgraded Punch
one_inch_punch_air_zm: Upgraded Air Punch
one_inch_punch_fire_zm: Upgraded Fire Punch
one_inch_punch_ice_zm: Upgraded Ice Punch
one_inch_punch_lightning_zm: Upgraded Lightning PunchHere an example to give yourself the upgraded iron fist:
// The animation part its optional current_melee_weapon = self get_player_melee_weapon(); self takeweapon( current_melee_weapon ); str_weapon = self getcurrentweapon(); self disable_player_move_states( 1 ); self giveweapon("zombie_one_inch_punch_upgrade_flourish" ); self switchtoweapon("zombie_one_inch_punch_upgrade_flourish" ); self waittill_any( "player_downed","weapon_change_complete" ); self switchtoweapon( str_weapon ); self enable_player_move_states(); self takeweapon("zombie_one_inch_punch_upgrade_flourish" ); // The end of the animation part self giveweapon( "one_inch_punch_upgraded_zm" ); self set_player_melee_weapon("one_inch_punch_upgraded_zm" ); self thread monitor_melee_swipe(); -
hmmm very cool but even with the included file I get a error with monitor_melee_swipe

-
hmmm very cool but even with the included file I get a error with monitor_melee_swipe

@bad_renzo You should include _zm_weap_one_inch_punch.gsc with:
#include maps/mp/zombies/_zm_weap_one_inch_punch; -
hmmmmm noice, thanks alot!
i was trying to do exactly that, solve the problem in origins were we cant finish the easter egg with more than 4 player because the game is coded to recognize 4-AND-Total number of players.
pretty sure i would let this slip when implementing it, as im a complete noob at it.
-
@bad_renzo You should include _zm_weap_one_inch_punch.gsc with:
#include maps/mp/zombies/_zm_weap_one_inch_punch;coder x64 I did lol I said that in the message
-
Hi, I found a common mistake that some people do when they create mods that give someone the iron fist but it doesn't do any damage because they don't call monitor_melee_swipe() function in maps/mp/zombies/_zm_weap_one_inch_punch this function determine the damage for the iron fist.
To fix this problem just call monitor_melee_swipe() in a thread.NOTE: You should Include _zm_weap_one_inch_punch.gsc with:
#include maps/mp/zombies/_zm_weap_one_inch_punch;for monitor_melee_swipe() function.
The list of the one_inch_punch that you can use:
one_inch_punch_zm: Regular Punch
one_inch_punch_upgraded_zm: Upgraded Punch
one_inch_punch_air_zm: Upgraded Air Punch
one_inch_punch_fire_zm: Upgraded Fire Punch
one_inch_punch_ice_zm: Upgraded Ice Punch
one_inch_punch_lightning_zm: Upgraded Lightning PunchHere an example to give yourself the upgraded iron fist:
// The animation part its optional current_melee_weapon = self get_player_melee_weapon(); self takeweapon( current_melee_weapon ); str_weapon = self getcurrentweapon(); self disable_player_move_states( 1 ); self giveweapon("zombie_one_inch_punch_upgrade_flourish" ); self switchtoweapon("zombie_one_inch_punch_upgrade_flourish" ); self waittill_any( "player_downed","weapon_change_complete" ); self switchtoweapon( str_weapon ); self enable_player_move_states(); self takeweapon("zombie_one_inch_punch_upgrade_flourish" ); // The end of the animation part self giveweapon( "one_inch_punch_upgraded_zm" ); self set_player_melee_weapon("one_inch_punch_upgraded_zm" ); self thread monitor_melee_swipe();coder x64 could you provide a download for this script?
-
Vilowww this script is a part to fix another thing, theres no "easy download and run" on this
-
undefined Coronavirus-19 referenced this topic on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login