YGOPRO Forum

Welcome Guest! To enable all features please try to register or login.
Options
Go to last post Go to first unread
MVPIII  
#1 Posted : Tuesday, June 11, 2019 5:59:56 PM(UTC)
MVPIII

Rank: Advanced Member

Joined: 2/7/2014(UTC)
Posts: 268

Thanks: 27 times
Was thanked: 24 time(s) in 22 post(s)
I need help with this monster card's attribute effects. It's meant to be LIGHT attribute during your turn and DARK during your opponent's turn, however, it seems to only be applying the dark attribute, even if I summoned it during my turn with wild monster appears.

I've tested everything else and that all works (had to use dna transplant to change its attribute to light). It's just that part that's having issues.

Effect in the spoiler, highlighted text is the problem text, as usual.




Code Below. The issue should be in e3 and e4 and with lightcon and darkcon.



Any help is appreciated.
pyrQ  
#2 Posted : Tuesday, June 11, 2019 9:07:31 PM(UTC)
pyrQ

Rank: Advanced Member

Joined: 4/4/2017(UTC)
Posts: 529
Greece

Thanks: 3 times
Was thanked: 95 time(s) in 93 post(s)
I'm not sure (didn't test or anything), but try using "e:GetHandlerPlayer()" instead of "tp" in the condition functions for those 2 effects. It might be the case that the condition of such an effect doesn't have "tp" as a default parameter (might be "(e,c)" or something).
thanks 1 user thanked pyrQ for this useful post.
MVPIII  
#3 Posted : Wednesday, June 12, 2019 12:42:02 AM(UTC)
MVPIII

Rank: Advanced Member

Joined: 2/7/2014(UTC)
Posts: 268

Thanks: 27 times
Was thanked: 24 time(s) in 22 post(s)
Yes, that worked. Not sure why it worked only for dark the previous way but oh well. It's fixed now, thank you :)
pyrQ  
#4 Posted : Wednesday, June 12, 2019 5:28:12 PM(UTC)
pyrQ

Rank: Advanced Member

Joined: 4/4/2017(UTC)
Posts: 529
Greece

Thanks: 3 times
Was thanked: 95 time(s) in 93 post(s)
It worked only for the dark before because the "tp" in that function was just the second parameter, so if the "default" is "(e,c)" (just my guess in this example) then the "tp" used in the comparison would actually be "c". With that in mind, "return Duel.GetTurnPlayer()~=tp" would always return true, while "return Duel.GetTurnPlayer()==tp" would always return false.

Edited by user Wednesday, June 12, 2019 5:31:20 PM(UTC)  | Reason: Not specified

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error