Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Kenneth Nyström

  • Content Count

  • Joined

  • Last visited

Everything posted by Kenneth Nyström

  1. I am having trouble saving "prefabs" as "the "Leadwerks" engine" doesnt make a meta file when I save a prefab: and as such when I open the prefabfolder containing a file that does not have a .meta counterfile "the engine" crashes (and messes big time with my Windows) I even had to reinstall Windows a few times because of some corrupted files: and now i cant save prefabs at all.
  2. Am I correct in assuming one need add //lua to the following C++ "external dependencies" isteamuserstats.h line 88 class ISteamUserStats and make it class ISteamUserStats//lua to expose the class and to line 90 public: .... add say .... static void SetAchiv1()//lua ........ as activator. ........... or do one need do that in like the header files section? ........... or even the source section? ...................... the code from line 88: isteamuserstats.h .................... class ISteamUserStats { public: // Ask the se
  3. Hello; I am trying to figure out how to use the following in a Windows based environment; and I think I have gotten down to the code I want activated in/thru the c++ as: ....................... class MySingleton { public: static void SetAchiv1() { set_steam_achievement ("FINISHED_AREA_1"); } }; ................. = when I use in Lua the below .................. MySingleton::SetAchiv1(); .................. I would (example) activate set_steam_achievement ("FINISHED_AREA_1") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; However I am a bit confused in how to
  4. Q: Is there a way to call a C++ script from a Lua script? and if that is possible; how does one call a Lua script from within a C++ script? ................................ Any pointers appreciated im thinking; if that I can at the end of a level, have LUA script ask for a C++ script that triggers a Steam Achivement and after that either calls the desired in game map or if nedded restart the entire game (this is a viable option for me; but not desirable if avoidable)
  5. Its the basic "player" script that comes with Leadwerks...so really no need to attach the script...
  6. I have the exact same question....and I get the steam partner thingy part... and that I have to use Microsofts; Visual studio but there is an multitude of versions of M: VS.. which one is the correct? (I think I have figured out how the code must look like) But what program to use is the next step? and how do I reach the Leadwerks C++ stuff. Is it just to start M: VS and find your correct script and type in the code? cant find the preexisting scripts I want (re)written with/in C++.. within M: VS. (I know this is outside Leadwerks) but does someone know how to find the files?
  7. Yeah this solved it; (thought I had put it under that in atleast 4 variants) Thank you (and the other commenters) for the assistance,
  8. Yes that is exactly what I thought it would be, but somehow it doesnt work. (head began spinning after hours of it not working althou it looked like it should be working) will go bk and look at it again now after an nights sleep, but yeah it looks like I originally thought... hmm. and I pretty much used the basic "player" template that leadwerks comes with with no major changes.
  9. Hello: need assistance to figure out a small script (to use within the "basic" player script) to give my own player damage when pressing a certain key: OR Just using a keyhit (Key.U) to trigger a respawn (within the "player script) ( to have the player be able to get out of situations they are stuck in or have fallen thru the map) .......................... I thought the below would be enough...but I cant get it to work: (my Health amount is 100: and I tried using the script.hurt) ................. if window:KeyHit(Key.U) then script:hurt (100) end end ........... I al
  10. Yeah I am thinking as small as possible; I only really need 1: what map was the player on: 2: optional------------(the position) (more then enough with just the normal: map-spawn- in-point) 3: two table values; thats cruicial to the "where in the game progress the player is" 4: save to disk 5 load when game starts. But I am absolutly CLUELESS where to begin. = I cant get anything to even begin make sense without a starting point where the save scripts is to be put. (there are no tutorials to be found) I can (in my mind) see how I only need like 5 or 6 lines of code to m
  11. So I have been putting this step off for some time. "the save function." ... I have this basic idea how and where it should be implemented: But the Leadwerks "index" for the save function is to say the least lacking regardng the "SaveData" and "LoadData" so I am actully stuck in my endevours to proceded with my game´s save/load function. Especially the part with how to "save" the map: one is currently on within the game, so when the load funtion is activated. the "correct" map is loaded, I strongly suspect: "SetCurrent" & "GetCurrent" (world) is the way to go.
  12. Wonderful, (thank you) now I just need the time (real life makes it a it cramped atm to put in a hard think/analysing session to look into it...=) But pretty soon so.
  13. Both; Thank you for your inputs. and yeah I thought the same way with working around the problem (acctully a very good thing); taught me alot of useful "stuff" while dealing with the LUA code. I really only have one last issue with the coding I will soon dive into: Hmm I could just ask you guys (without starting yet one more thread): making the code for saving, map/position/rotation/tables is there a good place to begin lookin @? (didnt find the info in the "index" (could be there; this is just me just getting to that stage of/in the programming)
  14. Hmm I tried it -- and several alternatives to SetMass thruout the kill/respawn part of the script. still same result in the game crashing. Only wierd i can see is that the Output says. "process complete" Without having reached the loading bit of the ChangeMap script it usully does... Hmm. I perhaps I need find a "never" version of the respawn bit in the script (using lesson 27 of the LW tutorial) and it has worked great until now when it messes with the changemap script... Hmm. Anyone can point me in a direction for an alternative place/tutorial for a wie
  15. Gamecrash; due to kill/respawn script changes/removes??? a value that is used within the default "TriggerChangeMap.Lua" script My suspiscion atm...have had like 20 other ideas before:what it might be (not working); Is that the respawn script is missing something (but My skill isnt yet up to that level yet so i can see what is missing. If that is the case. (yes im suspecting there is missing an "if" statement but not sure) (I have gotten to the point I cant keep track of all my ideas flying around what it might be) = time to ask: ------------------------------------------------------
  16. Question 1: How to set a script so if a global value is <= an object "always" stays hidden. (been fiddling around with various alternatives (gettng clearly better as I can debunk to a certian level now) Having it difficult to identify what keywords makes an object "remain" toggled hidden or shown if I map/area swap and then later returns to the same (hub) map ... I suspect it is done with an global value : Say: Deactive = nil ..... later/another "trigger script" changes the value when "triggered" ........ Deactivate = 1 ..... In the Object in question
  17. Yeah I found it after I posted it Hence why i changed it to resolved in title.
  18. Q:time What script code "word" is the one that makes one switch from one map to another?
  19. WOW that was fast...and it worked... TY I never even thought of looking at the word End...ok that was a lesson learned.
  20. So I am moving along with this video tutorial series # 25 checkpoint manager @ around 1143: on YT to get the hang of the basics. but I get a '=' expected near 'function' (on the 6th line from end: function Script:GetCheckpointPosition() I cant figure out why it isnt working. (pretty sure I have followed the instructions right) triple checked the text... ------------------------------------------------- Script.defaultCheckpoint = "" --entity "Default checkpoint" Script.currentCheckpoint = nil function Script:Start() if self.defaultCheckpoint == nil then
  21. So I have tried and tried and tried; to change an objects mass thru a script. I basicly want to have an trigger (activate) "change" a mass in a diffrent object thru two scripts I have done and redone this so many times my head is spinning so hard ; I cant figure this out now. (I kid u not spent 20 hours to try solve this on my own) ............. trigger script be like: set the "global" value with getmass=2 ..... object script if getmass=2 then SetMass (5) ........
  • Create New...