- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Stop interaction from getting auto cancelled and interrupted.
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Stop interaction from getting auto cancelled and interrupted.
Replies: 8 (Who?), Viewed: 1344 times.
#1
4th Jul 2020 at 9:12 PM
Posts: 1,500
Thanks: 4283 in 41 Posts
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?
Advertisement
Field Researcher
#2
5th Jul 2020 at 4:30 PM
Posts: 224
Thanks: 996 in 7 Posts
Can you post the code from the Run() method of your interaction?
#3
5th Jul 2020 at 5:09 PM
Posts: 437
Thanks: 5337 in 22 Posts
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
If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
#4
5th Jul 2020 at 5:11 PM
Posts: 1,500
Thanks: 4283 in 41 Posts
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.
The main question is how to make an interaction uncancellable.
#5
5th Jul 2020 at 10:40 PM
Posts: 1,500
Thanks: 4283 in 41 Posts
Oh sorry @gamefreak130 didn't see your reply. Think we posted at the same time. I will try your suggestion. Thank you.
#6
6th Jul 2020 at 4:16 AM
Posts: 1,500
Thanks: 4283 in 41 Posts
This is working @gamefreak130 thank you.
#7
6th Jul 2020 at 9:59 AM
Posts: 3,860
Thanks: 8561 in 67 Posts
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; |
#8
6th Jul 2020 at 10:53 PM
Posts: 562
Thanks: 3603 in 11 Posts
^^ should go in the code snippet cave!
#9
7th Jul 2020 at 5:44 AM
Posts: 437
Thanks: 5337 in 22 Posts
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
If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
Who Posted
|