View Single Post
  #1  
Old 05-16-2014, 04:45 PM
i8bit i8bit is offline
Registered User
Join Date: Jul 2013
Posts: 146
i8bit is an unknown quantity at this point
Triggering action in other player

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(codekey){
 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

Reply With Quote