-
Posts
191 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Daimour
-
-
Ok so here is the source code that matters.
I asked about LUA-script which invokes "scripts/class". How does it do? With require command? It must be somewhere in your attached to model "gate.lua" file I suppose.
I can assume only that this two cases use LUA environment with different states. And search path may be changed. You can check search path in than lua script:
AppLog(package.path)
Add this line right before "scripts/class" invoking. And watch the LOG-file. For both cases.
- 1
-
It would be nice to see that LUA-script and that error message. Source code must say much more than video in this case.
I think something wrong with paths.
Try to replace relative path to script "scripts/class" with abstract one "abstract::class".
-
1. If you want to disappear dead body it's good approach to FreeEntity(). If it crashes you are doing something wrong. Remember C has no garbage collector so you need to manage carefully all references and pointers.
2. If want just to stop sliding body without disappearing it depends of causes that make it sliding.
If it slides because of physics forces you'll need probably reduce that forces and/or increase friction.
If it slides because of error in your character controller moving algorithm you need to fix it.
-
1. You need to call Animate() every frame. Do you call kill_badguy() every frame?
2. Do you reset value of badguy.k_framebegin for every new bad guy?
-
And should you change your mind about the rest of the title screen being black...
You should make second picture with black background for comparing. Because when people are not designers they can't make such decision without visual comparing. And I think here is the question more about technical capabilities rather then aesthetic things.
-
I Have same problem as you expect with my "ragdolls" they disappear in close range. :/ Same LOD problem?
The most likely.
I hadn't much time to manage this issue. So I don't know is it solvable or not.
-
Well.. i don't really know LUA.
LUA is not far from BlitzMax. It has variables and functions. And it has the same functions from Leadwerks API.
Compare:
BlitzMax:
bodyp:tbody=createbodysphere(.35) positionentity bodyp,entityposition(body,1) setbodymass bodyp,1.0 entitytype bodyp,1 'rotateentity(bodyp, vec3(0,0,0)) 'positionentity(bodyp, vec3(0,0,0)) entityparent body,bodyp setbodymass bodyp,1 SetBodyElasticity bodyp,0
And LUA-code:
bodyp=CreateBodySphere(0.35)
PositionEntity(bodyp,EntityPosition(body,1))
SetBodyMass(bodyp,1.0)
EntityType(bodyp,1)
--RotateEntity(bodyp, Vec3(0,0,0))
--PositionEntity(bodyp, Vec3(0,0,0))
EntityParent(body,bodyp)
SetBodyMass(bodyp,1)
SetBodyElasticity(bodyp,0)
Moreover, you don't need to read whole that file. Just find calls for function CreateJoint() and look around.
I doubt someone will tune up your bones and physics bodies. It's hard hard work. May be you could find needed digits in my example if you would read it.
When i made them smaller they go through terrain.
Try to use SweptCollision() for bodies.
-
I can share how I did it with LUA (file in attachment).
But it doesn't work totally properly. Because of LODs...
You can watch this video for details about the problem:
Sorry for dirty code.
-
You can use collision check instead.
-
Blending is another thing I don't fully understand.
Blending means you can play 2 different animations simultaneously. Yes, they will be mixed. And you'll get something between them. But with "blending" parameter you can express one animation more then the second. So you can change "blending" from 0 to 1 through the time and your character will change one animation to the second seamlessly.
-
Ball Joint doesn't work properly in LE2. Try to use Hinge Joint instead.
-
Thank you, CreativeOcclusion. It's more than enough. I even didn't try that old link. I'm getting older, I suppose...
-
-
I saw very few wrong information there. But usefulness is overweighting that cons.
It could be written there with big red letters that administration doesn't respond for content of wiki.
-
Request for getting back the wiki part of documentation.
That was very helpful for those who programming with LUA (and may be Blitzmax). Because sometimes functions have different names and parameters in different languages. And sometimes there was more information and examples in wiki then in documentation.
-
1. Check type of your picked entity. It can be animated model with LODs or terrain or vegetation or something else. You need to drill down to real mesh.
2. Try to not add decal to mesh for awhile. Leave it as separate entity.
-
That's true. Every language has its pros and cons. Don't forget about pros.
-
It almost makes lua feel like a real language.
What's wrong with LUA? It's excellent language by itself without any sugar.
-
Here is working example.
Material file:
texture0="abstract::bullethole.dds" shader="abstract::mesh_diffuse_bumpmap.vert","abstract::mesh_diffuse_bumpmap.frag" overlay=1 blend=alpha zsort=1 clamp0=1,1,0 clamp1=1,1,0
LUA-code:
bulletholeMat = LoadMaterial("abstract::bullethole.mat")
picked = CameraPick(camera, Vec3(GraphicsWidth() / 2, GraphicsHeight() / 2, 100), 0);
bullethole = CreateDecal(picked.surface, TFormPoint(picked.position, nil, picked.entity), 1.0/16.0, 32);
EntityParent(bullethole, mesh, 0)
PaintEntity(bullethole, bulletholeMat)
AddMesh(bullethole, picked.entity)
FreeEntity(bullethole)
And video:
LUA-script and files in attachment.
- 5
-
Can you attach to the topic your material, textures and little lua-script representing that issue? So it will be much easier to investigate the case.
-
You might be able to place the weapon in another world...
With two worlds it can be tricky to light weapon properly.
-
Try to replace
while( !KeyHit() && !AppTerminate() )
with
while( !AppTerminate() )
And try to remove:
if( !AppSuspended() )
-
-
Entirely internet or HTTP only? I found loosing my HTTP after using uTorrent.
[SOLVED] Error can't open scripts/class. Win32 OpenFileName()
in Programming
Posted
It works very well for me. But I write my game entirely in LUA.
require("abstract::core")
require("abstract::filesystem")
require("abstract::string")
require("abstract::vector")
require("abstract::properties")