Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:36 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.