PDA

View Full Version : How to delete an Interaction?


Cytron
24th Oct 2008, 9:50 AM
Hello,

I created a own NPC with a own Main (BHAV).
I want that the NPC don't have contact with other sims (global interactions) or objects.
But I have a problem with the Fire. The NPC run to the fire and he has panic.
Same problem with the instant meal. A Sim "call to meal everyone" and the npc has a "eat"-icon.

How can I delete an Interaction in the NPC-Main?

I tried "[prim 0x0002] Expression (My 0x0057 (Disable All Interactions) := Literal 0x0001)" and "[prim 0x0002] Expression (My person data 0x006E (Interactions Linked Deleted) := Literal 0x0001)", but it don't work.. :(

Echo
24th Oct 2008, 12:31 PM
You don't want him to be able to run any interactions at all? Or do you still need some set of them? If you don't want them at all, set the Disable All Interactions to stop other sims trying to talk to them, then go into Main and bypass all the functions to do with processing the queue. The interactions may still get queued up in their to-do list, but they'll never actually get run. :)

Cytron
24th Oct 2008, 1:36 PM
Thank you for your answer :).
The interactions may still get queued up in their to-do list, but they'll never actually get run. :)
The NPC has this in the to-do-list, too. And then the NPC do nothing anymore (he stop his own main, too). The Interaction-Icon is forever in the to-do-list, as long as I cancel it manually. After I cancel it, the NPC run his own main again.
And that is my problem, I want the NPC cancel an Interaction himself..


(i'm so sorry for my english, I hope you understand what I mean :blink: )

Echo
25th Oct 2008, 12:30 PM
So are you pushing an interaction onto the NPC, then using the queue to run it? Is it possible to call the interaction directly from the sim's main, or is it an interaction on another object? Maybe if you explained what you're trying to make it might help? :)

Numenor
25th Oct 2008, 1:23 PM
And then the NPC do nothing anymore (he stop his own main, too).)
Maybe in your Main BHAV there is a "Wait for notify" that should bypassed?

Also, what about the priority of the actions contained in the Main? Is it set to maximum?
Add something like:
- [prim 0x0002] Expression (Stack Object ID 0x0000 := My 0x000B (object id))
- [prim 0x0002] Expression (Stack Object's person data 0x0021 (Priority) := Const 0x013C:0x06 ("Max" Value: 0x005A))
- [prim 0x0002] Expression (Stack Object's person data 0x0047 (non-interruptible) := Literal 0x0001)

This won't prevent your NPC to see external interactions pushed on its queue, but it shouldn't halt its own Main any more, at least.

Cytron
25th Oct 2008, 6:11 PM
@Echo, Numenor thank you for your answers :)
@Numenor, thank you for the codes, I think it works now! He don't stop his own main now. Thanks again :) :)!