Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Scholar
Original Poster
#1 Old 4th Jul 2020 at 9:12 PM
Default Stop interaction from getting auto cancelled and interrupted.
So I made it so that my witch can use some spells on burglars. But when she tries to cast the spell, the burglar panic interaction will come and automatically cancel the spell. Eventually if you keep cancelling the panic and clicking the interaction it does happen. But I would like to make it so that the interaction can't be cancelled.

How can I do this?

If you like my mods. Consider supporting me on Patreon
Check out my website for updates on my mods and other work PuddingFace.wixsite.com
Check out my Youtube channel for tutorials(modding tutorials) and other content Youtube

Follow me on Twitter Instagram Pinterest Tumblr
Advertisement
Field Researcher
#2 Old 5th Jul 2020 at 4:30 PM
Can you post the code from the Run() method of your interaction?
Space Pony
#3 Old 5th Jul 2020 at 5:09 PM
Quote: Originally posted by PuddingFace
So I made it so that my witch can use some spells on burglars. But when she tries to cast the spell, the burglar panic interaction will come and automatically cancel the spell. Eventually if you keep cancelling the panic and clicking the interaction it does happen. But I would like to make it so that the interaction can't be cancelled.

How can I do this?


Your custom interaction is overriden by the burglar reaction because the reaction is set to be a high priority, so all other default-priority interactions before the reaction are automatically canceled. To work around this, you'll need to make your interaction high priority by adding the following to your interaction's class:

Code:
using Sims3.Gameplay.Interactions;

public override void Init(ref InteractionInstanceParameters parameters)
{
    parameters.Priority = new InteractionPriority(InteractionPriorityLevel.High);
    base.Init(ref parameters);
}


If you also wanted to make it uncancellable by the player, add this at the beginning of the Run() method:

Code:
CancellableByPlayer = false;

"The Internet is the first thing that humanity has built that humanity doesn't understand, the largest experiment in anarchy that we have ever had." - Eric Schmidt

If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
Scholar
Original Poster
#4 Old 5th Jul 2020 at 5:11 PM
I will post it on a while but I don't think my interaction's run method is the problem. The burglar panic interaction is designed to cancel out other interaction similar to fire panic. My vampire mod's interactions are cancelled too. As well as interactions added by other mods.

The main question is how to make an interaction uncancellable.

If you like my mods. Consider supporting me on Patreon
Check out my website for updates on my mods and other work PuddingFace.wixsite.com
Check out my Youtube channel for tutorials(modding tutorials) and other content Youtube

Follow me on Twitter Instagram Pinterest Tumblr
Scholar
Original Poster
#5 Old 5th Jul 2020 at 10:40 PM
Oh sorry @gamefreak130 didn't see your reply. Think we posted at the same time. I will try your suggestion. Thank you.

If you like my mods. Consider supporting me on Patreon
Check out my website for updates on my mods and other work PuddingFace.wixsite.com
Check out my Youtube channel for tutorials(modding tutorials) and other content Youtube

Follow me on Twitter Instagram Pinterest Tumblr
Scholar
Original Poster
#6 Old 6th Jul 2020 at 4:16 AM
This is working @gamefreak130 thank you.

If you like my mods. Consider supporting me on Patreon
Check out my website for updates on my mods and other work PuddingFace.wixsite.com
Check out my Youtube channel for tutorials(modding tutorials) and other content Youtube

Follow me on Twitter Instagram Pinterest Tumblr
Virtual gardener
staff: administrator
#7 Old 6th Jul 2020 at 9:59 AM
Quote: Originally posted by gamefreak130
Your custom interaction is overriden by the burglar reaction because the reaction is set to be a high priority, so all other default-priority interactions before the reaction are automatically canceled. To work around this, you'll need to make your interaction high priority by adding the following to your interaction's class:

Code:
using Sims3.Gameplay.Interactions;

public override void Init(ref InteractionInstanceParameters parameters)
{
    parameters.Priority = new InteractionPriority(InteractionPriorityLevel.High);
    base.Init(ref parameters);
}


If you also wanted to make it uncancellable by the player, add this at the beginning of the Run() method:

Code:
CancellableByPlayer = false;
Ahh so that's what that is! Thanks for sharing this!
Senior Moderator
staff: senior moderator
#8 Old 6th Jul 2020 at 10:53 PM
^^ should go in the code snippet cave! 
Space Pony
#9 Old 7th Jul 2020 at 5:44 AM
Quote: Originally posted by zoe22
should go in the code snippet cave! 


Done

"The Internet is the first thing that humanity has built that humanity doesn't understand, the largest experiment in anarchy that we have ever had." - Eric Schmidt

If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
Back to top