Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Community Reputation

91 Excellent

About GorzenDev

  • Birthday 09/25/1986

Profile Information

  • Gender
  • Location
  • Interests

Recent Profile Visitors

5,252 profile views
  1. it has been a while for me but you'd probly do something like this: (untested) Script.cleaningtime = 5000 --int "Cleaning time (ms)" function Script:Start() self.enable = true self.startcleaning = false self.holding = false self.cleantimestart = 0 end function Script:Use() self.startcleaning = true end function Script:UpdateWorld() if (window:KeyDown(Key.E) and self.startcleaning) then --while the player is holding its use key down if self.holding == false then self.cleantimestart = Time:GetCurrent() self.holding = true end local timepast = Time:GetCurrent(
  2. if i remember correctly you need the GUI to initialize the image. example: logo = Widget::Panel( 0, 0, gui->GetBase()->GetClientSize().width, gui->GetBase()->GetClientSize().height, gui->GetBase()); logo->SetScript("Scripts/GUI/Custom/ImagePanel.lua"); Image* logoImg = gui->LoadImageA("Materials/Logo/leadwerks_logo.tex"); logo->SetImage(logoImg); logo->Redraw(); logoImg->Release();
  3. using a global variable like that will result in undefined behaviour. make sure you process each event before the while loop ends. you would be better off to store a pointer to mudaLocalGui as global variable, add a process function to your script, and call it from your event loop. (remove the pointer after closing the menu ) personally i would use some kind of guimanager script, instead of processing your events in Main.lua. example of a gui manager: import("Scripts/MainMenu.lua") import("Scripts/GameMap.lua") import("Scripts/GameGUI.lua") function BuildGUIManager(cont
  4. does LE 4 support Valve Index VR set? 
    It finally arrived a couple of days ago, and after some playing i would like to play around with it in LE.

    1. reepblue


      It should work fine, but there is no finger tracking.

  5. i used to do something like this... this will only add keyinfo to the Keys table when a key is actually used. to make it work you would need to add a call to PreUpdate() in your main loop. to check a key's state you would call eg: IsKeyUp(Key.W) or IsKeyDown(Key.W). function SetKeyboardInfoPack() local pack = { Keys = {}, -- FlushKeyInfo = function (self, resetHit, key) if key ~= nil then local nHit = 0 if self.Keys[key] ~= nil and resetHit == false then nHit = self.Keys[key].hit end self.Keys[key] = {down = false, up = false, hit = nHit} else
  6. they all definitly work no doubt about it. are you certain that the variable you try to read/write actually exists in the widget script?? i assume you are looking for. widget:SetFloat("radius", 2); widget:GetFloat("radius"); REMEMBER !!! call widget:Redraw() when you change a variable's value. often you would think "hey this does not work" while it usually does work but is not updated yet ?
  7. The BaseActor class i use to derive actors from. Use it just like you would use a entity script. Attach actor to a entity. baseActor = new BaseActor(); entity->SetActor(baseActor); BaseActor.h #include "Leadwerks.h" using namespace Leadwerks; const enum class ActorType : char { Base, Player, NPC}; class BaseActor : public Actor { //Built-in extendable functions // //virtual void EndAnimation(const int sequence); virtual void Sleep(); //virtual void Wake(); virtual void Attach(); //virtual void Detach(); //virtual void Collision(Entity* entity, const Vec3&am
  8. Definition Entity.h virtual int FindAnimationSequence(const std::string& sequence);//lua Entity::FindAnimationSequence("sequencename")
  9. whenevver i loose my motivation i actually force myself to do at least 4 hours of coding each week. which in turn motivates me because i progress. (even if its just small progress) this brings me in a vicious circle that keeps me going.
  10. You could always edit the "common" template and remove the files you dont want to be copied. Dont forget to backup before editing.
  11. create your own "BlankProject" template its very easy and saves you a lot of time. i remember i made a post somewhere on how to do it.
  12. The style system change results in a lot of manual source updating and since i make use of the GUI system in basicly all of my projects, that's alot of code to change. Maiby i will have to write a small tool that does it for me... i guess notepad++ could achieve it nonetheless nice work on the update.
  13. GorzenDev

    Project Release

    I decided to release the source/project for my GUIEditor. its an unfinished project and not at all optimized, although it is usable. you mite have to upgrade the source project to the latest version. written in c++. the project includes some custom gui scripts found in /Scripts/GUI/Custom. and a FileDialog i designed using widgets. GUIEditor.rar enjoy
  14. you could create your own pre-post processor function in your main.lua, and have that execute when you want.
  15. happy hollidays everybody and a safe and thrilling new year.

  • Create New...