Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-08-2007, 12:20 PM
Zanzel Zanzel is offline
<insert title here>
Zanzel's Avatar
Join Date: Dec 2006
Posts: 35
Zanzel is on a distinguished road
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
__________________
  • N-Pulse / N-Pulse Reborn Scripter
  • Graal Kingdoms Player
  • N-Pulse Player
Reply With Quote
  #2  
Old 10-08-2007, 08:01 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
What 3D rotating ship? I wanna see!
Reply With Quote
  #3  
Old 10-08-2007, 08:04 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Will update the wiki in a few days and also add some 3d examples (displaying 3d in 2d)
Reply With Quote
  #4  
Old 10-08-2007, 08:09 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
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...
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote
  #5  
Old 10-08-2007, 10:15 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
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.
__________________
Deep into the Darkness peering...
Reply With Quote
  #6  
Old 10-09-2007, 01:57 AM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
What server is it on Twinny
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #7  
Old 10-09-2007, 02:52 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Litheria
__________________
Deep into the Darkness peering...
Reply With Quote
  #8  
Old 10-09-2007, 03:14 AM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Didn;t work =\
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #9  
Old 10-09-2007, 03:24 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Angel_Light View Post
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 ?
Reply With Quote
  #10  
Old 10-09-2007, 03:28 AM
Blitz_Hunter Blitz_Hunter is offline
dot dot dot
Blitz_Hunter's Avatar
Join Date: Oct 2002
Location: Missouri
Posts: 601
Blitz_Hunter is on a distinguished road
Send a message via AIM to Blitz_Hunter
Goes to "starting 3d mode" then nothing happens.
__________________
-em3ricR-
Reply With Quote
  #11  
Old 10-09-2007, 04:47 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
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.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #12  
Old 10-09-2007, 04:59 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Quote:
Originally Posted by napo_p2p View Post
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?
__________________
Deep into the Darkness peering...
Reply With Quote
  #13  
Old 10-09-2007, 05:03 AM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
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á.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #14  
Old 10-09-2007, 05:07 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by napo_p2p View Post
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, "CProgram Files\Graal\Graal4.exe" -opengl . When you go to login, it should download alot of files and slowly the serverlist will look normal.
Reply With Quote
  #15  
Old 10-09-2007, 05:16 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by Twinny View Post
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, "CProgram 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.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:14 AM.


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