Playr10 Posted September 30, 2020 Share Posted September 30, 2020 I've been messing around with [ EVENT.END_TURN ] = function( self, minigame, negotiator ) if negotiator == self.negotiator then self.anti_negotiator:RemoveModifier("PANG", 99, self) end and several other different variations, but I can't get the inception to disappear before the enemy's turn starts Link to comment https://forums.kleientertainment.com/forums/topic/122131-how-do-you-make-an-inceptionmodifier-get-destroyed-the-moment-the-player-ends-their-turn/ Share on other sites More sharing options...
Newbiespud Posted September 30, 2020 Share Posted September 30, 2020 Weird question, just checking because I fell prey to this mistake before, but if the file is loading with no crashes yet the event function isn't showing any signs of working... did you remember to put the event_handlers = { } wrapper around your event functions? Also, if you want to make all of a specific modifier go away, instead of putting in 99 for the stacks (which I don't actually know if it will cause unintended behavior or not) you can instead plug self.anti_negotiator:GetModifierStacks("PANG") into the function. EDIT: Or is the issue that it's not happening fast enough? I don't know why it wouldn't. Tried [ EVENT.END_PLAYER_TURN ] = function( self, minigame )? Link to comment https://forums.kleientertainment.com/forums/topic/122131-how-do-you-make-an-inceptionmodifier-get-destroyed-the-moment-the-player-ends-their-turn/#findComment-1376032 Share on other sites More sharing options...
u lil nerd Posted September 30, 2020 Share Posted September 30, 2020 Try [ EVENT.END_PLAYER_TURN ] and yeah before you try anything else see if you forgot to put the events in event handlers Link to comment https://forums.kleientertainment.com/forums/topic/122131-how-do-you-make-an-inceptionmodifier-get-destroyed-the-moment-the-player-ends-their-turn/#findComment-1376066 Share on other sites More sharing options...
Playr10 Posted September 30, 2020 Author Share Posted September 30, 2020 Normal.mp4 This is with [ EVENT.END_TURN ] = function( self, minigame, negotiator ) if negotiator == self.negotiator then self.negotiator:RemoveModifier("PANG", 99, self) end end, underneath PANG StalwartPlayerTurn.mp4 This is with [ EVENT.END_PLAYER_TURN ] = function( self, minigame, negotiator ) if negotiator == self.negotiator then self.anti_negotiator:RemoveModifier("PANG", 99, self) end end, under Core Argument, but it did nothing and Pang's code removed itself instead through testing, it seems that END_PLAYER_TURN doesn't work at all in either spots, and won't remove Pang no matter what. Link to comment https://forums.kleientertainment.com/forums/topic/122131-how-do-you-make-an-inceptionmodifier-get-destroyed-the-moment-the-player-ends-their-turn/#findComment-1376128 Share on other sites More sharing options...
RageLeague Posted September 30, 2020 Share Posted September 30, 2020 If you put that code under pang, since it is an inception, the negotiator of it is the opponent rather than you. However, you want it to remove it at the end of player turn, so you need to do something like this: [EVENT.END_TURN] = function(self, minigame, negotiator) if negotiator == self.anti_negotiator then self.negotiator:RemoveModifier(self) end end and put it under the pang code. note: RemoveModifier can take a modifier instance instead of a string, and it will remove that modifier instance by the amount of stacks provided, or remove all stacks on that modifier, removing it completely in the process. Link to comment https://forums.kleientertainment.com/forums/topic/122131-how-do-you-make-an-inceptionmodifier-get-destroyed-the-moment-the-player-ends-their-turn/#findComment-1376135 Share on other sites More sharing options...
Playr10 Posted September 30, 2020 Author Share Posted September 30, 2020 It seems to remove faster but still removes after argument damage has been dealt, how do I stop that? 2020-09-30 10-55-08.mp4 Link to comment https://forums.kleientertainment.com/forums/topic/122131-how-do-you-make-an-inceptionmodifier-get-destroyed-the-moment-the-player-ends-their-turn/#findComment-1376139 Share on other sites More sharing options...
RageLeague Posted September 30, 2020 Share Posted September 30, 2020 You can add a priority so that it is executed the last. Something like event_priorities = { [ EVENT.END_TURN ] = 99, }, under the modifier def. If you want it executed first, then set it to -99 or some low values. however, if you want it only apply to cards, you can do something like this: [ EVENT.CALC_PERSUASION ] = function( self, source, persuasion ) if is_instance( source, Negotiation.Card ) then -- something happens end end, Link to comment https://forums.kleientertainment.com/forums/topic/122131-how-do-you-make-an-inceptionmodifier-get-destroyed-the-moment-the-player-ends-their-turn/#findComment-1376141 Share on other sites More sharing options...
Playr10 Posted September 30, 2020 Author Share Posted September 30, 2020 So I'll need my arguments to also be based off an event to move it's priority below removing Pang right? When I replaced OnEndTurn with [EVENT.END_TURN] = function(self, minigame ) self:ApplyPersuasion() end, it doesn't even activate anymore and I'm not sure why Link to comment https://forums.kleientertainment.com/forums/topic/122131-how-do-you-make-an-inceptionmodifier-get-destroyed-the-moment-the-player-ends-their-turn/#findComment-1376146 Share on other sites More sharing options...
RageLeague Posted September 30, 2020 Share Posted September 30, 2020 you need to put it under the field event_handlers instead of a direct replacement. Link to comment https://forums.kleientertainment.com/forums/topic/122131-how-do-you-make-an-inceptionmodifier-get-destroyed-the-moment-the-player-ends-their-turn/#findComment-1376148 Share on other sites More sharing options...
Playr10 Posted September 30, 2020 Author Share Posted September 30, 2020 forgot that little detail, seems to work now, thanks Link to comment https://forums.kleientertainment.com/forums/topic/122131-how-do-you-make-an-inceptionmodifier-get-destroyed-the-moment-the-player-ends-their-turn/#findComment-1376150 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.