Snowing script

1st question:
i need a script that will make it snow like in the iphone version of graal online classic

2nd question:
what is this script and why cant i use it on offline editor?

[CODE] function onPlayerEnters() {
this.sparklemode = player.attr[24];
hideimg(201);
with (findimg(201)) {
layer = 1;
attachtoowner = true;

with (emitter) {
  delaymin = 0.2;
  delaymax = 0.3;
  nrofparticles = 3;
  maxparticles = 130;
  firstinfront = true;
  emissionoffset = {0, -1.2, 0};
  cliptoscreen = true;
  continueafterdestroy = 1;
  with (particle) {
    lifetime = 4;
    image = "g4_particle_x.png";
    speed = 2;
    mode = (thiso.sparklemode == 6? 1 : 0);
    red = 1;
    green = 1;
    angle=pi/2;
    blue = 1;
    alpha = 0.5;
    zoom = 0.25;
    spin = 1;
  }
  
  removemodifiers();
  if (thiso.sparklemode == 2) {
    addlocalmodifier("once", 0, 0, "red", "replace", 1, 1);
    addlocalmodifier("once", 0, 0, "green", "replace", 0, 0);
    addlocalmodifier("once", 0, 0, "blue", "replace", 0, 0);
  }
  else if (thiso.sparklemode == 3) {
    addlocalmodifier("once", 0, 0, "red", "replace", 0, 0);
    addlocalmodifier("once", 0, 0, "green", "replace", 1, 1);
    addlocalmodifier("once", 0, 0, "blue", "replace", 0, 0);
  }
  else if (thiso.sparklemode == 4) {
    addlocalmodifier("once", 0, 0, "red", "replace", 0.3, 0.3);
    addlocalmodifier("once", 0, 0, "green", "replace", 0.6, 0.6);
    addlocalmodifier("once", 0, 0, "blue", "replace", 1, 1);
  }
  else if (thiso.sparklemode == 5) {
    addlocalmodifier("once", 0, 0, "red", "replace", 0, 1);
    addlocalmodifier("once", 0, 0, "green", "replace", 0, 1);
    addlocalmodifier("once", 0, 0, "blue", "replace", 0, 1);
  }
  else if (thiso.sparklemode == 6) {
    addlocalmodifier("once", 0, 0, "red", "replace", 0, 0);
    addlocalmodifier("once", 0, 0, "green", "replace", 0, 0);
    addlocalmodifier("once", 0, 0, "blue", "replace", 0, 0);
  }
  else if (thiso.sparklemode == 7) {
    addlocalmodifier("once", 0, 0, "red", "replace", 192, 192);
    addlocalmodifier("once", 0, 0, "green", "replace", 192, 192);
    addlocalmodifier("once", 0, 0, "blue", "replace", 192, 192);
  }
  addlocalmodifier("once", 0, 0, "x", "add", -3.5, 2.5);
  addlocalmodifier("once", 0, 0, "y", "add", -2.5, -2.5);
  addlocalmodifier("once", 0, 0, "angle", "replace", 4.014257279, 5.410520681);
  addLocalmodifier("range", 0,4, "alpha", "replace", 1,0);
  addlocalmodifier("once",3,3,"speed","replace","0","0");
}

}
setTimer(3);
}

function onTimeout() {
onPlayerEnters();
}
[/CODE]

That script you have there is specifically for the graalonline particle engine which we don’t have hence the reason why it will not work.

This isn’t the iPhone version of Graal.

Bet this is baynes new account

Nope.

and what about the snowing?

http://forums.graal.in/forums/search.php There’s a rain script somewhere on the forums. If you play around with it a bit, I’m sure you could change the image and make it slow down.

[CODE]if (playerenters) {
timeout = 0.05;
seteffect 0,0,0,0;
timereverywhere;
setarray this.px,100;
setarray this.py,100;
setarray this.pl,100;
setarray this.pang,100;
}

