|
Title: Nightcrawler Post by: gghh3322 on September 07, 2010, 12:24:12 AM 6sec Noclip
but.. it's so fast maybe need balance.. (4sec) if stuck in wall teleport before use power position Need Feedback Edit. Fixed Countdown error(print only 0sec) Title: Re: Nightcrawler Post by: Scyther on September 07, 2010, 04:49:07 AM God your making races so fast :L keep it up man :D
Title: Re: Nightcrawler Post by: gghh3322 on September 07, 2010, 07:49:43 AM how to more rightly chk stuck .. Help please
Code: public OnPowerCommand(client,herotarget,bool:pressed){ //PrintToChatAll("%d",herotarget); if(SHHasHero(client,herotarget)&&herotarget==thisRaceID){ //PrintToChatAll("1"); if(pressed && War3_SkillNotInCooldown(client,thisRaceID,SKILL_NOCLIP,true) && !bNoclip[client]){ GetClientAbsOrigin(client,oldpos[client]); bNoclip[client]=true; sectemp[client]=skill_sec; War3_SetBuff(client,bNoClipMode,thisRaceID,true); CreateTimer(0.0,TurnNoClip,client); W3FlashScreen(client,{0,0,0,220},0.5,_,FFADE_STAYOUT); War3_CooldownMGR(client,25.0,thisRaceID,SKILL_NOCLIP,_,_,_,"Noclip"); } } } public Action:TurnNoClip(Handle:h,any:client){ if(sectemp[client]<1.0) { War3_SetBuff(client,bNoClipMode,thisRaceID,false); GetClientAbsOrigin(client,newpos[client]); newpos[client][2]+=1.0; TeleportEntity(client,newpos[client],NULL_VECTOR,NULL_VECTOR); GetClientAbsOrigin(client,newpos[client]); bNoclip[client]=false; W3FlashScreen(client,{0,0,0,0},0.1,_,(FFADE_IN|FFADE_PURGE)); CreateTimer(0.2,ChkStuck,client); } else{ PrintCenterText(client, "Warning: Time limit : %.0f sec",sectemp[client]); sectemp[client]-=1.0; CreateTimer(1.0,TurnNoClip,client); } } public Action:ChkStuck(Handle:h,any:client){ new Float:location[3]; GetClientAbsOrigin(client,location); if(GetVectorDistance(newpos[client],location)<0.001) { PrintHintText(client, "You stucked, Teleport Old position"); TeleportEntity(client,oldpos[client],NULL_VECTOR,NULL_VECTOR); } } Title: Re: Nightcrawler Post by: MrBrightSide on January 15, 2012, 12:22:36 AM i no this is extremly old but can you add a cooldown?
|