![]() |
push back
okay how do i make it if you are hit by a projectile it pushes you back
because i tried making one and when i fired it when it hit the person put them in the corner of the map so i really need some help |
Quote:
|
Try a function like when hit, depending on the direction where the character is hit, it moves the player from +/- X/Y by #,# ?
|
hitplayer(this.id,0,hitfromx,hitfromy);
If you're using the default system, that should work. It will hit the player away from the given 'hitfromx/y'. this.id should find your own player, but I'm not entirely sure. So... probably something like this... Projectile: PHP Code:
So onto the weapon itself(you should have one global weapon or such that all players get to handle projectile hits).: PHP Code:
|
| All times are GMT +2. The time now is 08:15 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.