A new (major) release of Graal v4 has been uploaded, get it by connecting to the server list. The Mac version will follow in a few minutes.
This new version fixes a lot of problems with particle effects, those are needed for the new spells on Graal Kingdoms. There are also several new functions for sounds and for the new scripting engine in general.
In the options window on Windows you will find new options for light effects and similar, they are not the same like in v2 though - scripters must decide if they show the effects, by disabling those things in the options you are just specifying that you don't want to see those effects, it is not actually disabling them.
PS: v2 will finally be disabled in a few days
Crash fixes:
- fixed a problem with crashing when someone is
connecting from another server and having a statusicon which
is not existing on the current server
- fixed division by zero error when a tiled GuiBitmapCtrl has no image
or the image has not been loaded yet
- gani scripts cannot call destroy() on npcs anymore
Other fixes:
- it is displaying an error now when the connection to the
Graal 3D server timed out
- it is using the particle size for clipping the particles
(which fixes problems with huge particles)
- particles are displayed even if the object is moving out of
screen - this currently only works for moving npcs (e.g. spell missiles)
- the 'continueaftedestroy' flag for particle emitters is also
working on gmaps now
- the showimg attachoffset variable is working correctly now
- gani-ROTATEEFFECT is fixed on gmaps
- weapon timeouts are executed before gani timeouts so that
things like custom chat text display work better
- terrain levels are not having gaps anymore
- disabling UDP also disables microphone support
- the font tempus sans itc is automatically installed
- fixed the "&" character in urls retrieved with requestURL,
it is also sending the host and client for better compatibility
with web servers, also requestURL is working on Linux now
- the script event "actionclientside" is cached now in case
the destination weapon is not loaded yet
- findplayer(accountname) is returning the client if both client and RC
are online
- Graal3D textures take less memory in the video RAM now
- the game is not freezing when a mp3 or radio stream is starting
New/Improved:
- script variables npc.isblocking, level.width, level.height,
npc.npcsindex, player.playersindex, defaultfontname
- npc.isblockingprojectiles flag for letting blocking npcs
pass particles (not working for non-blocking npcs yet,
which never block projectiles)
- new script function findnpcbyid(id)
- signs can be scrolled via mouse click
- optimized levels/maps with many npcs
- new options: lighteffectsenabled, weathereffectsenabled,
particleeffectsenabled - those options don't change
the engine itself though, they are only a help for scripters
so they can enable/disable effects if possible;
those variables are also accesible by the old scripting engine
- script functions getMusicTags() (returns array) and getMusicStatus()
(returns string) for knowing more about the currently
played music
- script event onMusicDataReceived(dataname,datavalue) for
getting the title and artist of an internet stream (the stream server
is sending this all few seconds)
- playlooped2(soundfile,x,y,volume)
Sound examples:
PHP Code:
//#CLIENTSIDE
function onCreated() {
// Retrieve the playlist via http
this.req = requestURL("http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=3281&file=filename.pls");
catchevent(this.req,"onReceiveData","onData");
}
function onData(obj) {
// Got the playlist data:
// parse the returned data for a line like "File1=http://streamlocation"
for (line: obj.data) {
if (line.starts("File1=")) {
// Play the real url
play(line.substring(6));
// Also start a timer to display the music info
setTimer(0.1);
break;
}
}
this.req = NULL;
}
function onTimeout() {
// Display the music data
if (getMusicStatus()!="")
echo("music status: " @ getMusicStatus());
if (getMusicStatus()=="ok")
echo("music info: " @ getMusicTags());
else
setTimer(0.1);
}
function onMusicDataReceived(dataname,datavalue) {
// Music meta data is sent by the stream server
// all few seconds, dataname is either ARTIST or TITLE
echo("music data: " @ dataname @ " - " @ datavalue);
}
Update:
Released 4.04 revision 1, which fixes the problem with actionclientside in old scripting engine.
Added scripting functions:
- getimgpixel(imagefile,x,y) - returns an array of {red,green,blue}
- isimgpixeltransparent(imagefile,x,y)
- isimgrectangletransparent(imagefile,x,y,width,heig ht)
Update:
Forgot to mention that v4.04 also fixes the message bug on Graal Kingdoms