Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #16  
Old 10-29-2013, 02:49 AM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Quote:
Originally Posted by Starfire2001 View Post
Maybe I'm not getting the right idea here, but why don't you just put the scheduleevent(.05, "showPoly"); (which might work but should have a third param, so scheduleevent(.05, "showPoly", null) in the clientside onCreated(), as you seem to be sending the trigger right after the NPC is placed anyways.
I don't think scheduleevent can have less than 3 params.
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #17  
Old 10-29-2013, 04:59 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Astram View Post
I don't think scheduleevent can have less than 3 params.
That was a V5 issue, trigger no longer requires a second parameter either.

I still do both by habit.
__________________
Quote:
Reply With Quote
  #18  
Old 10-29-2013, 07:15 PM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 353
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
i just tested the following script in a local npc (putnpc2) and it worked fine -

PHP Code:
function onCreated() {
  
this.ani "grab";
  
setshape18080);
}

function 
onInitialize(temp.pobj) {
  
this.owner temp.pobj.account;
  
triggeraction(this..5this..5"Test"null);
}

function 
onPlayerChats() {
  if (
player.chat == "test") {
    
this.onInitialize(player);
  }
}

//#CLIENTSIDE
function onCreated() {
  
this.setshape(18080);
}

function 
onActionTest() {
  
this.scheduleEvent(.05"ShowPoly");
  
this.chat ":D";
}

function 
onShowPoly() {
  
with(findimg(200)) {
    
polygon = {
      
this.5this.5,
      
this.5this.5,
      
this.5this.5,
      
this.5this.5
    
};
    
red green blue 0;
    
alpha .6;
    
layer 3;
  }



so im fairly confident its breaking either because of the timeout or because of whats happening in the timeout

unrelated but also note how 'scheduleEvent' invokes 'onShowPoly' from the parameter 'ShowPoly'

if all else fails then why not try setting a gani attr on serverside, then moving the poly script into the gani attr script?

npc -

PHP Code:
function onCreated() {
  
this.owner null;
  
this.ani "grab";
  
setshape116 516 5);
  
this.attr[5] = "polytest.gani";

polytest.gani -
PHP Code:
SCRIPT

function onPlayerEnters(){
  
with(findimg(200)) {
    
polygon = {
      
this.5this.5,
      
this.5this.5,
      
this.5this.5,
      
this.5this.5
    
};
    
red green blue 0;
    
alpha .6;
    
layer 3;
    
attachtoowner true;
  }
}

SCRIPTEND 
using 'attachtoowner = true;' will make the poly automatically follow the npc object as it moves
__________________
This signature has been deleted by Darlene159.

Last edited by Jakov_the_Jakovasaur; 10-29-2013 at 07:26 PM..
Reply With Quote
  #19  
Old 10-29-2013, 08:06 PM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Thank you Jakov. I'm not too familiar with the uses of ganiscripts but this will for sure help!
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!



Last edited by Astram; 10-29-2013 at 08:20 PM..
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 11:22 AM.


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