Jump to content

Rick

Members
  • Posts

    7,936
  • Joined

  • Last visited

Everything posted by Rick

  1. Rick

    Leaderboards

    Am I reading it right then that when ran from inside the LE Editor it doesn't put a suffix on and so if we have this leaderboard code in 3 different games they'd all share the same leaderboard (assuming we named them the same and ran it from the editor)?
  2. Rick

    Leaderboards

    I believe this is Steam stuff not LE stuff here. Leadwerks is just exposing the Steam API to do this. You'd have to talk to Steam and I doubt they would change this process
  3. Rick

    Leaderboards

    You should be able to store whatever you want, but you'd have to "bastardize" the system to do that. In other words if you wanted to store how many enemies the player killed you have to make a separate leaderboard for that. I was thinking of something like that where my leaderboard names would be game.stat like: "MyGame.Score" "MyGame.EnemyKills" "MyGame.CoinsCollected"
  4. Were you collapsing things and deleting things? I've noticed in the past that collapsing functions then deleting the collapse function would cause all sorts of problems.
  5. Rick

    Vegetation Part 3

    So what's the downside to this method...j/k
  6. When you pass functions around you can't pass it like that. You are basically passing function "pointers" which requires the object 'self' then the function self.EndAttack. The alternative method for calling table functions in lua is: obj.func(obj) == obj:func() This is why when you are in a table function you can use 'self' to refer to the table itself. Behind the scenes Lua passes the obj as the first parameter and names that first parameter 'self' when you call it with : : is only syntax sugar for calling functions not passing them around. This will give you an error: Person = {} Person.PrintName = function() print("Rick") end test = Person:PrintName test() This won't Person = {} Person.PrintName = function() print("Rick") end test = Person.PrintName test()
  7. Rick

    Leaderboards

    How many scoreboards do we get? This looks like it could possibly be a way to save some game data for our game player games too Saying this because we need to be able to save data somewhere for gameplayer games. 2 for seconds? What does that mean? How is a second not numeric?
  8. Rick

    Leaderboards

    How does SetScore() know what player to set that score for?
  9. This will have less to do with the language and more to do with the structure of your code. At a 5 second glance I don't know why that should matter, but I haven't dug that deep into what you have.
  10. @YouGroove that reminds me of the game Rampage. Monsters and those buildings.
  11. Put a System:Print() inside end animation and see if it's getting called too soon.
  12. function AnimationManager:SetAnimationSequence(sequence, speed, blendtime, mode, specialFrames, specialFrameHook, endHookScript, endHook, endFrame) Add 1 more parameter which is the last frame count value. Ideally the AnimationManager script would not require that parameter and use this function to get it automatically instead but it doesn't at this time: http://www.leadwerks.com/werkspace/page/api-reference/_/entity/entitygetanimationlength-r70
  13. This sounds like your logic is reverting the animation back to something else before your animation is finished playing. This gets into states of your game type of logic. Or put a System:Print() inside your end animation function to see if that's getting called too quickly. I thought you needed to put the end frame number in SetAnimationSequence() but I could be wrong on that. Something to check out. Look at the function to see what it's parameters are.
  14. Shadmar created that shader already. We used it in DA.
  15. Rick

    The Borrower

    Thanks for feedback yougroove. About your first point the name of the game reflects what is happening. You are magic and you borrow the elements. After they are shot they go back because you only borrowed them. We will look at the other things you mentioned.
  16. Rick

    The Borrower

    Wait until you see our next puzzles in the works I find that I really enjoy creating puzzle functionality. Coming up with puzzles can be hard but once we have them, making them actually happen is pretty rewarding.
  17. Yeah, I didn't create 2 posts . Must have been a forum hiccup or something.
  18. Interesting when I do it as the first line in Main.lua I don't get random numbers. Actually even in Start() I'm not getting random numbers. function Script:Start() math.randomseed(Time:Millisecs()) -- get random numbers and set the materials for our children self.combo = {} self.combo[1] = Math:Round(Math:Random(0, 9)) self.combo[2] = Math:Round(Math:Random(0, 9)) self.combo[3] = Math:Round(Math:Random(0, 9)) self.combo[4] = Math:Round(Math:Random(0, 9)) end Looks like I'll have to use Lua's math.random() with this as LE's must use something different where doing Lua's seeding doesn't work. I figured LE's Math:Random() was just using Lua's math.random() but I guess not
  19. Rick

    The Borrower

    Wanted to make a forum post to keep track of any thoughts/comments people had around the game. Available in the LE Game Launcher http://www.leadwerks.com/werkspace/page/viewitem?fileid=527801322
  20. Rick

    Character Sketches

    If it's an enemy then right #2 I think is the most enemy like given the classic bad guy mask. The others actually look more like good guys. For a good guy left #3 is ideal I think.
  21. I was doing this in Script:Start(). I could use this and hack around it, but LE really needs to expose some way to do a real seeding of it's random numbers. Thanks for the idea shadmar.
  22. I don't see a seeding function in Math. How can I seed the random generator? Normally I would use: math.randomseed(os.time) but in sandbox mode you can't use 'os' object. Passing Time:GetCurrent() really doesn't help since it's the running time of the app. I'm stuck with the same numbers each run atm.
  23. I don't see a seeding function in Math. How can I seed the random generator? Normally I would use: math.randomseed(os.time) but in sandbox mode you can't use 'os' object. Passing Time:GetCurrent() really doesn't help since it's the running time of the app. I'm stuck with the same numbers each run atm.
  24. Tools->Options->uncheck Sandbox Lua. Note this means your game won't work in the LE Game Launcher app then.
×
×
  • Create New...