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 06-18-2007, 09:05 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Particle Attempt :D

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
with (findimg(200)) {
    
layer 1;
    
player.x;
    
player.y;
    
    
emitter.delaymin 1;
    
emitter.delaymax 1;
    
emitter.nrofparticles 1;
    
emitter.maxparticles 1;
    
emitter.autorotation true;
    
emitter.emitautomatically true;
    
    
emitter.particle.lifetime 10;
    
emitter.particle.image "block.png";
    
emitter.particle.spin 10;
    
emitter.particle.speed 0;
    
    
emitter.emit();
  }

I've been trying to learn something about particles, but I can't even get it to spin! :P Even with the spin variable. What could I be doing wrong? :o
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #2  
Old 06-18-2007, 11:07 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
PHP Code:
//#CLIENTSIDE
function onCreated() 
{

  
with (findimg(200)) 
  {
    
layer 3;
    
player.x;
    
player.y;

    
with (emitter
    {
      
delaymin 1;
      
delaymax 1;
      
nrofparticles 1;
      
maxparticles 1;

      
with (particle
      {
        
lifetime 10;
        
image "block.png";
        
spin 3;
        
speed 1;
      }

      
emit();
    }

  }

ya need speed i think
Reply With Quote
  #3  
Old 06-18-2007, 11:22 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Meh, I tried speed. Didn't work. I copy and pasted what you wrote. And then it works. XD

Well, thanks for the assistance.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #4  
Old 06-18-2007, 11:24 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Oh, and Stan

emitautomatically is true by default I think, so you don't need emit()

When using emit() you should have emitautomatically set to false :O
__________________
Reply With Quote
  #5  
Old 06-19-2007, 12:10 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
what dose this do?:
with (findimg(200)) {

and why 200?
__________________
**FLIP OUT**
Reply With Quote
  #6  
Old 06-19-2007, 12:14 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
with() puts the current scope of the script inside the object in the parameters. When using findimg inside with, it first looks for an already created image with the index of 200. Then if there is not one, it creates one.

If you want the image to show to client only, give it an index of 200 or above. However if you want the image to be visible to everyone, give it an index lower than 200.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #7  
Old 06-19-2007, 03:18 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
I wonder why that number is 200 and not 255? :o
__________________
Reply With Quote
  #8  
Old 06-19-2007, 04:24 AM
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
I think that only applies if you're trying to fit info into one byte, like a max to money or such.
Reply With Quote
  #9  
Old 06-19-2007, 04:40 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Yea I know, but it is computer scripting so it seems more fitting to use 255 :P
__________________
Reply With Quote
  #10  
Old 06-20-2007, 09:21 PM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
Quote:
Originally Posted by killerogue View Post
with() puts the current scope of the script inside the object in the parameters. When using findimg inside with, it first looks for an already created image with the index of 200. Then if there is not one, it creates one.

If you want the image to show to client only, give it an index of 200 or above. However if you want the image to be visible to everyone, give it an index lower than 200.
why not just use 1 or 2?

is there like a gradiance or something?
__________________
**FLIP OUT**
Reply With Quote
  #11  
Old 06-20-2007, 09:30 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by theHAWKER View Post
why not just use 1 or 2?

is there like a gradiance or something?
For some reason you quoted the answer of your question..

Quote:
Originally Posted by killerogue View Post
If you want the image to show to client only, give it an index of 200 or above. However if you want the image to be visible to everyone, give it an index lower than 200.
__________________
Reply With Quote
  #12  
Old 06-21-2007, 12:44 AM
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
Quote:
Originally Posted by theHAWKER View Post
why not just use 1 or 2?

is there like a gradiance or something?
An index is only an assignment much like you give something a variable assignment. Any showimg from 1 to 199 is exactly the same in all of it's properties same as any showimg 200 and up is exactly the same in it's properties. Of course this doesn't mean they aren't individual showimgs...
__________________
Do it with a DON!
Reply With Quote
  #13  
Old 06-21-2007, 11:15 PM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
Quote:
Originally Posted by zokemon View Post
An index is only an assignment much like you give something a variable assignment. Any showimg from 1 to 199 is exactly the same in all of it's properties same as any showimg 200 and up is exactly the same in it's properties. Of course this doesn't mean they aren't individual showimgs...
so can you have findimg(13612895676293894687249) ??
__________________
**FLIP OUT**
Reply With Quote
  #14  
Old 06-21-2007, 11:26 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by theHAWKER View Post
so can you have findimg(13612895676293894687249) ??
bytes++
__________________
Reply With Quote
  #15  
Old 06-21-2007, 11:27 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
pointlessness++
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
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 07:50 PM.


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