Graal Forums

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

Zanzel 10-08-2007 12:20 PM

3D Scripting?
 
I have been talking to Twinny about this, his
3D rotating ship is really impressive, just wondering how I would
go about 3D Scripting.. a good starting refference,
the wiki was useful on vectors, those are really easy ^^

DustyPorViva 10-08-2007 08:01 PM

What 3D rotating ship? I wanna see!

Admins 10-08-2007 08:04 PM

Will update the wiki in a few days and also add some 3d examples (displaying 3d in 2d)

Tolnaftate2004 10-08-2007 08:09 PM

I wrote the articles on vectors, if you want anything in specific math-wise for 3D, (perhaps the distance to the nearest wall, or how to bounce a ball off a strange surface, or the like) I can help there...

Angel_Light 10-08-2007 10:15 PM

Basics well first, adjust your Server Config so .3ds, .dts, .ft files are downloadable. Make a model and save it in to one of those formats. Next just use basic showimg controls.

PHP Code:

//#CLIENTSIDE
function onCreated() 
{
  
  
switchtoOpenGL();

  
with findImg501)) {
    
shape "file.3ds";
    
x     this.x;
    
y     this.y;
  }

  
onTimeout();
}

function 
onTimeout() 
{

  if ( 
keydown1))
    
findImg501).rotation += 1;
  
  else if ( 
keydown3))
    
findImg501)).rotation -= 1;

  
setTimer0.05);


Invern basically helped me out with this so thank him not me.

Switch 10-09-2007 01:57 AM

What server is it on Twinny

Angel_Light 10-09-2007 02:52 AM

Litheria

Switch 10-09-2007 03:14 AM

Didn;t work =\

Twinny 10-09-2007 03:24 AM

Quote:

Originally Posted by Angel_Light (Post 1351819)
Basics well first, adjust your Server Config so .3ds, .dts, .ft files are downloadable. Make a model and save it in to one of those formats. Next just use basic showimg controls.

PHP Code:

  if ( keydown1))
    
findImg501).rotation += 1;
  
  else if ( 
keydown3))
    
findImg501)).rotation -= 1

Invern basically helped me out with this so thank him not me.

.rotation? We're working with 3d models here! I'll try and make nice script to manipulate 3d objects.

Quote:

Originally Posted by Switch
Didn;t work =\

Did you say /opengl ?

Blitz_Hunter 10-09-2007 03:28 AM

Goes to "starting 3d mode" then nothing happens.

napo_p2p 10-09-2007 04:47 AM

There seems to be some problems with OpenGL for me :(. All along I thought that I was doing something wrong with my own 3D tests, but the same funky things are happening with the Litheria ship. The GUI Controls are going out of control.

Angel_Light 10-09-2007 04:59 AM

Quote:

Originally Posted by napo_p2p (Post 1351914)
There seems to be some problems with OpenGL for me :(. All along I thought that I was doing something wrong with my own 3D tests, but the same funky things are happening with the Litheria ship. The GUI Controls are going out of control.

Do you have truefonts downloaded for your gui texts?

xXziroXx 10-09-2007 05:03 AM

Nice work Twinny.


And for those it doesnt work for;

First say "/opengl", and if the ship doesnt display after that - restart your Graal client. When you log back on, say "/opengl" again - and voilá.

Twinny 10-09-2007 05:07 AM

Quote:

Originally Posted by napo_p2p (Post 1351914)
The GUI Controls are going out of control.

I pointed this out in another thread. OpenGL needs fonts which i've only ever found on Login. Try running graal with -opengl added. For instance, "C:\Program Files\Graal\Graal4.exe" -opengl . When you go to login, it should download alot of files and slowly the serverlist will look normal.

napo_p2p 10-09-2007 05:16 AM

Quote:

Originally Posted by Twinny (Post 1351919)
I pointed this out in another thread. OpenGL needs fonts which i've only ever found on Login. Try running graal with -opengl added. For instance, "C:\Program Files\Graal\Graal4.exe" -opengl . When you go to login, it should download alot of files and slowly the serverlist will look normal.

Nice, that did the trick. Stefan will probably clean that up at some point.


All times are GMT +2. The time now is 05:50 AM.

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