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 07-09-2013, 05:05 PM
defaultaccount defaultaccount is offline
Cassini
Join Date: Feb 2006
Location: HeLLifAX
Posts: 299
defaultaccount is on a distinguished road
Particle Effects direction in gani

I'm trying to make a particle effect move or attach itself to the image, and to place them in the right directions when the directions change for a shell on the ground for it to be in the right place. The particle doesn't follow the shell like it should, and it doesn't change for the different directions I'm shooting. The shell gani has all the directions on it, but when it emits the particle it doesn't show up in the right place, it's in the same place even for the different directions, even when I made the offset right, it was only right for one direction, is there a way for me to add them like lights and choose where they are placed?

this is the script
PHP Code:
SCRIPT
function onCreated() {
  
with (findimg(200)) {
    
with (emitter) {
      
player.x;
      
player.y;
      
delaymin 0.05;
      
delaymax 0.05;
      
nrofparticles 1;
      
firstinfront false;
      
attachtoowner=true;
      
maxparticals 10;
      
emissionoffset = {1,1.5,0};
      
with (particle) {
        
layer 1;
        
lifetime 0.1;
        
image "g4_particle_yellowlight.png";
        
zoom 0.1;
        
mode 2;
        
red 1;
        
green 0.0;
        
blue 0.5;
        
alpha 0.99;
        
angle pi 2;
        
speed 6;
    }
      
addlocalmodifier"range"01"alpha""add",    - .9,      - .9);
    }
  }
}
SCRIPTEND 
all I'm trying to do is to get that to attach to my shell image in the gani. Can I place particle effects manually? the emitters only show in one direction.

Last edited by defaultaccount; 07-09-2013 at 05:27 PM..
Reply With Quote
  #2  
Old 07-17-2013, 07:45 PM
defaultaccount defaultaccount is offline
Cassini
Join Date: Feb 2006
Location: HeLLifAX
Posts: 299
defaultaccount is on a distinguished road
Anyone know how to add emitters manually or how to make them change directions in the gani cause they only show one direction for me, i'm trying to make a bullet shell have particles it works but doesnt change direction for the different sides of the gani. So when i shoot left its in the same spot if i shoot right, i need it to have temp.1-1 (offset) temp1".1-2 (offset) i saw it done on era for the sparklers i made, im also working on a inventory gui so to save another help topic ill post it here. I dont know how to add text for one two make the equpped weapon show up on inventory as equipped and third make the weapons i have show up on the inventory, ill post the inventory script, but im new at scripts so i really need some help to make the gui work, ill update my post with the inventory script and pictures of what its suposto look like, like i said im new at scripting and need help

here is the inventory script (I haven't added much to it yet):
PHP Code:
 //#CLIENTSIDE
function onCreated() { 
enablefeatures(allfeatures-4); 
  if (
isObject("Inventory_Screen")) { 
    
Inventory_Screen.destroy();
    
Inventory_Screen1.destroy();
    
Inventory_Screen4.destroy();
    
Inventory_Screen5.destroy();
  } 
new 
GuiBitmapCtrl("Inventory_Screen") {
   
250;
   
280;
   
width 892;
   
height 352;
   
bitmap "inventory-screen.png";

    
hide;   
    }
new 
GuiBitmapCtrl("Inventory_Screen1") {
  
265;
  
105;
  
width 147;
  
height 139;
  
bitmap "inventory-screen1.png";
  }
    new 
GuiBitmapCtrl("Inventory_Screen4") {
    
245;
    
101;
    
width 396;
    
height 185;
    
bitmap "inventory-screen4.png";
    }
  new 
GuiBitmapCtrl("Inventory_Screen5") {
  
470;
  
107;
  
width 147;
  
height 139;
  
bitmap "inventory-screen5.png";
  }
  }

function 
onKeyPressed(codekey) { 
  if (
key == "q") { 
    
this.on = !this.on

    if (
this.on) { 
      
Inventory_Screen.visible true;
      
Inventory_Screen1.visible true;
      
Inventory_Screen4.visible true;
      
Inventory_Screen5.visible true;
    } else { 
      
Inventory_Screen.visible false
      
Inventory_Screen1.visible false;
      
Inventory_Screen4.visible false;
      
Inventory_Screen5.visible false;
    } 

  } 

id also like a easier way to delete the screens and add them again, I didn't know how to put them all into one function to control all the different windows. Also I found this script on the forums, but I need a easier way to delete and open the inventory

heres what its suposto look like:
http://i42.tinypic.com/2l8ezv4.jpg

I don't know how to add the weapons into the screen, and make the equipped one show up above near the character screen I'm using a few inventory scripts I found but I can't make sense of the code. It looks like this

PHP Code:
  iWeps.clear();
for ( 
temp.player.weapons )
  {
    
temp.temp.a.name;
    if ( ! 
temp.n.starts"-" ) )
    {
      
iWeps.addtemp.);
    }
  } 
and I can't make sense of the code to reuse it on mine. Inventory gui's are to advanced for me to make with my level of skill.

This is the inventory I'm using to make mine, it's a full inventory script if anyone needs it. I didn't make this, and I can't really use it to help me because the scripts are too advanced like I said
Attached Files
File Type: txt -SystemInventory.txt (9.6 KB, 165 views)

Last edited by defaultaccount; 07-17-2013 at 08:01 PM..
Reply With Quote
  #3  
Old 07-18-2013, 01:09 PM
Cubes Cubes is offline
Registered User
Cubes's Avatar
Join Date: Dec 2005
Location: Chesapeake, Virginia
Posts: 498
Cubes is a jewel in the roughCubes is a jewel in the rough
Check the players direction when its fired and pass it to the gani
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 01:36 AM.


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