Title: Zombie killing hack- doesn't work at all Post by: Simius on 2008 December 26, 10:31:55 Okay, I've been getting better at simpe. But I haven't quite gotten my zombie hunter... to be able to kill zombies. I imagine I am doing something extremely wrong, but for the life of me, I can't figure out what. :-[
So far, I've scrapped the idea of killing the zombie after fighting it. That is too hard. So instead I am just going to have my zombie killer automatically kill any zombies he gets close to. No animations or anything fancy like that yet... The only problem is, he doesn't ever kill any zombies. (Actually, once the zombie died, but I'm not sure if it was my hack that did it or what... and if it is my hack then I am doing something wrong since I want the zombie to die any time the zombie hunter walks by, not just once in a blue moon.) Anyway, I've uploaded what I've got done so far. I'll explain what I tried to do with each line of code... let me know if it is doing what I think it is... or what I need to do to get it to do what it is supposed to. 0x0 select a sim 0x1 is the sim doing anything right now? (Either way, move onto the next part of the code... but I might make it so the zombie killer only kills zombies if he isn't busy doing something else once I get the rest of it to work) 0x2 Check in the sims inventory. Does he have the fancy mess item? If so, he is a zombie killer so move onto the next step... if not, end. (Object ID: 0x7f3e900f) 0x3 Check to see if there is anyone near the sim. If so, select that sim and move onto the next step. If not, end. 0x4 That sim we just selected... Is he a zombie? If so move onto the next step. If not, end. 0x5 and on... Kill that sim. I got this code from selecting 'append bhav' and selecting "Kill Sim" So I imagine this should work, although who knows? That's it. But... my zombie who lives with my zombie killer just won't die like she is supposed to. Any ideas of what I am doing wrong? ??? I'm heading up to MN for a week to visit the folks... So I probably won't reply til I come back... don't take my lack of response as anything other than I am away from my keyboard though. Thanks! :) Title: Re: Zombie killing hack- doesn't work at all Post by: jolrei on 2008 December 27, 04:32:06 I'm still not sure why you don't just download Paladin's assault rifle or something like it, and just have your zombie killer waste them. It sounds like a lot of work to make a hack that will automagically kill zombies whenever your sim goes near them, without any animations at all, when it would be more amusing to have him blast them with the rifle.
Title: Re: Zombie killing hack- doesn't work at all Post by: Simius on 2008 December 27, 07:49:32 I could do that, but I'd much prefer it to be autonomous. More importantly if I'm ever going to figure out how to make mods, I might as well start with this one... Since I don't think it is too complicated. (even though it is apparantly way over my head atm)
When I get the core of it figured out, then I'll move on to add stuff to make the mod more playable such as animations/only killing after fights/maybe a custom object/options to make vampire slayers etc/awarding $$ to the zombie slayer whenever he hunts down a zombie/whatever other tweaks I can think of. Right now I'm more concerned about learning which steps I'm missing that is making it so it never actually kills anyone. My long term goal is to make a zombie slayer career... and have the career award object being the zombie slayer token. But, baby steps, baby steps. Title: Re: Zombie killing hack- doesn't work at all Post by: rufio on 2008 December 27, 20:22:00 Would it be possible to just make the assault rifle autonomous? Of course, you'd have to make it so that it couldn't be used on non-zombies, too, unless you wanted your zombie-killer to actually be a serial killer.
Title: Re: Zombie killing hack- doesn't work at all Post by: Marhis on 2008 December 28, 00:19:17 Okay, I've been getting better at simpe. But I haven't quite gotten my zombie hunter... to be able to kill zombies. I imagine I am doing something extremely wrong, but for the life of me, I can't figure out what. :-[ Looking at your code, the first problem is that you modded the wrong BHAV: in short, you addeded the instructions to a "guardian" bhav, the one that checks if a sim can do the Socialites gesture (guardian BHAVs often has the word "TEST" in their name). That kind of BHAV only has to answer true or false so the corresponding "action" bhav will run (true) or not (false). If your code were working, the only result you could have would be that your zombie killer will go "kiss kiss darling" any zombie he meets... lulzy, but I guess not exactly what you're expecting :D. That couple of BHAVs (action and guardian) work more or less in this way, in their original form (and yes, I feel flattered ;D):
If the result is TRUE, then the action BHAV is called, and performs its instructions. Usually those BHAVs have the same name of the guardian, minus the "TEST" word. In this original BHAV, the instructions merely launch the social (which is an object, with its own GUID), and then it's this "social object" that comes to life and goes on, doing whatever its instructions dictate (all the bunch of animations and effects of the socialites' gesture). The action flows more or less in this way:
I know that this project (the zombie killer routine) should be indipendent, but at least in the early stages of work you could go on modding this routine (the socialites greet), so you can always know what's happening while you test it. If you're a newbie in modding probably this could be a good compromise for testing: a replacement of an already existing routine. If I'm not mistaken, I guess it's your original idea, too. In conclusion, I would suggest you to experiment with those BHAVs: mod the guardian bhav so it only checks if the fancy stuff is in inventory, leave the action bhav alone (it only launches the social, whatever it is), extract the "Social - greet - kiss kiss darling" in the Object Workshop (it's under the "unknown" category) as a clone, with NO custom group ID, and then look at its parts: menu, Bhavs, constants, etc; those are probably the real things you'll have to mod. I hope I made some sense. Title: Re: Zombie killing hack- doesn't work at all Post by: Simius on 2008 December 28, 09:53:56 Thanks Mahris. I think you've pointed me in the right direction so when I get home I'll be able to try again... and hopefully I'll get it to work. (Maybe the zombie hunter will even end up giving the zombie a kiss-kiss of death before killing it... in your honor, of course).
Thanks again. |