I am trying to stay away from Serverside functions.
How would I trigger an action in a Weapon on a player in front of me..
For example:
Player swinging sword
PHP Code:
//#CLIENTSIDE
function onKeyPressed(code, key){
if (key == "s"){
setAni("sword", NULL);
//trigger action "onHit" in the weapon "DamageSystem" to the player right in front
}
}
PHP Code:
//Damage system
//#CLIENTSIDE
function onHit(){
//what ever actions I want to take place
}