Jump to content

Rick

Members
  • Posts

    7,936
  • Joined

  • Last visited

Everything posted by Rick

  1. If I call SendEntityMessage() in C++ will that fire the lua script ReceiveMessage() for that model?
  2. That's what I was looking for. Question: // Set Lua framework object SetGlobalObject( "fw", fw ); // Set Lua framework variable BP lua = GetLuaState(); lua_pushobject( lua, fw ); lua_setglobal( lua, "fw" ); lua_pop( lua, 1 ); That looks to me like the first line is doing the same thing as the next 4.
  3. Well just asking because everything I've done has been all in lua. The main program being in lua. I assume I have to use the framework in my C++ program and make a global variable for it? I've never used the framework before in C++ I always did things manually myself. Is there an example of this somewhere>
  4. If I do LoadModel() in C++ does that still run the lua script for that model automatically? Also if I send message on an object in C++ does that automatically fire the lua events for that or is there some setup around that?
  5. Rick

    ip address

    Cool. This could come in handy.
  6. Rick

    ip address

    That's interesting. I assume those mac addresses are somewhat traceable then also?
  7. Rick

    ip address

    Yeah, in the email/text message there would be a way to cancel the option. Just trying to think of user friendly ways to help with this. I got hacked once and it really sucked.
  8. Rick

    ip address

    I was just thinking a nice feature of an MMO would be that it gets some kind of information about location from IP, or maybe even hardware information and stores it locally. Then when it detects the information is different it could send an email or text message to the original person on the account. Could maybe help fight getting hacked.
  9. Rick

    ip address

    Is there any embedded information in an ip address that is useful to sort of tell where the person is or what their provider is? I seem to remember that there is.
  10. That's true, but in this case we are only sending the function name as a string back to the engine. As long as the lua function is defined before the physics update all will be good because when the function should be fired from the engine, you can do that with the string of the function name. If doing it from C++ an example would be: /* the function name */ lua_getglobal(L, "add"); /* the first argument */ lua_pushnumber(L, x); /* the second argument */ lua_pushnumber(L, y); /* call the function with 2 arguments, return 1 result */ lua_call(L, 2, 1); Notice how the string "add" is the lua function name. So if we were able to define our own lua functions per body, I assume you could use the exact same code you do for C function pointers but instead you are just storing strings of the lua function names instead of C function pointers.
  11. I think if it was setup just like the C++ callback it would be ideal. We have a function to define that we want this body to have a collision callback called on it. I guess the only difference would be that we don't define the lua function to call, or could we? Ideally we would be able to define the lua function that gets called for each body just like in C++. SetCallback(body, myluafunc, COLLISION); function myluafunc(...) end If that's to much, then 1 main predefined function would work also.
  12. If you are having it point to the camera, which you can get anywhere with fw.main.camera I think, then you can put it in the characters class file.
  13. I love the new skin, but where are the people's updates on the right side of the page? I kind of liked that there.
  14. Do you mean like a predefined global function name that if we define in lua will get called when a collision happens?
  15. Check the editor.log file. If you changed the path inside Leadwerks and the shader files aren't in that path it does this.
  16. Rick

    Networking

    I am using UDP, and the network is just 3 computers right now, but haven't tried the broadcast address. I could try that when I get home. I could also try the host file. I've done that before but would just be nice if this worked.
  17. Rick

    Networking

    I tried using my external IP and that didn't work also.
  18. Rick

    Networking

    When setting up a server you don't specify the IP address to listen on just the port. It will automatically use your IP address and the port you specify to listen with RakNet. I don't resolve anything I was just saying I would assume my router would resolve that redirectme address to my computers IP, and it does do that.
  19. I don't know what's in switch.lua so this may be what's in there, but what I would do is the following: In the switch Initialize() lua method, you can see my Pi-Main on how I did that, find the player object and store that off in the switch lua data. Now your switch has a reference to the player object. Then in the switch Update() method check if say KEY_E is hit. If it is check the distance between the player object and the switches target object, and if within a certain range send a "toggle" message to the target. It's then up to the lamp code to receive that "toggle" message and do whatever it should do with it. Then the usage would be to add our lamp. Add this switch object. Make the lamp a target of this switch and place the switch anywhere you want (it could be a wall light if you like).
  20. Rick

    Networking

    Yeah, that sounds like what I'm trying to do. I have the server application and client application on one PC. These programs use RakNet for the networking code. I make a server and have it listen on port 4444. The client will listen on a random port number. The client then connects to rick.redirectme.com. That will resolve to my external IP address. So what I would expect is the following flow: Server starts up and listens on port 4444. Client starts up and tries to connect to rick.redirectme.com on port 4444 and sends this request from a random port. I assume rick.redirectme.com gets resolved to my external IP address. So this connection request would come back to my PC on port 4444, which my server application is listening on. The server application gets the request and says fine with me that you connect. And the connection is made. But my server never gets the message. When I use 127.0.0.1 instead of rick.redirectme.com my server gets the message and a connection is made.
  21. Rick

    Dream

    Is that the Premium version you have or Standard?
  22. Rick

    Dream

    what are you using to make this?
  23. Like Nio said, things can be more dynamic this way. Also, if you allow a main game lua file, like fpscontroller.lua, then people would expect to treat that just like if you were writing a C++/BMax program and with those you can create bodies and assign a collision callback method. I guess I wouldn't see it as contrary, I would see it as supplementary. The C++ tutorials would be more transferable if we had this. I know Kevin was looking at the bodies tutorial and ran into this issue. He was creating bodies in his main lua file and was asking me how he could get the collision callback working. Currently there is no way. If allowing bodies to be created from lua code, I would think there should be a way to create a callback in lua code when those bodies collide.
  24. Rick

    Networking

    If I ping my domain I see it coming from my external ip address. I don't see anything if I ping 127.0.0.1 so it must be going out and coming back with a ping.
×
×
  • Create New...