More Awesome Than You!
Welcome, Guest. Please login or register.
2024 November 22, 13:51:55

Login with username, password and session length
Search:     Advanced search
540287 Posts in 18067 Topics by 6545 Members
Latest Member: cincinancy
* Home Help Search Login Register
+  More Awesome Than You!
|-+  TS2: Burnination
| |-+  The Podium
| | |-+  Zombie killing hack- doesn't work at all
0 Members and 1 Chinese Bot are viewing this topic. « previous next »
Pages: [1] THANKS THIS IS GREAT Print
Author Topic: Zombie killing hack- doesn't work at all  (Read 4371 times)
Simius
Exasperating Eyesore
*
Posts: 240


View Profile
Zombie killing hack- doesn't work at all
« on: 2008 December 26, 10:31:55 »
THANKS THIS IS GREAT

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.  Embarrassed

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?  Huh


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!  Smiley


* Simiuszombiekiller.package (0.98 KB - downloaded 170 times.)
Logged
Count
jolrei
Senator
*
Posts: 6420


Son of Perdition


View Profile
Re: Zombie killing hack- doesn't work at all
« Reply #1 on: 2008 December 27, 04:32:06 »
THANKS THIS IS GREAT

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.
Logged


Tribulatio proxima est
Simius
Exasperating Eyesore
*
Posts: 240


View Profile
Re: Zombie killing hack- doesn't work at all
« Reply #2 on: 2008 December 27, 07:49:32 »
THANKS THIS IS GREAT

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.
Logged
rufio
Non-Standard
Uncouth Undesirable
****
Posts: 3030


More Nonstandard Than You


View Profile WWW
Re: Zombie killing hack- doesn't work at all
« Reply #3 on: 2008 December 27, 20:22:00 »
THANKS THIS IS GREAT

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.
Logged

I was thinking about these things and I am a feminist.

Baron
Marhis
Terrible Twerp
****
Posts: 2145


ISTP. Officially male since she plays MUDs


View Profile
Re: Zombie killing hack- doesn't work at all
« Reply #4 on: 2008 December 28, 00:19:17 »
THANKS THIS IS GREAT

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.  Embarrassed

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  Cheesy.

That couple of BHAVs (action and guardian) work more or less in this way, in their original form (and yes, I feel flattered Grin):

  • (guardian): do this sim belong to family 0x7FDF (Socialites)?
       
    • If yes ----> run action BHAV [result: TRUE]
    • If not ----> do this sim has the fancy stuff object in inventory?
               
      • if yes ---> run action BHAV [result: TRUE]
      • if not ---> result: FALSE
             
In your case, this guardian BHAV only has to check if there's the object in inventory: true or false; nothing more, nothing less.


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:

  • Guardian (TEST) BHAV
       
    • result: FALSE
                 
      • nothing happens. End of the action.
                 
           
    • result: TRUE
               
      • Action BHAV is called
                         
        • Action BHAV launches the Social with GUID 0xD4FC3DAD
                                 
          • The Social (object with GUID 0xD4FC3DAD)
                                           
            • The Social tells the sim to go in front of other sim, then do the animation, then make the other sim do a corresponding gesture, etc.
                                         
                               
                     
         

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.
Logged

I say that a wise, when he does not know what he is talking about, should know enough to keep his mouth shut. -- C. Collodi, Pinocchio.
------
The one and only Rhayden's AIDE. Accept no substitutes.
Simius
Exasperating Eyesore
*
Posts: 240


View Profile
Re: Zombie killing hack- doesn't work at all
« Reply #5 on: 2008 December 28, 09:53:56 »
THANKS THIS IS GREAT

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.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.08 seconds with 19 queries.