Hi,
I am having a little trouble with types here.
My code looks like this
The bit that is not working is
so basically I want constraint\p1 to be a pointer to the actual particle.particle type. Also an explanation of the object command would probably help me.
Lots of questions here. Any help is appreciated.
I am having a little trouble with types here.
My code looks like this
Function CreateParticle(mass#,x#,y#,z#) ; Function creates a particle particle.particle= New Particle ;sets up various aspects of the new particle particle\mass= mass ;set particle mass particle\oldx= x ;sets particles x, y and z particle\oldy= y particle\oldz= z particle\name= Handle(particle) ;stores the particles pointer in particle\name PositionEntity particle\name,oldx,oldy,oldz Return particle\name End Function Function CreateConstraint(p1%,p2%,stretch#,length#=3) constraint.constraint= New Constraint constraint\p1=Object.particle(p1) constraint\p2=Object.particle(p2) constraint\stretch=stretch constraint\length=length End Function
The bit that is not working is
constraint\p1=Object.particle(p1) constraint\p2=Object.particle(p2)
so basically I want constraint\p1 to be a pointer to the actual particle.particle type. Also an explanation of the object command would probably help me.
Lots of questions here. Any help is appreciated.