Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Little help with interaction - Unit should resurrect Unit2 and kill itself.  (Read 684 times)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist

I dont like to admit it, but I hit a dead end. After 15 tries I cant get it to work... maybe because its late.

What I am trying to do is this: A unit resurrects another unit, and dies. So unit A is killed. unit B sees that, and sacrifices itself to resurrect unit A.

I tried with this:
Code: [Select]
[INTERACTION:BOB_RESSURECT]
   [I_SOURCE:CREATURE_ACTION]
   [I_TARGET:A:CORPSE]
      [IT_LOCATION:CONTEXT_ITEM]
      [IT_AFFECTED_CREATURE:HERMIT:MALE]
      [IT_AFFECTED_CREATURE:HERMIT:FEMALE]
      [IT_REQUIRES:FIT_FOR_RESURRECTION]
      [IT_FORBIDDEN:NOT_LIVING]
      [IT_CANNOT_HAVE_SYNDROME_CLASS:RESSURECT]
      [IT_MANUAL_INPUT:corpses]
   [I_EFFECT:RESURRECT]
      [IE_TARGET:A]
      [IE_IMMEDIATE]
      [SYNDROME]
      [SYN_NAME:revival shock from resurrection]
      [SYN_CLASS:RESSURECT]
      [CE_BODY_TRANSFORMATION:START:0:END:1]
         [CE:CREATURE:WILL_O_WISP_LFR:FEMALE]
              [CE_CAN_DO_INTERACTION:START:0]
               [CDI:TARGET_RANGE:A:100]
               [CDI:INTERACTION:HALLUCINATE_IMAGINARY]
               [CDI:MAX_TARGET_NUMBER:A:1]
               [CDI:VERB:KILLS:KILLS:NA]
               [CDI:TARGET_VERB:disappears with a sad but knowing smile on his face:disappears with a sad but knowing smile on his face.]
               [CDI:WAIT_PERIOD:400600]

The resurrection part works fine. But Unit B, the one who resurrects the other, does not die. to make sure he dies, I wanted to give Unit A (the one who is resurrected) the ability to insta-kill him. See INTERACTION:HALLUCINATE_IMAGINARY

Code: [Select]
[INTERACTION:HALLUCINATE_IMAGINARY]
   [I_SOURCE:CREATURE_ACTION]
   [I_TARGET:A:CREATURE]
      [IT_LOCATION:CONTEXT_CREATURE]
            [IT_AFFECTED_CREATURE:HERMIT:IMAGINARY]
      [IT_FORBIDDEN:NOT_LIVING]
      [IT_CANNOT_HAVE_SYNDROME_CLASS:HALLUCINATE_IMAGINARY]
   [I_EFFECT:ADD_SYNDROME]
      [IE_TARGET:A]
      [IE_IMMEDIATE]
      [SYNDROME]
         [SYN_CLASS:HALLUCINATE_IMAGINARY]
            [IT_AFFECTED_CREATURE:HERMIT:IMAGINARY]
        [CE_BODY_TRANSFORMATION:PROB:100:START:0]
[CE:CREATURE:HALLUCINATION:INTERMEDIATE]

It should turn Unit B, who is a HERMIT:IMAGINARY to a hallucination, a creature with a bodytemp that kills it by itself. But it doesnt transform.

If someone sees an error, or knows a better way to do this, I am all ears.

It appears that the second part of the syndrome, the can_do_interaction is not applied... maybe because the target at that specific moment is still a corpse?
Code: [Select]
         [CE_CAN_DO_INTERACTION:START:0]
               [CDI:TARGET_RANGE:A:100]
               [CDI:INTERACTION:HALLUCINATE_IMAGINARY]
               [CDI:MAX_TARGET_NUMBER:A:1]
               [CDI:VERB:KILLS:KILLS:NA]
               [CDI:TARGET_VERB:disappears with a sad but knowing smile on his face:disappears with a sad but knowing smile on his face.]
               [CDI:WAIT_PERIOD:400600]
« Last Edit: August 09, 2014, 07:49:04 pm by Meph »
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile

Just a shot in the dark, but does the imaginary unit have [NOT_LIVING]?

I'm just guessing that that may be why the unit isn't being killed, as the interaction has [IT_FORBIDDEN:NOT_LIVING]
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist



I'll let you know if it fixed it, but yes, it had NOT_LIVING.

Edit: Nope, still doesnt work.
Edit2: Turned out it was because I was tired. The unit did INTERACTION:RESURRECT the entire time, not the BOB_RESURRECT I made. Which I changed 15 times, genning world, testing, and wondering why nothing worker. Yeah me.
« Last Edit: August 10, 2014, 08:25:56 am by Meph »
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::