Sprite trails

Blitz3D Forums/Blitz3D Beginners Area/Sprite trails

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

1) Thanks for the help Matty but your example doesn't work without a lot of tinkering. Could you please copy and paste the entire functioning program so I can actually see your code in action?.
Remember to keep in mind too that the buffer needs to be cleared each frame with Cls. Your example does not work in this case, as the previously drawn pixels are removed with each refresh.

2) As for my other question, take for example:

Type alien
Field x,y
End Type

For z = 1 to 5
nasty.alien = New alien
nasty\x = Rand(800)
nasty\y = Rand(600)
Next


I wish to check the 'x' field values of both the 2nd and 4th alien datatypes for some reason. To be able to read the 'x' field value of the 2nd entry I would need to type:

nasty.alien = First alien
nasty = After nasty


To compare the 'x' field value of this 2nd entry with the 4th entry I would have to store the 2nd entry value in a new variable:

alien2X = nasty\x

Then to grab the 'x' field value of the 4th entry I would type:

nasty = After nasty
nasty = After nasty


I can now read the 4th entry's 'x' field value and compare it to the 2nd entry's 'x' field value previously stored in alien2X.

Now I think you'll agree that this method truly sucks arse.
So to repeat the original question:

Is it possible to read/set a type field without having to first point at it with the First, Last, Before or After commands?

This would save a lot of time and effort. I know creating an array using the Dim command is an option, but I prefer to use Types.

Any assistance would be appreciated.