Jump to content

MisterGravity

Members
  • Posts

    88
  • Joined

  • Last visited

Everything posted by MisterGravity

  1. Let's say there was a scenario where the color of this side of a brush was white unless something was true, and then it was red. Is that possible at runtime? If thisVariable = True then thatWallColor = Red
  2. Please note, I'm still very new at the Lua scripting. I'm trying! Using nate066's Jump-Pad tutorial script located here, I tried to use some skills I learned from Rick in his Teleportation tutorial located here. Specifically, once Rick implemented the teleporter pads, he created a couple of Pivots in the scene to hold the Noise.lua scripts. I learned that a function Script:Whatever could be called in the Flowgraph Editor to call outputs, like this: self.component:CallOutputs("TriggerEnter") Which would let him use it in the Flowgraph Editor, like this: So what I did was, I tried to use that knowledge to edit the Jumppad script to also be able to call a similar Pivot when the collision occurred. The problem (and it's not really a problem, it just wasn't conducive to what I wanted to do,) was that the JumpPad's action was all happening in the function Script:Collision area of the code. My assumption was that I could remove what made it work and put it in it's own function instead, and then use a "CallOutput" to be able to use it in the Flowgraph Editor too. This was what I was hoping would work, but does not. And this is the code as it was when I altered it: Script.JumpForce = nil --vec3 Script.SelectiveCollision = false --bool "Selective Collision" Script.ColObj = nil --Entity "Collision Object" function Script:Start() self.source = Source:Create() end function Script:Collision(entity, position, normal, speed) if (self.SelectiveCollision == true and entity == self.ColObj) then self.source:Jump() elseif (self.SelectiveCollision == false) then entity:AddForce(self.JumpForce) end end function Script:Jump() self.component:CallOutputs("Jump") self.ColObj:AddForce(self.JumpForce) end Does anyone have any thoughts on this? And nate, this was not intended to sidestep you or go over your head. You and I had talked together on trying to encorporate sound directly into it, but I thought I'd take it public since I'm now trying to add in pieces of Rick's project as well. Thanks everyone!
  3. Yep, I bet that is going to do it. Before you give me any answers on how to link in my gun/hand, let me try to figure that out on my own. I'm getting better at Lua by the minute.
  4. There is actually one last issue I'm having with this that I can't seem to overcome. If my player has a Weapon equipped, like "autopistol.pfb", then the security screen display also shows my hand holding that pistol. Is it possible to draw the camera without it also seeing that?
  5. Definitely this. I envision a kind of laser emitting device pointing to a spot which would create the beam, smoke where it's hitting the wall, etc.
  6. Dude, my middle name is STEAM: http://steamcommunity.com/id/mistergravity
  7. I'm glad that helped you. I had similar questions right before I purchased the engine a few days ago. I didn't particularly ask about a game the size of Elder Scrolls, but I did have questions about replicating the ideas behind a Serious Sam game, which of course uses VAST areas with ENORMOUS numbers of enemies on the screen at a time. Feel free to read the conversation I had on Steam here: http://steamcommunity.com/app/251810/discussions/0/630800447046789935/ Additionally, this is what Leadwerks can do for example with a large number of characters on the screen at a time:
  8. I can't answer all your questions, I'm still a 4-day old myself at this engine. One thing you're going to need is the drive and motivation to learn it. I'm pestering the **** out of everybody on the forum to figure things out, but hopefully they think I have decent questions in my quest for clarification. That being said, everything requires a learning curve, and this engine is no different. There are indeed tutorial maps included in the engine that teach you things like drawing rooms, making elevators, a couple of kinds of doors, moving platforms, buttons and switches, timed events, etc. Most of those things don't require programming or coding in themselves. After you get the basics of map design down, you'll start watching more complex tutorials that do involve some coding. Every video I watch teaches me something new. Just today in fact, I learned how to disable the camera that comes prebuilt with the fps player script and use my own, giving me more options with the camera effects. I learned that you can edit scripts, make your own, and pretty much code anything you can figure out. Don't like the options with an included script? Think it needs more options? ADD THEM, CHANGE THEM. This engine has all the potential in the world to make the game you want. So will it teach you how to code? Not directly. But can you learn by having something you want to try? Absolutely. Like I said, 4 days into it, and I'm so much farther ahead than the day I started it's unreal. I can scarcely imagine what I'll know 4 days from now. That's all the information I can offer you. I haven't gotten into models outside the engine yet, so I'll let someone else pick it up from here.
  9. I'll make a video and or write out exactly what we did. Rick is a brilliant, brilliant guy. Josh, now might be a good time to BEG you for a "point to" feature. As in, this light should point to that spot. Or that pivot should point to that spot. A simple static point to would be fantastic. A dynamic following pointer would be the bee's knees. All this guess work on in a three-dimensional plane is exasperating. You know, now that I think about it, is there a way to get the x,y,z coordinates of a location, like where your mouse pointer is, and then put that in a "point to x,y,z" of a light or pivot? Is there already an easier way than the rotate buttons, test, try again, test, try again...etc.?
  10. You say trial and error, but I'm not even seeing directions to point to. It's just a pivot, like a waypoint with no cone that you would send Moving Platforms to. See, take a look:
  11. Okay, I'm soooo almost there. I replaced the camera I placed in the scene with a 2nd pivot, and when I run it, I see what "I see", as in my first person camera on the screen. How can I point the camera/pivot if it doesn't have a cone like lights and cameras do?
  12. I got that far, but the thing is, when I bring a new Misc / Camera into the scene, it becomes what I see all the time when I run the game. I lost my first-person-camera eyes when I walk around. How do I get that back, but keep the rest of it working? (The camera I placed IS displaying what it sees on the screen I setup, I just lost my own first person viewpoint.)
  13. Do you think Shadmar or anyone has an example project I could download on this? The script is a little vague on the first three variables. Well wait a minute now, I've been playing with it and I what I've done is point a camera straight down over an area, and then display that on a screen. Unfortunately, I can't see my first person camera anymore. I just see my hands carrying a gun around from a top down view, which is a little weird. How can I still see what I need to see first person, but the camera view be the one I've setup?
  14. I see people talking about a Portal Gun... how about a GRAVITY GUN!
  15. I know there's a camera object, so it is possible to point the camera somewhere, then have a side of a brush be the output of what that camera sees? Think "security cameras".
  16. Kavex responded: Have you tried setting the disable on the Noise instead of the CollisionTrigger? This worked PERFECTLY. Obviously Enable and Play are two different things. Thank you!
  17. I support this request wholeheartedly! I also came from Hammer, and this is a feature I used a great deal.
  18. So I have an invisible brush being my collision trigger when I walk into a room to play a certain sound, but as long as I'm "in" the trigger, it's starting over and over and over immediately. I need it to call the sound, and immediately stop being a trigger... forever. NOTE: I need to stop the trigger, not the sound. The sound may be more than 1 second, it may be a short 30 second music interlude. I've attempted to do this, but it doesn't work: This doesn't work either. There's a timer in between the collision trigger and when it disables the collision. Anyway you look at it, I can't seem to stop the collision trigger. Ideas?
  19. Very awesome! I'll be using some of these in my projects for sure!
  20. In case anyone was wondering how it was finally accomplished, here it is for future reference: You can use the elevator floor itself as the "parent" object in the Scene tab, so choose these options once you've drawn the elevator floor. Physics Tab: Physics Mode: Rigid Body Shape: Box Mass: 10.0 (or greater than 0) Collision type: Scene Swept collision: False Nav obstacle: True [*]Script Tab: File: SlidingDoor.lua Enabled: True Move speed: 2.0 (or greater than 0) Manual activate: False [*]For the walls of the elevator, (or anything else attached to it,) the trick is to give it a script, even an unimportant one, so it does not become "part of the scene" when the game is run, therefore causing it to become invisible. Physics Tab: Physics Mode: Rigid Body Shape: None Mass: 0.0 Collision type: Scene Swept collision: False Nav obstacle: False [*]Script Tab: File: Noise.lua <-- This is giving it any script at all to work properly
  21. That's what I was thinking too, I just wondered what most people did. Thanks for the clarification. Lol, glad you had fun. Actually, the high jump rate and "take no damage from fall" was so I could quickly jump around and look at things. The second switch pushes the barrel out of the way of the elevator to get rid of the "trash" entirely. I added a lot more to that switch, and through a series of "pushes", well... you can see what happens.
  22. That sounds brilliant to solve this issue. In the end though, should I be building elevators like Moving Platforms with waypoints, or like SlidingDoors.lua with a distance to travel?
  23. Sorry, let me see if I can break that sentence down for someone who's only had Leadwerks for 3 days... Traditionally, this is done by just moving one "non collider", (as in the floor of the elevator which has no collision? [even though it needs collision?]), brush along an origin (what is an origin?), the lift etc. is then added as a sub model (parent/children in the Scene layout,), e.g. the model itself which does contain collisions (the parts of the elevator.) So what I'm hearing is that aside from the 4 pieces of the elevator, (the floor, the 3 walls,), I need a fourth piece that has the collision of NONE, and each of the pieces of the elevator are children of that? And that fourth piece with colllision of NONE is the one with SlidingDoor.lua script attached to it, but nothing else is? If that is true, does the no collision piece wrap around the other four pieces like a box, or can it be just a little 1x1 block doing the "parenting"?
  24. First, thanks for responding Josh. But, that was kind of clear as mud. Let me see if I even have a vague idea of what you mean. What I did was, under Assets, Scripts, I created a new script called "Nothingness", and deleted all the base code out of it. Then, I attached Nothingness.lua to each of the pieces of the elevator, and gave them mass. Of course since they are still child objects of the original object, they're script isn't "sliding door" so they should just slide WITH the parent object. But, they don't. In fact when I run the map, they vanish off the screen. They're there for a split second, but they then vanish. One thing I really loved about Hammer was it's "Group" function. Grab any number of objects in a scene, hit Group, and BAM, done. They're all one item now. I have been fighting for HOURS to simulate that in Leadwerks, and even after your response, I don't know how to fix it. Bottom line, how do you get multiple objects to move at the same time? I see it happening one of three ways. You draw several objects, and your trigger activates ALL those objects separately, but at the same time. This is what I was doing before I had this problem, but as indicated above, they get out of sync. Literally, they move at the same speed and do the same things, but if you watch them, this wall is faster than that wall. It defies comprehension. You draw one object, like the floor of your elevator, then you add 3 walls as children to the parent (floor). The children have no mass, they have no script, and behave just like the parent because they're attached. This seems simple to me, and yet this is the idea I've fought with all day. You grab several objects and click "Group", (just like Hammer), and then that single glued-together item has a script attached to it. Unfortunately, this does not seem to be possible. Maybe I'm making it harder than it really is? Maybe I'm oversimplifying it so much it's not clicking. I just... don't... get it. By the way... thanks for complimenting the map. While I was waiting on a response to the elevator issue, I added something completely useless to the map. Without further adieu...
×
×
  • Create New...