Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Gravity (https://forums.graalonline.com/forums/showthread.php?t=28759)

Dragona2002 05-08-2002 05:36 PM

Gravity
 
i was playing graal a lil bit till i saw Sanstrata.
I saw a gravity room where baddys cant walk up...
all the gravity rooms i had seen was that the baddies
can walk up and down to...
how do i create that (i dont got the link anymore fot baddyscripting to)

thx;)

screen_name 05-08-2002 07:00 PM

can you change baddies direction with baddies[i].dir??

Bhala 05-09-2002 07:46 AM

that would be easy to do.... id make a script for ya but i dont like doing that stuff for people.....

mikepg 05-09-2002 08:29 AM

umm
 
you'd use
baddy[i].mode
baddy[i].y
baddy[i].dir

I think...put those all in a timeout and configure them properly..then you have it :)

Dragona2002 05-09-2002 02:16 PM

but 1 thing

if i use
baddy[i].mode
baddy[i].y
baddy[i].dir

must i change the variable [i] ???

Neonight 05-09-2002 09:26 PM


it's compus[i].var

You'd probably do something like:

NPC Code:

if(playerenters && timeout){
for(i=0;i<compuscount;i++){
compus[i].y+=.1;
}
timeout=.1;
}




That'd make the baddies fall downward...i think.

Dragona2002 05-09-2002 09:29 PM

k i will check it


( how do u know that)

gees i want to learn that scripting 2 !!!

Saga2001 05-09-2002 11:02 PM

Well yeah. There is so much to do with scripting.
Like this:
NPC Code:

//#CLIENTSIDE
if (playerenters || timeout) {
if (mousebuttons == 1)
findPlayer();
if (strlen(#a(this.player))>0 && this.b<=100)
showAttribs();
else
hideimg 600;
timeout=.05;
}
function findPlayer() {
for (i=0; i<playerscount; i++; ) {
if (mousex in |players[i].x, players[i].x+3| && mousey in |players[i].y, players[i].y+4|) {this.player = i; i=playerscount;}
}
if (strlen(#a(this.player))<=0) this.player=-2;
this.b = 0;
}
function showAttribs() {
showimg 600, @#a(this.player), 5, 100;
changeimgzoom 600, .75;
changeimgvis 600, 5;
this.b++;
}


Isn't it beautiful, only 2 minutes of scripting...*breathtaking*. Unfortunatly you cannot edit players[i].x and y and etc from clientside, so you have to go serverside to make a player drag...:-/. Oh well. Learn how to script.:megaeek:

Jinx 05-11-2002 04:30 AM

Quote:

Originally posted by Kaimetsu
Perhaps the baddies were rescripted.
I'm Pretty sure we didn't do that....althought I know squat about scripting...

-Jinx

mikepg 05-12-2002 04:39 AM

umm
 
Quote:

Originally posted by Saga2001
Well yeah. There is so much to do with scripting.
Like this:
NPC Code:

//#CLIENTSIDE
if (playerenters || timeout) {
if (mousebuttons == 1)
findPlayer();
if (strlen(#a(this.player))>0 && this.b<=100)
showAttribs();
else
hideimg 600;
timeout=.05;
}
function findPlayer() {
for (i=0; i<playerscount; i++; ) {
if (mousex in |players[i].x, players[i].x+3| && mousey in |players[i].y, players[i].y+4|) {this.player = i; i=playerscount;}
}
if (strlen(#a(this.player))<=0) this.player=-2;
this.b = 0;
}
function showAttribs() {
showimg 600, @#a(this.player), 5, 100;
changeimgzoom 600, .75;
changeimgvis 600, 5;
this.b++;
}


Isn't it beautiful, only 2 minutes of scripting...*breathtaking*. Unfortunatly you cannot edit players[i].x and y and etc from clientside, so you have to go serverside to make a player drag...:-/. Oh well. Learn how to script.:megaeek:

are you sure you posted in the right topic dude? He was asking about baddies, not moving the player with your mouse, lol.

BBflat 05-12-2002 07:07 AM

Re: umm
 
Quote:

Originally posted by mikepg


are you sure you posted in the right topic dude? He was asking about baddies, not moving the player with your mouse, lol.

Sounds good to me... Now we just need a good gravity script for mice. You put your mouse on the screen, and it accelerates downward at a rate of 9.8 Graal meters/second squared. Then again, we are talking about Graal gravity, aren't we? That rather complicates things.

prozac424242 05-18-2002 11:32 AM

yep
 
neoknight almose guesed the baddy grav script ...
here it is

NPC Code:

// NPC made by Prozac
if (playerenters) {timeout=.05;}
if (timeout)
{
for (this.i=0; this.i<compuscount; this.i++;)
{
if (!onwall(compus[this.i].x+1,compus[this.i].y+2.5))
{compus[this.i].y++;}
}
timeout=.05;
}



wow people are still talkign about scripts i made 18 months ago .. heh cool!!!


All times are GMT +2. The time now is 01:03 PM.

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