Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-09-2007, 07:19 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Gani script problem

Well, I got a problem. I got a script in a gani, which should change the color of something everytime you change the value (got a player.attr for red, green and blue). This is how the part with the script looks:

PHP Code:
SCRIPT
function onCreated() {
  
onTimeOut();
}
function 
onTimeout() {
  for (
temp.i=200;i<=203;i++) {
    
with (findimg(i)) {
      
red player.attr[20] / 255;
      
green player.attr[21] / 255;
      
blue player.attr[22] / 255;
    }
  }

  
setTimer(.05);
}
SCRIPTEND 
So it changes the colors of 4 sprites in the gani. Well, that does work, though you have to reconnect to see the changes. That didnt happen before, I got an extra gani just for that now, and when that stuff was still in the regular ones, it worked fine. So I tried something out, and found out that the timeout for some pretty weird reason will only run through once, and I have no idea why. So, I need some help here :]
Reply With Quote
  #2  
Old 10-09-2007, 09:15 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
function onPlayerenters()
I believe, instead on onCreated()
Reply With Quote
  #3  
Old 10-09-2007, 10:35 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Yes, use onPlayerenters() like Dusty said.
__________________
Do it with a DON!
Reply With Quote
  #4  
Old 10-10-2007, 02:51 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
I will try that. Seems a little weird though, because it worked with onCreated() before.

Edit: Didnt work, its still not working properly :/

Edit2: The onPlayerEnters did fix it, just had some syntax error, hehe. Thanks alot :]
Reply With Quote
Reply


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 02:11 PM.


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