Jump to content

TylerH

Members
  • Posts

    525
  • Joined

  • Last visited

Posts posted by TylerH

  1. Uhm, the fact you wrote a Lua wrapper for Blitzmax doesn't mean your vote should count for more, nor did I find it humorous if it was supposed to be as such. You need to prove your expertise on the variable state field.

     

    List some pros/cons of both multi-state and single-state in your own opinion, if you may.

     

     

    Also, since you coded the wrapper I believe Josh uses, are you the one I need to bug to be able to pass Lua tables and numbers to and from Blitzmax?

  2. The point it you shouldn't be coding your entire game into your main loop, that has to be the stupidest thing ever. You need to level your code and divide it into areas that execute and correlate to different levels of interactivity.

     

    I mean, I definitely find it easier to code say my UI module and my AI module seperately, and then add them to the game loop via hooks, than to be fiddling with the main loop itself.

  3. Rick, please pay $10, buy Garry's Mod, and browse through the Lua. The entity system that Leadwerks originally implemented in the editor in the pre-alpha releases was based on an adaptation of mine of how Garry's Mod handled entities.

     

    The hook system is the same. garry's Mod uses it to allow addons and gamemodes to add hooks to be run when certain things are called. i.e. Setup my gamemode's Update function to be called when the game itself Ticks, or play a message on screen when the game calls the PlayerConnected hook.

     

    It is a very powerful system.

  4. Ok, better explanation.

     

    The whole purpose of a billboard is that it is a Quad. It is multiplied by the Model View Matrix to make it coplanar with the view plane.

     

    I don't want it to be coplanar with the view plane. I want it to be coplanar with the plane of the Camera's Up Vector. So that it appears how it looks when your eyes are level to a counter top and you are looking across it.

  5. Umm, the tracer is a suped up particle shader running on an emitter with a tracer DDS.

     

    I am trying to, in the particle vertex shader, rotate the Quad 90 degrees on the Camera's Right Vector so that the Normal of the billboard quad would be equal to the camera's up vector.

     

    A rather easy problem to fix.

     

     

    I already have tracers working great, just this pet peave to get them aligned.

  6. Ok, this is definitely the order:

     

    message,delay (I pass "0", since an integer crashes), and then extra (I pass bullet.damage as a string)

     

    This is sweet, I setup the props_locker file to receive damage messages and set its health. I tested it and the damage falloff works!

     

    Now just to figure out why entity.model:SetColorf(...) in the ReceiveMessage callbacks isn't setting the color...

  7. That doesn't explain why your second parameter is an entity and the third a 0.

     

    And man, I wish it could support integers and Lua tables, that would make scripting actually useful! I never heard of not being able to pass an integer...

  8. That can't possibly be right:

     

    if KeyHit(KEY_E)==1 then
    	pick=CameraPick(camera,Vec3(GraphicsWidth()/2,GraphicsHeight()/2,2.0),0,0)
    	if pick~=nil then
    		repeat
    			if pick.entity:GetClass()==ENTITY_MODEL then
    				break
    			end
    			pick.entity=pick.entity.parent
    		until pick.entity==nil
    		if pick.entity~=nil then
    			pick.entity:SendMessage("use",controller,0)
    		end
    	end
    end
    

     

    pick.entity:SendMessage("use",controller,0)

     

    You are clearly passing message,entity (Extra?), and 0 (delay?)

     

    I have tried passing message,table,integer message,integer,table message,integer,integer

     

    None of the combos work. THe message goes through, but on ReceiveMessage extra is always nil, can't be made a number, or something else with it has messed up.

  9. I have been trying to setup a simple hitinfo system via SendMessage and ReceiveMessage.

     

    I am sending the message fine, and receiving it fine, but when it comes time to use the "extra", I run into issues.

     

    From my understanding, SendMessage syntax in lua is:

     

    SendMessage(string message, entity sender, int delay, value extra)

     

    I have tried that, passing "damage", an entity, 0, and an integer (5). I also tried swapping delay and extra, and still have no luck.

     

    ReceiveMessage on the prop always picks up extra as nil. What am I doing wrong?

  10. *sigh*.

     

    I guess I am too used to Garry's Mod, where everyone is already godlike with Lua. Too bad the Ulysses community was turned away from making a Garry's Mod remake due to the license ambiguity.

  11. Just some notes:

     

    SetBlend(BLEND_ALPHA) enables the alpha blending for your pre-existing alpha channels.

     

    If you want to affect the ENTIRE alpha (opacity/transparency) of your whole control (even non-blended parts in the texture), you can make a call to SetColor: SetColor(Vec4(1,1,1,0.5)) will draw your image at 50% transparency. You can also modify the color via that, obviously.

     

    Hope that is what you were looking for,

    Tyler

  12. Not to rip on you, but people want C# Source Code. I don't want to be responsible for a 3rd party DLL.

     

    Also, unless Josh has decided against it, you don't have to obfuscate your code. People can find their ways if they really want your code.

×
×
  • Create New...