Jump to content

Diogeno

Member
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Diogeno

  1. I'm not quite sure that i understood but if I use DrawString to get them ingame i get the same result(their values never change):
  2. I was able to use the lua debugger but it does nothing or at least I'm not able to use it. I can see the experimental reload file but nothing more. Any help with that is much appreciated. A pic of it: About the funtiontions, as you can see on the screenshot i'm trying to call getName, getDamage etc but they always their initialization(1, null, 0 etc.). Anyone knows what i'm doing wrong? function printT() local player = getSpecificPlayer(0); local health = player:getName(); print("Name"); print(health); local age = player:getAge(); print("Age"); print(age); endEvents.OnKeyPressed.Add(printT);Thank you
  3. Thank you for your reply. If I use string.format("%f",playerH) to see the float value, it just shows 1.0000 or 0.0000 an not something like 0.8 or 0.5. I probably need to check the code better
  4. Hello survivors, I just recently started to put my hands on the lua language, knowing a bit of C and Java and I would like to ask your modus operandi for modding Project Zomboid. Let me explain(and please correct me if I write monstruosity): I'm writing simple .lua where I add items, change values etcetc. and i'm doing it reading both the Javadoc (http://theindiestone.com/zomboidjavadocs/) and the events that i found here(http://pz-mods.net/guide/event-reference/). When I change something and I want to test it with the game opened, I save the .lua, disable the mod in the game menu' and then enable it again and load a save to see the changes. The problem is that the whole thing is time consuming since sometimes I do not know the use of what is in Javadoc, sometimes events don't work as I think they should and my way of testing the whole thing looks to me a lot unprofessional. A simple example of what I mean: I was using the event OnWeaponSwingHitPoint (in that site is written that it "Triggers when the player succesfully attack and hit a zombie") and I was interpreting it something like " OnHit && OnAttack" while it was "OnHit || OnAttack" . I decided then to try something else and i wanted to see on the screen without opening a window the health value of the player. I looked for something userful in the javadoc and found getHealth(). I used it on the player but it was showing only 1 when alive and 0 on death and not a value for the health(10, 100, 1000) and it means that i probably took the wrong method. This is why I'm asking: what am i doing wrong in my way of doing things or is there a simpler way to work for a mod ? And since I'm opening a topic, if it is not a problem to ask, how can i get the health of the player? Thank you
  5. I just wish to thank you for your tutorials; I read all of them and I'm enjoying modding so far thanks to them
  6. For no reason Holding shift doesn't work for me while repeatedly pressing it works. Hope it helps someone.
×
×
  • Create New...