[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:
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 Punch
Here 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
@bad_renzo You should include _zm_weap_one_inch_punch.gsc with:
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.
@coder-x64 I did lol I said that in the message
@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