AlignToVector changes?

Blitz3D Forums/Blitz3D Beginners Area/AlignToVector changes?

SausageOfDoom(Posted 2007) [#1]
Hiya, I'm just wondering if the AlignToVector command has changed in recent times?

A friend kindly donated some source for me to mess around with to help me get into the swing of things, which worked in the Demo/Trial version of Blitz3d, but now I get the error:

Too many parameters

since I have today installed the full version of Blitz3d.

I bought BlitzMax/MaxGUI and Max3d after having a fiddle around with the demos.

I got the source to compile again, simply by removing an extra number. I just wondered when it changed as that very same source compiled on the demo version, without removing any extra numbers.


The original line was:

AlignToVector(player),playervectorx#,playervectory#,playervectorz#,2,0.25

and the amended line (to work with full version) is:

AlignToVector(player),playervectorx#,playervectory#,playervectorz#,2


Not important I guess, but I just wondered what the score was?


Actually, come to think of it, I did install the miniB3d stuff earlier? Would that be why?

I installed miniB3d in the hope that I could do 3d stuff with BlitzMax, but I couldn't get any of the old Blitz3d stuff to compile, which is why I ended up buying Blitz3d too.

Anyway, I do go on, don't I?

Excuse me for being a noob. Maybe I'm just thick :)


jfk EO-11110(Posted 2007) [#2]
As stated in the online manual, the correct syntax is:
AlignToVector entity,vector_x#,vector_y#,vector_z#,axis[,rate#]

So the optional rate should work. What BLitz3D version have yu installed? Make sure to update your Blitz after installation. You may also download the last couple of releases, so if it doesn't work with Version 1.99 then you may try it with version 1.98.

BTW I see you've got some weird brackets on your line:
AlignToVector(player),playervectorx#,playervectory#,playervectorz#,2,0.25

I guess this should be
AlignToVector player,playervectorx#,playervectory#,playervectorz#,2,0.25

Not sure if this matters at all.

I did however run this line in BLitz3D 1.98:
AlignToVector cam, x,y,z, 2, 0.25
and it worked with no errors.


SausageOfDoom(Posted 2007) [#3]
Okay, thanks jfk! Maybe I do just need to do an update or something. I simply installed the downloaded version when I bought Blitz3d and I don't think I did any updates. I did, however, sync and update my BlitzMax.

Anyway, I'll try that, thanks :)


SausageOfDoom(Posted 2007) [#4]
Yep, seems I just needed to do an update (and register my Blitz3d, which I thought I'd already done. D'oh!).

Works fine now.