LEUpdateFramework() Update timing And world LEUpdateController(player,Vec3(VResult, camrotation_y.f, camrotation_x.f, 0),move,strafe,jump,0.5) LERotateEntity(camera,Vec3(VResult, camrotation_y.f, camrotation_x.f, 0)) Player = LECreateController(1.8,0.4,0.5,45,0)įont=LELoadFont("abstract::Arial12Shadow")Ĭamrotation_x.f=camrotation_x.f-mouse_x/10Ĭamrotation_y.f=camrotation_y.f+mouse_y/10 Scene = LELoadScene("abstract::test001.sbx") LEPositionEntity(camera, Vec3(VResult,0, 350,0)) LERegisterAbstractPath(GetCurrentDirectory())Ĭamera = LEGetLayerCamera(LEGetFrameworkLayer(0)) Mmhm - think i am a little lost - because i don´t understand how to get 3 variables into one -> playerpos=LEEntityPosition(player,Vec3(VResult)) and then use them with LEPositionEntity(camera,playerpos,0)ĭefine VResult.TVec3 if an expression requires more than one vec3 then define VResult2.TVec3, VResult3TVec3, etc. I tried playerpos\Y - but it want work - i defined Without this, you'll have to be careful and look at the prototypes when traducing c++ tutorials because syntax may differ (but not allways, because sometimes engine.dll exports functions, there is no rule).ĭaamn ! i'm teaching purebasic with a trial version after reading a pdf documentation 10 minutes crazy me ! i did it in the pascal header, but i currently don't know how to do it in purebasic. If we find a way to transform procedures that return 1 value into functions, why not. The current syntax in purebasic is : LEEntityPosition(player, playerpos, 0) So i don't understand why purebasic accepts your syntax and does not complain he has nothing to assign to playerpos because the prototype is not a function ? It is declared like this : Prototype LEEntityPosition ( entity.i, *position.TVec3, Globaly.i=0 ) dll procedure into a function and the purebasic header currently doesn't There is an option in purebasic to force variable declarations, maybe you should activate it.Īnd this is wrong : playerpos=LEEntityPosition(player,Vec3(VResult))īecause the C++ header transforms the engine. playerpos ? why not playerpos\Y ?Īnd what is camery ? this is what happens with languages that are not strict on variable declarations Ok, i'll update the generator to add global before the wrappers Playerpos=LEEntityPosition(player,Vec3(VResult)) LEUpdateController(player,Vec3(VResult, camrotationy.f, camrotationx.f, 0),move,strafe,jumo,0.5) Strafe=LEKeyDown(#KEY_D)-LEKeyDown(#KEY_A) LERotateEntity(camera,Vec3(VResult, camrotationy.f, camrotationx.f, 0)) LEMoveMouse(LEGraphicsWidth()/2,LEGraphicsHeight()/2)Ĭamrotation=LEEntityRotation(camera,Vec3(VResult, mouse_y.f, mouse_x.f, 0)) Mouse_y.f=Curve(LEMouseY()-LEGraphicsHeight()/2,mouse_y.f,6.0) Mouse_x.f=Curve(LEMouseX()-LEGraphicsWidth()/2,mouse_x.f,6.0) While (LEKeyHit(#KEY_ESCAPE)=0) And (LEAppTerminate()=0) try use enableexplecit command in PB.Ģnd: i got a litte problem 2 handle vec3 results. Mybay you can correct this in new headgen version. I now renamed it to framework and all works fine.īut now i got another Problem - if i include i the headgen with xinclude i mmust correct to set the leadwerks.pb variables global - otherwise it crashes. So this "fw" within quotes cannot be changed, it must match the name defined in the engine. "fw" is not a variable, it's leadwerks engine internally predefined name used to link the engine framework to your external variable.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |