dev.gamez.lv Forum Index dev.gamez.lv
Latvian Game Developers Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 

Max(6)script?

 
dev.gamez.lv Forum Index -> Pļāpātuve
View previous topic :: View next topic  
Author Message
GiGa
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 25 Sep 2003
Posts: 887

PostPosted: Sun Oct 03, 2004 2:09 pm    Post subject: Max(6)script?

Sveiki,

man te tagad fiksi nodereetu viens max scripts, bet pats nezinu neko par to lietu, taapeec gribeeju paprasiit - kaads nevareetu man vienu uzraksiit? Buutiiba vienkaarsha - teiksim man ir atveerts fails, kuraa ir objekti Box01, Sphere02, Pyramid03. Palaizjot scriptu, scripts atver aareeju texta failu, pienjemsim "forscript.txt", kuraa atrodas shaads txt:

Code:

Box01 10.0 20.0 30.0 40.0 50.0 60.0
Sphere02 110.0 120.0 130.0 140.0 150.0 160.0
Box01 210.0 220.0 230.0 240.0 250.0 260.0
Pyramid03 310.0 320.0 330.0 340.0 350.0 360.0


un tas noziimee, ka scriptam ir jaanokopee objekts Box01 un shai kopijai jaataarodas koordinaataas 10 20 30, ar rotaacijas lenkjiem 40 50 60.
Un objekts Sphere02 uz koordinaataam 110 120 130, ar rotaacijas lenkjiem 140 150 160. utt.

Texta failam, ja vajag, var pievienot max kopiju skaitu un tamliidziigu infu.

Buushu ljoti pateiciigs :)

P.S. Jaa, zinu, esmu lolis, ka nemaaku max script, bet taa nu taas lietas ir .

P.P.S. Ja vari, luudzu paliidzi, tas ir ljoti svariigi !!!
_________________
Back to top
View user's profile Send e-mail
GiGa
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 25 Sep 2003
Posts: 887

PostPosted: Sun Oct 03, 2004 4:14 pm    Post subject:

Labi, izraadaas tas max script nav nemaz tik sarezgiits un rekas man jau ir:

Code:

fn get_object name = execute ("$" + name)

f = undefined

fname = getOpenFileName caption:"Find world object file" filename:"*.txt"

if fname != undefined then
      f = openFile fname

object_name = "none"
object_pos = [0.0,0.0,0.0]
object_rot = [0.0,0.0,0.0]
      
if f != undefined then
(
while (not eof f) do
   (
   
   object_name = readvalue f;
   
   object_pos.x = readvalue f;
   object_pos.y = readvalue f;
   object_pos.z = readvalue f;
   
   object_rot.x = readvalue f;
   object_rot.y = readvalue f;
   object_rot.z = readvalue f;
   )   
   close f
)


bet tagad kaa lai es nokopeeju to objektu, kura nosaukums ir mainiigajaa
object_name ?
_________________
Back to top
View user's profile Send e-mail
Display posts from previous:   
dev.gamez.lv Forum Index -> Pļāpātuve All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group