Knockback - wall check - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Knockback - wall check (/Thread-Knockback-wall-check) |
Knockback - wall check - tleilax - 09-09-2012 11:01 PM Hello, I hope I can get some ideas how to script knockback. Knockback itself isn't such a problem, but checking players not to fall through walls/impassable tiles is something that I currently cannot think of any solution. Is there any hardcoded check for this or can anyone point me in right direction? RE: Knockback - wall check - Shaklaban - 09-09-2012 11:36 PM you can try canmove function: if <canmove n> say i can move to north endif RE: Knockback - wall check - Rayvolution - 09-10-2012 01:23 PM This is my server's "Knockback" enchantment, written by EXTREME. It works pretty well. There's 3 levels, Minor, Moderate and Major. All it really does is raise the chance to knockback. It's designed to be applied to a weapon, so if you just want to apply it to a monster/NPC directly, simplypull the ON=@DAMAGE portion out of the TYPEDEF and stick it on the monster/NPC or it's EVENTS script. Code: [TYPEDEF E_WEAPON_ENCHANT_KNOCKBACK_MINOR] RE: Knockback - wall check - tleilax - 09-11-2012 11:36 PM Thanks, rayvolution. Knockback works. But my character can be knocked through doors, walls and other impassable stuff. Is anything set wrong in my sphere.ini or something? Edit: My bad, for players with plevel 0 it works like a charm. Thanks a lot! RE: Knockback - wall check - Rayvolution - 09-12-2012 07:38 AM hehe, yeah, GMs totally ignore walls/non-passable objects. The only reason GMs even "stop" when they hit a wall is because the client says no, not the server. So, in the case of GMs, they always pass the "Canmove" check no matter what. |