
thehankinator
Members-
Posts
436 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by thehankinator
-
Text showing up when interacting with entity.
thehankinator replied to lxFirebal69xl's topic in Programming
I don't see anything obvious in the code you posted. Normally I start putting prints all over to figure out if the code in the area that I am looking at is even getting run. For example I'd put a print after each if check for pickInfo, then if all that is getting run, I'd put some prints in PostRender() looking at self.text.- 4 replies
-
- Text
- Interaction
-
(and 1 more)
Tagged with:
-
Glad you liked it, thanks for the screen shots!
-
Ok the problem is that you added a new Start(), UpdateWorld() and PostRender(). The error is because the original Start() function isn't getting run. What you need to do is remove the functions you added but then add the content to the existing functions. For example, Start() is around line 101, go to the end of that function and add: self.reachedGoal = false You will need to do the same thing for UpdateWorld() and PostRender().
-
This game was developed in loving memory of the best video card I didn't pay for, 8800 GT Alphadog Edition. The vikings have offended Alphadog for the last time. Alphadog has only 60 seconds between appointments to make them pay! What? Alphadog is a successful businessman and is well respected in the community. Well, besides these damn vikings. What's their problem anyway? They think they are so cool with their boats, their huts and hats... W/S - Forward/Backward Mouse - Turn Space - Jump Left Mouse button - Bite E - Howl! Thanks lxFirebal69xl for the screenshots! http://www.leadwerks.com/werkspace/page/viewitem?fileid=626762660
-
Thanks for all the input guys, I'm still looking at all of these. I think I'll have to buckle down and spend time learning one after games of winter. For the time being I wrote a program to convert a prefab to obj format. Works pretty well but it looks like a couple axis get swapped when Blender exports to .mdl(hmm fbx looks fine though, weird) but gets me by for the games of winter.
-
Art isn't something I enjoy spending a lot of time on and I really like using Leadwerks' map editor to create a "model" out of CSG and call it a day. The problem I have with doing this is that if I make something like a simple airplane I end up having a group of like 6-8 CSG objects that I have to put a script (usually blank) on every single CSG just to get the stupid thing to move as one piece. I've tried Blender(way too fancy, learning curve), Sketchup(so so awkward) and Milkshape3d(seems like a glorified file converter). I couldn't get any of those to do what I want. Does anyone know of a 3d modeling program that would be as simple and easy as Leadwerks' editor that could dump out an FBX (or something that could be converted to FBX)? There was a suggestion post that Leadwerks include an option to save CSG to an MDL but it didn't happen.
-
I've used that links like that before but with friends-only visibility the game does not appear in the Steam Games page (http://www.leadwerks.com/werkspace/page/steamgames). Is the only work around to make the item public? I opened the workshop item page for my game, got the fileid out of the url and used that as the fileid in the link you gave me (http://www.leadwerks.com/werkspace/page/viewitem?fileid=626762660). It appears that the item information is not made available, and there is no play button. However if I click "view in steam client" the game page will load within steam but that still only gets me a subscribe button. Have you thought about graying out the friends-only visibility option since it is not functional?
-
I tried uploading my game with friends only visibility but the game wasn't listed in my friend's Game Launcher. They are able to subscribe to the game by going through my profile and it downloaded the content. Or maybe there is an alternate way to launch it? Also it'd be nice if there was a section in game launcher that was "Subscribed".
-
Mouse - Control a Ship ( Like in Asteroids 3D )
thehankinator replied to Slastraf's topic in Programming
The first thing I would try (actually the second, the first sucked) would be to position the mouse in the middle of the screen, then using Window:GetMousePosition() get the x/y delta, follow that with a Window:SetMousePosition() (same way that FPSPlayer gets the delta). Then I would create a Vec3, with delta x/y in it with z for the speed. You could then use that Vec3 with Entity:AddForce() (maybe Entity:PhysicsSetPosition() if you add the Vec3 to the current ship position, not sure which would work best) on the ship. Gotta make the camera follow the ship also, could be done by making the camera a child of the ship or something but I don't think that's what you are asking about. There might be an easier way to do it, I'd be curious what others come up with. EDIT: Had to rethink the speed part. -
Using Variable from one Script in another Script
thehankinator replied to Husarenkiller's topic in Programming
I assume that Waypoint1 is the name of one of the entities which an X or an O can be placed. In order for TicTacToeCam to call functions on your Waypoint script you would need to do something like this: At the top of TicTacToeCam add: Script.Waypoint1 = nil --Entity Next, find your TicTacToeCam entity, go to the script properties and from the Scene tab drag your Waypoint1 entity to the "Waypoint1" entry in the Script tab. Finally change Feld1 = Waypoint1.Script:MyPosition() to(note "self." and lower case "s" in Script: Feld1 = self.Waypoint1.script:MyPosition() Check out this tutorial on script properties: http://www.leadwerks.com/werkspace/page/tutorials/_/script-properties-r20 As far as finding the position in relation to the mouse cursor check out the Camera:Pick() function: http://www.leadwerks.com/werkspace/page/api-reference/_/camera/camerapick-r199 -
Post your script. Also if you are checking to see if the player is intersecting a pivot, that could be the problem. A pivot is really small and your player would have to be standing exactly on top of it. Typically I make a clear box with the collision type of "Trigger", that way there is plenty of space for the player to intersect with.
-
When I am sculpting the terrain and make a mistake, undo reverts the last change I made before the sculpt not the sculpt operation. Is this a known issue?
-
You can adjust textures by selecting the face. Check out the "Painting Brush Faces" section in this tutorial: http://www.leadwerks.com/werkspace/page/tutorials/_/materials-r7
-
Starting my first map (without a tutorial!)
thehankinator replied to TerraformerX's topic in General Discussion
Addons are installed in each project they are used in. If disk space a concern, you can delete the items in the addon that you do not need for your game. You could also use a hacky symbolic link/junction to eliminate duplicating the addons but I wouldn't recommend it. -
I think it would simplify the problem to combine RPGCamera.lua into RPGPlayer.lua. This way you can have one spot where you do the MouseHit() check. Also RPGCamera.lua calls GoTo() on RPGPlayer.lua, should be GoToPoint().
-
Leadwerks 4: C++ error: reference to 'Window' is ambious
thehankinator replied to tipforeveryone's topic in Programming
Undefined reference sounds like a linker problem. Have you verified you are linking to the Leadwerks library? Maybe post the whole build log. -
You could put it in Leadwerks.h but a header file that mucks with the defines and macros in Windows.h(and it's friends) without the programmer knowing will spread the undef to anything that includes Leadwerks.h which could lead to some undesired effects. It'd be frustrating to try to use GetFileType() exactly how MSDN says to then try to use it and the compiler says what the hell is GetFileType()? This kind of workaround should be isolated to the smallest area possible imo, perhaps even moved to a .cpp file. At the end of the day this is a poor design choice by Microsoft and this is one of the weird things that occasionally come up in software on Windows. I think a better solution would have been to use a typedef rather than a define but it's far too late in the game for Microsoft to change it if it would even work with all the edge cases they have to meet.
-
I don't have standard edition so I could be wrong but in Windows API GetFileType(defined when windows.h is involved) is a macro for GetFileTypeA() or GetFileTypeW() which is a problem because the Leadwerks API unfortunately uses the same function name for FileSystem::GetFileType(). The C++ preprocessor would dump GetFileTypeA or GetFileTypeW anywhere you have the text GetFileType. So FileSystem::GetFileType() would become FileSystem::GetFileTypeA() (or FileSystem::GetFileTypeW()) and cause a compile time error. By saying #undef GetFileType you are telling the preprocessor not to do the awkward mess above.
-
In steam library, right click on it and select "delete local content". After it's done, right click on it again and select install.
-
Update: *Boss wave! *Added visual feedback for hits with bullet *Start with pistol in addition to machete *Reworked spawn rate and points awarded *Reworked scoreboard display *Added new blood splatter *Zombies run slower The game balance needs work. I think it's partly the map design but also the nature of traps. The game may need to change at a fundamental level to allow balance. Next major feature could be a campaign/story mode, I've some ideas.
-
Download here: https://drive.google.com/file/d/0B8AlYY49_v2bdm0wWmctVm1sRVU/view?usp=sharing I deleted the Addon directory from the zip, hopefully that doesn't mess it up more than it already is. Try commenting/uncommenting the different prefabs starting on line 35 in Scripts/Game/Survival.lua. Also try shooting over the heads of the crawlers, the framerate drags for about 10secs after each shot.
-
I made this FPS simple ticker script to get a better idea of how long and often the frame rate drops. It's pretty rudimentary but works. Just call FPSTicker(). Red line = 0FPS, Yellow line = 30FPS. Horizontal lines are every 60 frames. http://steamcommunity.com/sharedfiles/filedetails/?id=583506145 EDIT: Good god why does the forum always butcher code formatting? #The Hankinator's Ticker of FPS function FPSTicker() if ticker_fps_data == nil then ticker_fps_data = {} end context:SetBlendMode(Blend.Alpha) --vertical bars context:SetColor(0.25,0.25,0.25,1) for i=1,5 do context:DrawLine(60 * i, 0, 60 * i, 60) end --horizontal bars context:SetColor(1,1,0,1) context:DrawLine(0, 30, 300, 30)--30fps context:SetColor(1,0,0,1) context:DrawLine(0, 60, 300, 60)--0fps --performance data context:SetColor(1,1,1,1) table.insert(ticker_fps_data, Time:UPS()) for i = 2, #ticker_fps_data do context:DrawLine(i-1, 60-ticker_fps_data[i-1], i, 60-ticker_fps_data[i]) end if #ticker_fps_data > 300 then table.remove(ticker_fps_data, 1) end end
-
After changing the zombie prefab I am noticing that the framerate drops to 30fps for about 10 seconds after shooting over the head of the zombie(same with crawler but not as bad). Seems like it has to do with the World:Pick in FPSGun.lua, doesn't make sense that it continues to drop the FPS for 10seconds or so afterward, not should that call be that expensive right? As a sanity check I ran the First Person Shooter tutorial with no modifications at all. Seems like I am hitting 30fps pretty often. So maybe I am just chasing my tail here? I have a Radeon 6870(by no means a high performance card anymore) but I know the scene in the tutorial is far less complicated than say something like Killing Floor 2 (which runs fine). So what's the deal? AMD's implementation of OpenGL? Leadwerks Engine? Something else? I took some screenshots from the tutorial, does anyone else see fps drop in the same places? Garage flashlight on: At the control panel, flashlight OFF, did not yet activate control panel: