-
Posts
775 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Guppy
-
-
It should lock to the centre of the screen, are you using multiple monitors?
Also hitting escape or alt+F4 exits the program
-
Entity->CallFunction comes in two flavors, one that seems aimed at collisions and one that passes an Object pointer.
I'm not entirely sure how I'm supposed to use this to pass data to the function I'm calling, I can set a void pointer as "userdata" which isn't terribly usefull - the source claims to export it to lua but the documentations says it's not exposed in lua.
Is it possible to use this to pass a table to lua? and failing that can I somehow convince CallFunction to pass along the information that I've pushed a table onto the stack?
Right now I'm resorting to putting the table into a global, which is not really ideal.
Now I can sidestep using CallFunction by doing
Leadwerks::Interpreter::GetGlobal("Player:Test"); lua_pcall(Leadwerks::Interpreter::L, 1, 0, 0);
Unfortunately I've no idea what Global to use ( in the above I'm trying to target the Test function inside Player )
-
Just a reminder that this problem still exists
-
I don't think you understand the issue vulcan
the problem is that Button1 has a #define
to relate it to your example,
Try adding
#define GREEN 2
and see if it will compile
-
I don't believe you can namespace defines?
But yes it would make more sense if it was Leadwerks::Button1 or even better Leadwers::MouseButtons:Button1
as it is it seems to be just
#define Button1 1
[...]
#define Button5 5
-
This one has been driving me nuts, the below code fails to build in leadwerks
namespace MyGUI{ enum Enum { Button0 = 0, Button1, Button2, Button3, Button4, Button5, Button6, Button7, MAX }; }
I finally tracked it down to Button1 being #defined as 1 - presumably somewhere in the leadwerks linked library as I certainly haven't made that it and MyGUI builds just fine.
I've worked around it so far by simply commenting out buttons 1-7 and setting MAX to 8 explicitly - but now I need to pass Enum:Button1 so I kind of need it.
I can do
#undef Button1 #undef Button2 #undef Button3 #undef Button4 #undef Button5
In this header file and it also solves the problem - but I'm not sure if that will screw something up for LE, or even why those defines exists in the first place
-
You could try this http://cgcookiemarkets.com/blender/all-products/baketool/
It's over kill for the cube ofc, but for larger scenes I can see it being very useful
-
Self.camera or where ever you store the camera reference
-
Did you UV unwrap it?
And if you used materials in blender rather than textures you will need to bake it to a texture
-
=/
least i'm trying anyways..
I wasn't trying to be mean - I'm simply pointing out the easier path to learning. Everybody gotta start somewhere
-
Rick is correct about c++ being harder than lua but in the long run c++ is more usefull to know.
Le 3.1 uses a subset of c++ which makes things a lot easier.You don't need to learn the whole language before starting a game.Just learn the basics and then go by the command reference.
Judging by his comments so far I don't believe he can program at all, so learning lua first and getting to grip with concepts such as variables and control structures is properly a good idea.
Then once he feels comfortable with lua and the idea of programming, we show him c/c++ and tell him the horror story of the star that eats memory.
-
so is c++ easier to learn than lua because i'm having a hard time learning lua..
http://luatut.com/introduction.html
You can start learning right from your browser ( hit Escape key to test out examples )
Once you done and understood the examples hit the round red lua label to see the table of contents
-
That certainly works - I just find it more intuitive to have the camera as a separate entity so I can adjust FoV and what not independent of the fps script
One thing you didn't answer is how do I turn on for instance the sky box?
I may be missing something blatantly obvious
-
(the ones from the work shop)
How are they supposed to work?
Here is what I've tried;
Modified the FPScontroler script to take an optional external camera, IMO this should be part of the default script. I also added
self.camera:SetKeyValue("skybox_texture","Materials/Sky/skybox_texture.tex") self.camera:SetKeyValue("skybox_intensity","1.0")
On said camera I've tried plugging in each of the scripts in turn to no avail - in fact when saving the map and reloading the camera has no scripts attached.
I've tried to open the script in the editor to try and find a hint of how to use it, but I cannot - guess it's some sort of content protection scheme kicking in there.
-
wow well that made a the difference in the world, thanks <3
-
Try deleting your Leadwerks config and let it generate a new one, especially if you didn't do exactly that when the editor features were added under Linux recently.
I did not - how do I do that?
-
I assume by tab you mean like the ones that each script get?
So now bug I guess - linux have no lua debug tab
-
Maybe a stupid question but how do I debug in Lua?
I can set a break point but I cannot set watches or inspect variables and if something goes wrong or I make a typo it just crashed with no warning.
Shouldn't there be a lua console or something?
-
Looks like 1 bit alpha testing - but that's a thing from dem olden days if I were to guess I'd say the shader looked at the alpha value and did something like if alpha > X then 1 else 0.
What shader are you using?
-
More free stuff here
http://www.leadwerks.com/werkspace/topic/8507-free-resources/
- 1
-
*cough* doxygen *cough*
I've even been tempted to add the comments my self but as they will get overriden by updates..
- 1
-
Hello, sorry for the long reply.
I did actually rebuild. This is what the command outputs:
0x000000000000000f (RPATH) Library rpath: [$ORIGIN]
In that case there remains two possible error causes;
- libsteam_api.so is NOT in the same directory as your executable ( or is broken, try replacing it with the with one from a fresh project )
- Your missreading the error and what you see is just the "no running steam instance found" message
- libsteam_api.so is NOT in the same directory as your executable ( or is broken, try replacing it with the with one from a fresh project )
-
IIRC setting color to 0,0,0,0 will not tint the image
-
To illustrate the problem more clearly than the above ramblings;
Holding down shift and hitting h,e,l,l,o
results in:
H:16
D:16
H:72
D:72
H:69
D:69
H:76
D:76
H:76
D:76
H:79
D:79
with this code
for( int i=0; i < 256; i++ ){ if ( window->keyhitstate[i] ) std::cerr << "H:" << std::to_string(i) << std::endl; if ( window->keydownstate[i] ) std::cerr << "D:" << std::to_string(i) << std::endl; }
Where each new letter should also have a D:16
almost got my program up and running just need one more thing..
in Programming
Posted
Yes that is the part that centres the mouse.
Notice that it uses the context size divided by 2 (=the mid point of both sizes)
So off the mouse is really stuck on the lower corner then the context is twice as large as your screen