cassius Posted September 13, 2012 Posted September 13, 2012 Hi This code works in Bmax but not in c.The problem is the second parameter; Knight.model is the name of the character and is a struct member. UpdateController(knight.control,knight.model.rotation.y,knight.speed * 2,0, 0, 500,1,0); Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++
Daimour Posted September 13, 2012 Posted September 13, 2012 The problem is the second parameter; What's the problem? Quote
cassius Posted September 13, 2012 Author Posted September 13, 2012 The error was something about "rotation.y not being a" member; The character is an enemy character, not the main character. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++
Daimour Posted September 13, 2012 Posted September 13, 2012 Looks like BMax tail. Try use EntityRotation(knight.model, 1) instead of knight.model.rotation. Quote
cassius Posted September 13, 2012 Author Posted September 13, 2012 Nope. That did not work. I need the character to walk toward the player. As I said the code works in Bmax, I need a way of expressing the second parameter in c . EDIT: I am using PointEntity and thats working ok. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++
Pixel Perfect Posted September 13, 2012 Posted September 13, 2012 If you have already used PointEntity to point the knight towards the player then Daimour's suggestion should work, so the whole line becomes: UpdateController(knight.control,EntityRotation(knight.model,1).Y, knight.speed * 2,0, 0, 500,1,0); rotation.y is a BlitzMax property and these are not directly exposed in the C DLL Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++
cassius Posted September 13, 2012 Author Posted September 13, 2012 Thanks pixel. I will give it a try after I get some sleep, been pondering this for hours and its only supposed to be a hobby. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++
Pixel Perfect Posted September 13, 2012 Posted September 13, 2012 lol ... I know that feeling well Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++
cassius Posted September 13, 2012 Author Posted September 13, 2012 Got it working. Should have worked first time but I had syntax error with unhelpfull error message. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++
Clackdor Posted September 15, 2012 Posted September 15, 2012 Ha. Yeah, I don't like Codeblock's error messages. I mostly ignore it. At least it tells you what line its on. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.