Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Server (https://forums.graalonline.com/forums/forumdisplay.php?f=14)
-   -   gravity script help (https://forums.graalonline.com/forums/showthread.php?t=4739)

Bravo_LAT-Admin 06-13-2001 11:19 PM

gravity script help
 
ok guys i have a gravity script.this one works so when you enter the level it puts and npc named *gravity in the players inventory and i edited so when you leave the level(thanx boco) it delteds iself. now the whole script worksfine offline but when i tried it online it won't work....i tried clientside(even though ui inow your not suppose to make weapon npcs clientside) that didn't work..i looked through the script and didnt see any commands that need to be converted. any one know why this is happeneing?

KJS 06-13-2001 11:21 PM

lol why?
 
that is stupid why make it a weapon??

for my gravity script I made I never made it a weapon...

the one on 2001 doesn't use a weapon either...

it is pointless

Bravo_LAT-Admin 06-13-2001 11:26 PM

well..
 
well the thing was i made it a weapon because it wouldn't work right for me unless it was a weapon....so i put it as one : / and it did..

Bravo_LAT-Admin 06-13-2001 11:44 PM

ok well..
 
ok well i dunno what i did before but now its setup so its not a weapon...(oby that makes the script easier) and it works fine offline but yet again online still won't work : / any clue why ???

Bravo_LAT-Admin 06-14-2001 09:03 PM

long : /
 
its prolly too long... : /

MoonAngel 06-15-2001 03:48 AM

If anyone is having trouble scripting it, just use the very first gravity script =P You can use it, do what you want with it =)

//Experiment with gravity by Warren and Silver
if (playerenters) {
playerx=int(playerx);
playery=int(playery);
playerdir=3;
timeout=0.05;
}
if (timeout) {
if (!antigravity) {
if (keydown(0)&&playersprite>=1&&playersprite<=8) playery+=0.5;
if (playerdir==0||playerdir==2) playerdir=gravdir;
if (onwall(playerx+0.5,playery+3)||onwall(playerx+1.5 ,playery+3)) {
velocity=0;
playery=int(playery);
if (keydown(6)) velocity=-2;
}
else if (keydown(2)&&playersprite>=1&&playersprite<=8) playery-=0.5;
if (onwall(playerx+0.5,playery-0.1)||onwall(playerx+0.5,playery)||onwall(playerx+ 1.5,playery)||onwall(playerx+1.5,playery-0.1)) velocity=0.1;
else {
if (velocity>-0.1&&velocity<=0) velocity=0.1;
if (velocity>3) velocity=3;
}
if (abs(velocity)>0) {
playery+=velocity/6;
if ((velocity>0&&(onwall(playerx+0.5,playery+3)||onwa ll(playerx+1.5,playery+3)))||(velocity<0&&(onwall( playerx+0.5,playery)||onwall(playerx+1.5,playery)) )) playery=int(playery);
else playery+=velocity/6;
if ((velocity>0&&(onwall(playerx+0.5,playery+3)||onwa ll(playerx+1.5,playery+3)))||(velocity<0&&(onwall( playerx+0.5,playery)||onwall(playerx+1.5,playery)) )) playery=int(playery);
else playery+=velocity/6;
if ((velocity>0&&(onwall(playerx+0.5,playery+3)||onwa ll(playerx+1.5,playery+3)))||(velocity<0&&(onwall( playerx+0.5,playery)||onwall(playerx+1.5,playery)) )) playery=int(playery);
else playery+=velocity/6;
if ((velocity>0&&(onwall(playerx+0.5,playery+3)||onwa ll(playerx+1.5,playery+3)))||(velocity<0&&(onwall( playerx+0.5,playery)||onwall(playerx+1.5,playery)) )) playery=int(playery);
else playery+=velocity/6;
if ((velocity>0&&(onwall(playerx+0.5,playery+3)||onwa ll(playerx+1.5,playery+3)))||(velocity<0&&(onwall( playerx+0.5,playery)||onwall(playerx+1.5,playery)) )) playery=int(playery);
else playery+=velocity/6;
}
velocity+=abs(velocity/4);
if (this.shot==9) {
hideimg 345;
this.shot=0;
}
if ((keydown(0)||keydown(2))&&!(keydown(1)||keydown(3 ))) playersprite=0;
if (keydown(1)&&!keydown(3)) playerdir=1;
if (keydown(3)&&!keydown(1)) playerdir=3;
gravdir=playerdir;
}
timeout=0.05;
}

Bravo_LAT-Admin 06-16-2001 11:47 PM

thankyou :) i will!

MoonAngel 06-17-2001 03:39 AM

there are still some bug since that was an experiment and ive modified a few things from the original so this is Warren's work Edited by me ; ) i know some people found a bug with the onwall, ill have to look at it =\

CrazedMerlin 06-17-2001 07:11 AM

Hmm...I tested that script and it dosent let you move up...:(

MoonAngel 06-17-2001 07:41 AM

did u try pressing A .. not the up arrow =\

SaijinGohan 07-10-2001 11:31 PM

LOL. A always helps!:D


All times are GMT +2. The time now is 07:53 PM.

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