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
  #1  
Old 07-03-2010, 10:27 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Sprite x/y from GANI script

I have a GANI with a certain sprite in it (index 20). How can I get the position (x/y) of the sprite from inside the GANI script? I can change the alpha by doing 'findImg(20).alpha = 0.5;' but I can't seem to get the x, y, or attachoffset. Help?
__________________
Reply With Quote
  #2  
Old 07-03-2010, 11:31 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Well, I buckled and used a hackish method. Just for anyone wondering:

Graal Script Code:
SCRIPT
function onCreated() {
  
this.makeParticle();
  
this.onTimeOut();
}

function 
makeParticle() {
  
hideImg(200);
  
  
with (findimg(200)) {
    
// ...
  
}
}

function 
onPlayerEnters() {
  
this.onCreated();
}

function 
onTimeOut() {
  
temp.img findImg(200);
  
  
temp.pos_0_0 = {272};
  
temp.pos_0_1 = {10, -3};
  
temp.pos_0_2 = {45};
  
temp.pos_0_3 = {197};
  
temp.pos_1_0 = {27, -3};
  
temp.pos_1_1 = {82};
  
temp.pos_1_2 = {50};
  
temp.pos_1_3 = {253};
  
temp.pos_2_0 = {261};
  
temp.pos_2_1 = {9, -2};
  
temp.pos_2_2 = {44};
  
temp.pos_2_3 = {188};
  
temp.pos_3_0 = {261};
  
temp.pos_3_1 = {72};
  
temp.pos_3_2 = {612};
  
temp.pos_3_3 = {1313};
  
temp.pos_4_0 = {26, -3};
  
temp.pos_4_1 = {7, -2};
  
temp.pos_4_2 = {98};
  
temp.pos_4_3 = {117};
  
temp.pos_5_0 = {22, -6};
  
temp.pos_5_1 = {8, -1};
  
temp.pos_5_2 = {116};
  
temp.pos_5_3 = {95};
  
temp.pos_6_0 = {22, -7};
  
temp.pos_6_1 = {9, -2};
  
temp.pos_6_2 = {98};
  
temp.pos_6_3 = {117};
  
temp.pos_7_0 = {260};
  
temp.pos_7_1 = {82};
  
temp.pos_7_2 = {512};
  
temp.pos_7_3 = {1313};
  
  
temp.temp.(@ "pos_" player.anistep "_" player.dir);
  
img.attachoffset = ((p[0] / 16) - 1.5) @ " " @ ((p[1] / 16) - 1.5) @ " 0";
  
  
this.setTimer(0.05);
}
SCRIPTEND 
__________________
Reply With Quote
  #3  
Old 07-03-2010, 11:33 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
looks awful.
__________________
Quote:
Reply With Quote
  #4  
Old 08-02-2010, 01:38 AM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
Quote:
Originally Posted by fowlplay4 View Post
looks awful.
lol
Reply With Quote
  #5  
Old 08-02-2010, 01:41 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by devilsknite1 View Post
lol
He's right .
__________________
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:49 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.