![]() |
File Checking
//Non-P2P
if (fileexists(head#v(head).gif)) { setplayerprop #3,head#v(head).gif; } //P2P if (existsonserver(NewBomb.txt)) { putnpc NewBomb.txt,Bomb.gif,x,y; } Might be useful for some of my scripts :D |
Re: File Checking
Quote:
or at least bomys do o.o (the body on the gani) but yeah i thought of that before it be neat |
yes, because #3, has to be a valid filename, but what if a gani attribute (#P1, or the attribute in setani gani,attribute) needs to be a valid filename...then you are screwed
|
Re: Re: File Checking
Quote:
|
this would be handy, in one of my levels there are many many NPCs and they all do the same thing, except are set to diffrent sprites, whenever I set all of their heads at once to a file that does not exist, it'll freeze the graal client for a bit. this would be EXTREMELY helpful
|
Quote:
online graal is a bit less flexible so it doesnt go as far as to check ur folder for the files. it just uses the files you had when you opened graal and checks if the file is on the server |
Re: Re: Re: File Checking
Quote:
|
Online, just the first person does the check against the online files. If it finds the file, it sets it to that, else it (at least used to) uses a default. When a player enters a level, the graphics have already been checked to exist on the server, if they're not in /levels it downloads it.
That's why you only get that unbearable "Where's aznbaby_chair.gif?" lag loading levels offline. It only happens on creation online. I think |
hmm...but still, that doesnt address my other point, what about the fact that you can do
setani blah,notafilename; and there is no way to check against that... also, while I was sitting here, I was thinking about some oter things maybe a command like "getfromserver(pics2.png)"...so you can have a tileset before you enter a level that requires you download that 500KB file (looks very tacky on a 56k) |
| All times are GMT +2. The time now is 07:31 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.