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
  #16  
Old 12-01-2011, 06:55 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
It was set to true by default, but changing emitter.stuff doesn't do anything O_o
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #17  
Old 12-01-2011, 06:57 AM
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
Just hide the image if you don't want it to emit.
__________________
Quote:
Reply With Quote
  #18  
Old 12-01-2011, 07:45 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Hiding the image isn't realistic.
I have found out to make an emitter emit it has to be within the findimg, so it now works.
Next up on the agenda is a way of hiding images when you're holding down the right mouse button and above them.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #19  
Old 12-01-2011, 03:09 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
If anyone's interested in the finished script, here it is.
I may add a blue particle effect in the centre for the realism, at a later date.
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
hideimgs(200100000);
  
this.indexn 200;
  
onTimeout();
}

function 
onMouseDown(var) {
  if (var == 
"left") {
    
this.mode "on";
    
Spark();
  }
}

function 
onMouseUp(var) {
  if (var == 
"left") {
    
this.mode "off";
    
emitter.destroy();
    
emitter.removeparticles();
    
emitter.removemodifiers();
  }
}

function 
onTimeout() {
  if (
this.mode == "on") {
    
this.indexn += 1;
    
showimg(this.indexn"g4_particle_sun.png"mousex 2mousey 2);
    
findimg(this.indexn).zoom random(0.20.3);
    
findimg(this.indexn).red 1;
    
findimg(this.indexn).green 1;
    
findimg(this.indexn).blue 1;
    
findimg(1000000).findimg(this.indexn).1.2;
    
findimg(1000000).findimg(this.indexn).0.8;
    
with(findimg(1000000)) {
      
emitter.emit();
    }
  }
  
settimer(0.05);
}

function 
Spark() {
  
with(findimg(1000000)) {
    
spin degtorad(0);
    
rotation degtorad(0);
    
with(emitter) {
      
delaymin 0.01;
      
delaymax 0.01;
      
nrofparticles 3;
      
emitautomatically false;
      
autorotation true;
      
firstinfront true;
      
emissionoffset = {
        
000
      
};
      
attachposition false;
      
checkbelowterrain false;
      
continueafterdestroy false;
      
maxparticles 100000;
      
particleTypes 1;
      
with(particles[0]) {
        
image "g4_animation_fire.gif";
        
zoom 0.25;
        
red 1;
        
green 1;
        
blue 1;
        
alpha 1;
        
mode 1;
        
lifetime 0.6;
        
angle degtorad(32);
        
zangle degtorad(0);
        
speed 30;
        
rotation degtorad(0);
        
spin degtorad(0);
        
partx 0;
        
party 0;
        
partw 0;
        
parth 0;
        
stretchx 1;
        
stretchy 1;
        
sound "none.wav";
        
layer 2;
      }
      
addlocalmodifier("once"00"angle""replace"degtorad(0), degtorad(360)); // Sparks
      
addlocalmodifier("range"0.250.5"alpha""replace"0.990); // SparkFadeOut
    
}
  }

Have fun ARC Welding pixels to other pixels!
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #20  
Old 12-01-2011, 03:55 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 Gunderak View Post
Hiding the image isn't realistic.
If you set continueafterdestroy = true; then you don't have your 'realistic' problem because the emitted particles will continue to live on until they die rather than disappear with the image.
__________________
Quote:
Reply With Quote
  #21  
Old 12-01-2011, 10:01 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
jw-

http://postimage.org/image/u4gbvexi9/

why not steal more stuff from era?
__________________
Reply With Quote
  #22  
Old 12-01-2011, 10:03 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
Quote:
Originally Posted by xandrewx View Post
jw-

http://postimage.org/image/u4gbvexi9/

why not steal more stuff from era?
busted!
__________________
Reply With Quote
  #23  
Old 12-01-2011, 10:11 PM
MysticalDragon MysticalDragon is offline
Global Administration
MysticalDragon's Avatar
Join Date: Oct 2002
Location: Lynn Ma
Posts: 883
MysticalDragon is a jewel in the roughMysticalDragon is a jewel in the rough
Send a message via AIM to MysticalDragon Send a message via MSN to MysticalDragon
Quote:
Originally Posted by xAndrewx View Post
jw-

http://postimage.org/image/u4gbvexi9/

why not steal more stuff from era?
I logged on this server the other day as I seen a lot of era dev staff on it, I guess I'll have to remove those staff o.o
__________________
~Delteria Support
~Playerworld Support
~PWA Chief
http://support.toonslab.com
[email protected]



Reply With Quote
  #24  
Old 12-01-2011, 10:12 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
Quote:
Originally Posted by xAndrewx View Post
jw-

http://postimage.org/image/u4gbvexi9/

why not steal more stuff from era?
That street layout makes no damn sense.
Reply With Quote
  #25  
Old 12-01-2011, 10:26 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
Quote:
Originally Posted by xAndrewx View Post
why not steal more stuff from era?
It's not like ideas can be stolen..
Reply With Quote
  #26  
Old 12-01-2011, 10:32 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
Quote:
Originally Posted by DustyPorViva View Post
That street layout makes no damn sense.
We are looking at Ghetto though.
__________________
Reply With Quote
  #27  
Old 12-02-2011, 12:15 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
That car wasn't stolen, I scripted it from scratch.
The image was made from photoshop.
I was simply stating the functionality of it is very simmilar.
And what do you mean by why not steal more stuff from Era?
Are you implying that this welding idea was suposibly stolen from Era aswell?
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #28  
Old 12-02-2011, 05:58 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 xAndrewx View Post
jw-

http://postimage.org/image/u4gbvexi9/

why not steal more stuff from era?
@Gunderak:
Is that my staff panel in the top-right corner or just one mimicking it? I've seen that used on like 20 different UC servers (without exaggerating). I don't even recall it being that great (but if it is mine, feel free to keep using it).
__________________
Reply With Quote
  #29  
Old 12-02-2011, 06:12 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
@cbk1994
I'm really not sure, Death put the script on Ghetto.

Hoo-ray for twitter quotes!
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
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:55 PM.


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