Jump to content

Core

Members
  • Posts

    139
  • Joined

  • Last visited

Everything posted by Core

  1. Ah yes, that's it! Thank you very much.
  2. I'm not sure what has happened, but I noticed that text, that used to bee nice to look at and clear, is now somehow bugged. Here is example pic attached. You notice that in "Switch" (at the center of the screen) letters are not in line and spaces between them are not even. It looks generally bad. It was not like this before. What did I do?
  3. Ok, I got it Thank you again @GorzenDev , @Josh and others for your help! One question remains and sorry if I'm pushing it, I really tried to solve this on my own... But where should I change font of the menu items? I allready tried to load font in main.lua World:Render, and again it almost works, but it only shows new font AFTER mouseover or mouse klick. I also tried adding Redraw() right after creating menu objects, but it strangely worked only with first menu object (Resume Game). Edit. Ok, I got it working, needed to add SetFont to World:Create() too.
  4. Thank you very much for seeing all that trouble to explain, I appreciate it. Sometimes I can be thick headed :), but I think I got it, going to fiddle with the menu this evening!
  5. Ah, ok. But how would you add button or panel normally, never done that and I didn't find tutorials. Adding Pivot to the scene and script to that pivot? Do I have to add pivot for every button/panel I want to add to the menu? Like I said, I'm noob... I would love to get away with just editing current menu to my needs to keep everything menu-related as simple as possible. Edit. Yup, will post screenshot when I get this figured out! It is somewhat important step for me mentally. And thank you so much for the help so far!
  6. Thanks, but both of those crashed the map right from the start! I tried them in Panel.lua inside function Script:Draw().
  7. Here, Should read Celeste Incident, but transparent background hides the first half because text is white. Clicking image shows how it supposed to look.
  8. Here is what I have now, done like described above with falults described above:
  9. I'm just trying to show my game name, one image on the background of the game menu. Simple as that. Since I'm still noob with lua or any coding, I might and do lack some very basic concepts, so this might be very simple, but for me it is not. Yet. So, I have not touched on panel.lua. This also puzzles me, Panel.lua, Main.lua or Menu.lua do not have function Script:PostRender(context). I learned that all images, text etc. are drawn on to screen inside that.
  10. Ok, I added this to the main.lua, before context.Sync: if gamemenu:Hidden() ~= true then context:SetBlendMode(Blend.Solid) context:DrawImage(Texture:Load("Materials/Screens/TitleScreen1b.tex"),0,0,gfxmode.x, gfxmode.y) end IT somewhat works, I have my background, but it has yellowish tint and when mouse cursor enters over a menu item, image flashes, like I can see true colors for a tenth of a second. I tried to mess with menu.lua's backgroundcolor, but no luck. Am I even at the ball park?
  11. Thank you again for quick response, will try that!
  12. I have a hard time (again) understanding new concepts. Let's start simple. If I want to add background image to the new ingame menu, where exactly I would do it in menu.lua?
  13. Sorry. Did not mean to upset you. Regarding the question, in editor, create cube that covers the area where you want to trigger the animation or other event. Then in cubes appearance tab, choose invisible material and from physics tab, select collision type to be trigger. Then create lua script, when player collides with cube, animation is played.
  14. Regarding this and your other questions, I recommend you go through the official tutorials if you haven't allready. Then, look from youtube some tutorial videos about lua scripting. I recommend for example Aggrors Project Saturn video series, I learned a ton from them, how scripting works, and I have good foundation to learn more. I was complete lua noob and new to modern game design until earlier this year. So best advice, start going through some tutorials and soon you have an idea how to apply thinhgs you've learned in your own project.
  15. I'm actually planning very similar thing in my scifi game and decided skip this visually, because of the amount of work it needs. Basically you need to have a model and maybe some animations for your arms and model for every tool you are planning to have. Then create a script that moves your arms out of the view and switch model when you change tool etc. I decided to leave arms out, maybe even 3d models of the tools and have them only inventory items, so when you have a tool in your hand, on hud you can see icon of that tool and maybe its name, but no hands or even a model. Pretty old school way, but it is much, much easier to handle this way. But I'm pretty new with game making and just on the beginning of my learning journey, so I choose targets that are easy enough for me to accomplish.
  16. You can edit displaysettings in main.lua script.
  17. These certainly look awesome! I wonder what is the prize range of those packages...
  18. To hide assets in editor, select them in the scene tab, and click Hidden to true in assets appearance tab. But agree, filter would be nice.
  19. And moving on to another task. I've tried to find info about this but still have no clue. So, where to start if I would like to display animations/interactive text on the surface of 3d object? And it should be almost instant, like "type text from keyboard and display it in real time" instant. Is it possible?
  20. I think Josh mentioned somewhere that kinematic joints are ment to replace those commands and allthough they can still be used, it is adviced to use new ones. That is the reason they are removed from the reference.
  21. Thanks, did that. Thanks, going to check them out. But currently I'm actually quite happy, the following script does almost exactly what I hoped! It works and hovering looks cool. I need to add some wall proximity checks etc, but basically it is complete... But is there something I should know about writting a good code? This is actually my first script I started from scratch, before I have only customized allready working scripts to suit my needs. Still very new with this stuff, so I would appreciate if bad habits or other bad stuff in this script would be pointed out! Especially the part in the code with Entitys rotation. I use Point function, but also SetInput, where I need to set angle also. So basically I set entitys angle (rotation) twice, but it was the only way to get this working like I wanted. --Setup variables Script.enabled = true--bool "Enabled" Script.target = nil--entity "Target" Script.accurateFollowRange = 6 Script.stopRange = 3 Script.targetDistance = nil Script.position = nil Script.maxaccel=0.5 Script.speed = 0 Script.realSpeed = nil Script.rotSpeed = 0.05 Script.angle = nil Script.text5 = "CART" --string "Content Msg." Script.started = false --Thruster Control -- Script.altitudeLow = nil Script.altitudeHigh = nil Script.altitudeOptimal = nil Script.thrustForce = Vec3(0,0,0) Script.coldStart = true --Thruster Control -- --Message Timer-- not in use atm Script.messagetimecount = 0 Script.messagetime = 1000 --int "Message Time" function Script:Start() self.speed = 0 self.entity:FindChild("Jet1"):Hide() self.entity:FindChild("Jet2"):Hide() self.entity:FindChild("Radiator1"):Hide() self.entity:FindChild("Radiator2"):Hide() self.entity:FindChild("HeadLight"):Hide() self.entity:FindChild("Heathaze1"):Hide() self.entity:FindChild("Heathaze2"):Hide() end function Script:UpdatePhysics() --Update entity data self.realSpeed = self.entity:GetVelocity(true) self.targetDistance = self.entity:GetDistance(self.target) self.position = self.entity:GetPosition() self.angle = self.entity:GetRotation() --Ground proximity picks local pickInfo = PickInfo() self.altitudeLow = self.entity.world:Pick(self.position, Vec3(self.position.x,self.position.y-0.5,self.position.z),pickInfo) self.altitudeHigh = self.entity.world:Pick(self.position, Vec3(self.position.x,self.position.y-0.55,self.position.z),pickInfo) self.altitudeOptimal = self.entity.world:Pick(self.position, Vec3(self.position.x,self.position.y-0.6,self.position.z),pickInfo) --Main movement and hover control if self.started == true then self.entity:Stop() self.entity:AddForce(self.thrustForce) self.entity:SetInput(self.angle.y,self.speed,0,0,false, 0.5, 0.5, true, self.rotSpeed) --Follow close, more accurate if self.targetDistance > self.stopRange and self.targetDistance < self.accurateFollowRange then self.entity:Stop() self.speed = 1 self.entity:Point(self.target, 2, Time:GetSpeed() * self.rotSpeed) end --Follow far if self.targetDistance > self.accurateFollowRange then self.entity:Follow(self.target,self.speed,self.maxaccel) end --Stop when near player if self.targetDistance < self.stopRange then self.entity:Stop() self.speed = 0 end -- Altitude control if self.altitudeLow == true and self.coldStart == false and self.realSpeed.y < 0.3 then self.thrustForce.y = 0.43 else self.thrustForce.y = 0.42 end if self.altitudeHigh == false then self.thrustForce.y = 0.41 self.coldStart = false else self.thrustForce.y = self.thrustForce.y + 0 end end end --Start/Stop function Script:Use(player) if self.started == true then self.started = false self.thrustForce.y = 0 self.speed = 0 self.entity:FindChild("Jet1"):Hide() self.entity:FindChild("Jet2"):Hide() self.entity:FindChild("Radiator1"):Hide() self.entity:FindChild("Radiator2"):Hide() self.entity:FindChild("HeadLight"):Hide() self.entity:FindChild("Heathaze1"):Hide() self.entity:FindChild("Heathaze2"):Hide() else self.started = true self.coldStart = true self.entity:FindChild("Jet1"):Show() self.entity:FindChild("Jet2"):Show() self.entity:FindChild("Radiator1"):Show() self.entity:FindChild("Radiator2"):Show() self.entity:FindChild("HeadLight"):Show() self.entity:FindChild("Heathaze1"):Show() self.entity:FindChild("Heathaze2"):Show() end end Now, I'm off to continue to learn csg and level design, fun stuff! Might pick up one of those scifi texture packs... Allready bought Scifi Interior Construction Kit. And here is a shot of the "CART" inventory carrier. This is a great mile stone in my game making "career", I have built a small test scene with csg, learned the basics of 3d modeling and imported my own, self painted and textured model inside a game engine and scripted it to work! Nothing can stop me now
  22. Ok, I had accidentaly duplicated my mesh over it self. Removed doubles and everything is fine again.
×
×
  • Create New...