icantevenname

Registered Users
  • Content count

    86
  • Joined

  • Last visited

Everything posted by icantevenname

  1. I've posted a question here about giving a character I'm working on a crit rate. Someone responded, asking if I wanted the crits to apply to the character, the character when using ranged weapons, or to a custom item I want to give to my character. I asked about it applying to ranged weapons and the custom item, figuring that the two values would stack and encourage players to craft and use it. But it's been a month and I haven't gotten a response. I might as well ask again. Oh, and I also need to know how to make it impossible and to guarantee the crits for testing.
  2. Ranged would be ideal, if not, then any attack. I also plan on giving her craftable spines to attack with. Maybe those could get their own crit rate?
  3. Now that I'm finished with the Chomper, I've moved onto the PvZ Cactus. Since she's the plant team's sniper in Garden Warfare, I feel that a good way to simulate headshots is by giving her random critical hits. Again, I have no idea how to do this, can I get some help? Also, can you tell me how to program it to always and never get crits to make sure it's working?
  4. Works like a charm! Thanks for all the help!
  5. The whole toolless-and-naturally-tree-chopping thing for my Chomper mod was a bust. But I still wanna give him something to have him stand out. Having him gain hunger from killing things should do the trick. Though, I don't know how to do that. Any help?
  6. It still crashes... Though, I looked through Wathgithr's prefab and found this local function IsValidVictim(victim) return victim ~= nil and not ((victim:HasTag("prey") and not victim:HasTag("hostile")) or victim:HasTag("veggie") or victim:HasTag("structure") or victim:HasTag("wall") or victim:HasTag("companion")) and victim.components.health ~= nil and victim.components.combat ~= nil end I think that's missing from the code given to the Chomper.
  7. Here ya go. chomper.lua
  8. I have it like this local function onkilled(inst, data) local victim = data.victim if not inst.components.health:IsDead() and IsValidVictim(victim) then local total_health = victim.components.health:GetMaxWithPenalty() local hunger_steal = inst.hunger_steal or 0.1 inst.components.hunger:DoDelta(hunger_steal*total_health) end end local function master_init(inst) inst:ListenForEvent("killed", onkilled) inst.hunger_steal = 0.1 --Percent of the victim's max health that's converted into hunger end If this isn't enough, I could attach the prefab file.
  9. Actually, turns out you can't attack trees directly. Not even with the Force Attack key.
  10. I'm currently working on a mod of the PvZ Chomper. I decided to make it so that it's impossible for him to use tools/weapons while having 5 times the normal attack power and able to chop trees and mine rocks naturally. The attack power is simple enough, but everything else I have no clue about. If it's impossible to get him to chop and mine without tools, then how do I make it so he can't use weapons?
  11. Never knew that. Thanks for th' tip.
  12. Everythin' works! Thanks for stickin' around to help me!
  13. Think it's possible to give characters text to say when doing certain emotes?
  14. I see. I figured out what was wrong, but the emotes with variants still don't have a reaction. Which makes me sad, since Dance is one of those emotes... Emote react.zip
  15. I keep running into this if I have more than three lines on any character. It also doesn't seem to work with emotes that have variations.
  16. Now to make everyone say "GET DOWN WITH YOUR BAD SELF!" upon dancing.
  17. I always seem to be looking in th' wrong direction...
  18. I keep looking at the code I have in the modmain and what you told me originally. I still don't see what I did wrong. I need some elaboration.
  19. Thanks for the tip.
  20. I want to add a craftable healing turret for my Sunflower mod. I bet I can figure it out using the eyeturret lua as a reference point, but I have no idea how to make an item caftable and craftable by a specific character.
  21. So to make it not require a science tier, do I leave out the TECH? And is the TOWN tab the Survival tab?
  22. I'll keep that in mind. It's okay now, I managed to get it working.
  23. Is it possible to increase a character's attack power as they go insane? And speaking of insanity, is it possible to totally drain a character's sanity when using a wormhole?
  24. Thanks for the answer, but I can't use this now. Since the autocompiler isn't even compiling the character I'm working on. Can you or anyone you know help? Nevermind, somehow I made it work again.