if (timeout) {
timeout = 0.05;
this.wait++;
if (this.wait > 100) {
this.wait = 101;
}
for (i=0;i<50;i++) {
if (i > this.wait) return;
if (this.pl[i] <= 0) {
spawnDrop();
}
moveDrop();
renderDrop();
}
}

function spawnDrop() {
this.pl[i] = 5;
this.px[i] = random(0,64);
this.py[i] = random(0,64);
this.pang[i] = random(pi/4,pi/2);
}

function moveDrop() {
this.px[i] += 0;
this.py[i] += sin(this.pang[i])-.5;
this.pl[i] -= 0.1;
}

function renderDrop() {
showimg 300+i,snowflake.gif,this.px[i],this.py[i];
}[/CODE]

Well, I decided to do it myself, but I wouldn’t get used to having people actually do stuff for you.

thanks and hey i have a question if you answered it it would make me so happy okay, so how do i make the now flakes rotate and fall down at the same time? is that possible

it is if you make each pixel of each snowflake a seperate image

You could make a rotating gif. Rotation isn’t available to us as an in-game element currently.

[ATTACH=CONFIG]2596[/ATTACH] <- there is a image of snow here right click and save.

can u please please help me make it rotate please its not working its all blury

can u do it please the picture is in my preivous post

And what have you done so far? All you’re doing is asking for help over and over, and not doing anything yourself. At least try before asking for help

in my previous post i state that “its not working its all blury

I spose you haven’t referred to me as your bitch so far in this post so I’ll give in…
[php]
// NPC made by tricxta
if (Playerenters){
this.snow=200;//max amount of snow flakes on the screen at one time
setstring this.snow_img,g4_particle_snowflake.png;

this.fall_speed={5,10};//5-10 pixels per .05 seconds
this.wind={7,8};//min,max wind speed:is random
this.alpha=.6;//transparency on the snow image

//Don’t touch anything below here!
//=======================================
setarray this.speed,this.snow;//falling speed
setarray this.side,this.snow;//wind
setarray this.sx,this.snow;//x
setarray this.sy,this.snow;//y
for (this.i=0;this.i<this.snow;this.i++)this.speed[this.i]=-1;//used to check for first time

timeout=0.05;
}

if (timeout){
for (this.i=0;this.i<this.snow;this.i++){
if (this.speed[this.i]==-1){
new();
this.i=this.snow;
}
else {
this.sx[this.i]+=this.side[this.i];
this.sy[this.i]+=this.speed[this.i];
if (this.sx[this.i] >=screenwidth || this.sy[this.i] >=screenheight)new();
else draw();
}
}
timeout=0.05;
}

function new(){
if (random(0,100)>50){
this.sx[this.i]=random(0,screenwidth);
this.sy[this.i]=0;
}
else {
this.sx[this.i]=0;
this.sy[this.i]=random(0,screenheight);
}
this.speed[this.i]=random(this.fall_speed[0],this.fall_speed[1]);
this.side[this.i]=random(this.wind[0],this.wind[1]);
draw();
}

function draw(){
showimg 300+this.i,#s(this.snow_img),this.sx[this.i],this.sy[this.i];
changeimgvis 300+this.i,4;
changeimgmode 300+this.i,1;
changeimgcolors 300+this.i,1,1,1,this.alpha;
}
[/php]

and if you want to make it a weapon so it’s in every level just add:
[php]
if (!isweapon)toweapons -snow_fall;
[/php]
and make sure to check that the code is a weapon on the timeout:
[php]
if (timeout && isweapon){
[/php]

I’m expecting big things from your server, don’t let me down!

Thanks buddy :slight_smile: it works good and all i need help on now is the rotation gif i mean i’ve tried multiple times but i failed i mean its hair can u help me?

also how do u make the image go a certain direction like make this image [ATTACH=CONFIG]2607[/ATTACH] face another direction //make it a script if u can please please please:)

also how do u make the image go a certain direction like make this image [ATTACH=CONFIG]2607[/ATTACH] face another direction //make it a script if u can please please please:)

WHAT YOU HAVE STARTED?

Cannot rotate images with GS1.

You actually can with showimg, but it gets laggy as hell and is extremely inefficient.