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 05-07-2011, 02:39 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Lantern

Quick question. How would i make a light2.png follow me?
__________________
Reply With Quote
  #2  
Old 05-07-2011, 06:02 PM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,743
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
Back in my day we would make a gani and then use replaceani when the weapon was fired, not sure if that is the case now.
__________________
Save Classic!
Reply With Quote
  #3  
Old 05-07-2011, 06:30 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
Elaborate on what you want to do. Sounds to me like you want to put a GANI in a player attribute.
__________________
Reply With Quote
  #4  
Old 05-07-2011, 07:09 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
I want to have a light effect follow me like a glow around a player.
__________________
Reply With Quote
  #5  
Old 05-10-2011, 06:49 PM
Twaina Twaina is offline
Registered User
Join Date: Dec 2010
Posts: 59
Twaina has a little shameless behaviour in the past
player-x player-y
Reply With Quote
  #6  
Old 05-10-2011, 07:52 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Care to extend on that at all?
__________________
Reply With Quote
  #7  
Old 05-10-2011, 08:20 PM
Twaina Twaina is offline
Registered User
Join Date: Dec 2010
Posts: 59
Twaina has a little shameless behaviour in the past
use gani or settime then try so thats changing the x or y position
Reply With Quote
  #8  
Old 05-10-2011, 08:34 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Um k...
__________________
Reply With Quote
  #9  
Old 05-10-2011, 11:48 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
The best method is using a player.attr[n] and a gani script with findimg and the attachtoowner variable set.

yourlightaura.gani

PHP Code:
SCRIPT
function onCreated() {
  
with (findimg(200)) {
    
player.x;
    
player.y;
    
layer 1;
    
attachtoowner true;  // Attaches the light to the player.
    
image "light2.png";
    
red 0;
    
blue 0;
    
green 1;
    
alpha 0.99;
  }
}
SCRIPTEND 
then in a weapon you can set the gani to player's attr:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
player.attr[2] = "yourlightaura.gani";

Also valid is using light2.png as a sprite in your lantern gani, and setting it's COLOREFFECT.
__________________
Quote:
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 03:14 PM.


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