The Parmameters of the Object Command
Blitz3D Forums/Blitz3D Beginners Area/The Parmameters of the Object Command
| ||
Okay I have run into yet another problem. I have tried writing my code like this Basically what I am wanting to do is to assign a variable that dosen't look like variable.variable to a type. Since You can't really convert one type to another I have tried using the object command par1=Object.constraint(p1) Blitz dosen't like that. So basically I am asking how can I acess a certain field of an entity with the object command because my above code does not work. Just to help the constraint type looks like this Type Constraint Field p1.particle Field other stuff ;and is created like this Function CreateConstraint(...) ;stuff up here constraint\p1=Object.particle(particle) ;stuff down here End Functionthat should give you some insight into my problem. Once I get this Object and Handle stuff figured out I think I am going to post an indepth code example/tutorial in the code arcs. for future blitzers Thanks |
| ||
Think about the names of the commands, cos you have them mixed round. Handle returns the handle (a number) of the Type object. Object returns the Type object itself (from the handle number). Type Constraint Field p1 Field other stuff ;and is created like this Function CreateConstraint(...) ;stuff up here constraint\p1=Handle(particle) ; get the number of the particle ;stuff down here End Function |
| ||
Object and Handle are of no use to you until you learn the correct use of the documented Blitz language. Basically what I am wanting to do is to assign a variable that dosen't look like variable.variable to a type. Unless you define the purpose of the code you are trying to write I don't understand how you can expect an adequate solution for implementing an elegant solution in Blitz. Object and Handle IMHO are only of use where the target of a message transmission through a data graph has been abstracted for a definite purpose. |
| ||
/me chucks skidracer off the beginners forum for talking gibberish. :) |