View Single Post
  #1  
Old 04-05-2009, 08:01 AM
Schetti Schetti is offline
SC2 Player
Schetti's Avatar
Join Date: Nov 2008
Location: Austria
Posts: 269
Schetti is on a distinguished road
Another triggeraction

Yea, a question about trigger again ...

That is the weapon, its used to add/remove the flag(Ctf-flag) to the player
PHP Code:
//Weapon
function onActionserverside() {
  switch (
params[0]) {
    case 
"remove":
player.removeWeapon("-System/Ctfblue");
sleep 1;
    }
  }

//#CLIENTSIDE
function onPlayerChats() {
if (
player.chat == "Drop Flag") {
replaceani walk,walk;
replaceani idle,idle;
setani("idle",null);
triggerserver("gui"this.name"remove");
 }

The weapon works pretty well, but I also got a class, wich is totally NOT working.

This is the class, and here the trigger doesnt work, someone can tell me why and/or give me an example to make it working?
I am totally
PHP Code:
//Class
function onCreated() {
  
this.setshape(1,32,32);
  
this.blueowner 2;
  
this.dir 1;
  
this.setcharani("sch_ctfblueidle",null);
  
this.blockagain();
}

function 
onActionReturn() {
  if (
client.blueowner == "1") {
  
this.blueowner 2;
  
this.dir 1;
  
client.blueowner 2;
      
this.show();
 }
}

//#CLIENTSIDE
function onPlayerChats() {
if (
player.chat == "Drop Flag")
triggeraction(this.xthis.y"Return"null);

 }

Note: I wont look on forums until Thursday, so dont wonder if I dont answer, but I would be happy to see some suggestions if I come back
__________________
“Peace cannot be kept by force. It can only be achieved by understanding.” – Albert Einstein
Reply With Quote