|
| Author | Message |
---|
TGAP-Trixie
Member Title : Trixie does not even... Posts : 273 Join date : 2014-04-17
| Subject: I'm clueless Sat Jun 14, 2014 6:39 am | |
| I'm trying to script a card with the effect: "During your opponent's main phase, you can special summon this card (from your hand). When this card is special summoned, destroy all pendulum summoned monsters on the field." Code in the spoiler - Spoiler:
- Code:
-
function c60000088.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,0x1c0+TIMING_MAIN_END) e1:SetRange(LOCATION_HAND) e1:SetCondition(c60000088.sccon) e1:SetTarget(c60000088.sctarg) e1:SetOperation(c60000088.scop) c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetTarget(c60000088.target) e2:SetOperation(c60000088.operation) c:RegisterEffect(e2) end function c60000088.sccon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) end function c60000088.sctarg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,nil,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function c60000088.scop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end local g=Duel.GetMatchingGroup(Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,nil,c) if g:GetCount()>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,1,1,nil) Duel.SpecialSummon(tp,sg:GetFirst(),c) end function c60000088.filter(c) return bit.band(c:GetSummonType(),SUMMON_TYPE_PENDULUM)~=0 end function c60000088.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=Duel.GetMatchingGroup(c60000088.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end function c60000088.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(c60000088.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) end end
I get maybe 10 error messages saying 6 parameters are needed. I know little to nothing about what it could possibly need :S. |
| | | overcold_ice
Member Title : Overfrost! Posts : 21 Join date : 2014-06-02
| Subject: Re: I'm clueless Mon Jun 16, 2014 1:03 am | |
| Post a pic where everyone can see the error messages, or write them here. It totally helps everyone that gonna helps you, and it helps you because you helped everyone that helped you. In the end, you helped yourself that have helped everyone else that helped you. |
| | | TGAP-Trixie
Member Title : Trixie does not even... Posts : 273 Join date : 2014-04-17
| Subject: Re: I'm clueless Mon Jun 16, 2014 4:33 am | |
| So much helpfulness. And actually it was way more than 10... after I scrolled down that is. I don't see the need to post a screen of that but here you go. - Hmmm:
And yes, for as far as I could scroll, they all say the same thing. It's the script for "During your opponent's main phase" (e1 effect and functions related to it) that's causing that I'm sure. I took all that out, tried to simply use the "When this card is special summoned" effect to destroy pendulum monsters. That didn't work... but all I got was the simple "attempt to call error function" at least. (I don't know why that wouldn't work though, I copied it from fossil dyna, changed it from flip to SS success, and the type to destroy as pendulum). |
| | | outlaw1994
Admin
Member Title : Red-Eyes Lord Posts : 797 Join date : 2013-07-09 Age : 30 Location : bundaberg qld australia
| Subject: Re: I'm clueless Mon Jun 16, 2014 9:29 am | |
| try this i cant test as i have no pc atm so please test and tell me any errors you get - Code:
-
function c60000088.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,0x1c0+TIMING_MAIN_END) e1:SetRange(LOCATION_HAND) e1:SetCondition(c60000088.sccon) e1:SetTarget(c60000088.sctarg) e1:SetOperation(c60000088.scop) c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetTarget(c60000088.target) e2:SetOperation(c60000088.operation) c:RegisterEffect(e2) end function c60000088.sccon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) end function c60000088.sctarg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(e:GetHandler(),tp,LOCATION_HAND,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND) end function c60000088.scop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tp,e:GetHandler(),REASON_EFFECT) end function c60000088.filter(c) return bit.band(c:GetSummonType(),SUMMON_TYPE_PENDULUM)~=0 end function c60000088.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=Duel.GetMatchingGroup(c60000088.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end function c60000088.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(c60000088.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) end |
| | | overcold_ice
Member Title : Overfrost! Posts : 21 Join date : 2014-06-02
| Subject: Re: I'm clueless Mon Jun 16, 2014 5:14 pm | |
| this: - Code:
-
if g:GetCount()>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,1,1,nil) Duel.SpecialSummon(sg:GetFirst(),0,tp,tp,false,false,POS_FACEUP) --Duel.SpecialSummon(tp,sg:GetFirst(),c) <- requires 6 parameters end
You helped yourself by helping me that help you. So, keep helping yourself by helping those that wants to help you. (I helped myself by repeatedly saying helps, and it helps you afterwards; which actually helped myself also, and helped you in the end.) I love those helps. xD So helpful. |
| | | TGAP-Trixie
Member Title : Trixie does not even... Posts : 273 Join date : 2014-04-17
| Subject: Re: I'm clueless Tue Jun 17, 2014 2:10 am | |
| OK outlaw, will do. I should've mentioned I copied the SS during opp's main phase bit from formula synchron I suppose. I don't know if maybe some of what I copied got cut off, in any case, if outlaw's doesn't work I'll arbitrarily put in paramaters as if I know what any of them do xD. EDIT: @Outlaw Still an error at line 27 [Script Error:] [string "./script/60000088.lua]:27 Paramater 1 should be "function". ^ whatever the problem, this is what's not letting it be summoned during the opps turn I would say. And when I special summoned it from the GY with monster reborn, it destroyed itself as well as the pendulum summoned monsters. As entertaining as that was, I do want it to stay on the field to punish players using pendulum monsters . Final edit: It's actually just destroying all special summoned monsters, regardless of it checking for pendulum summoned monsters. I just tried this against hieratics and it destroyed su. Don't worry about that for now, let's just try to figure out the special summon on opps turn. |
| | | outlaw1994
Admin
Member Title : Red-Eyes Lord Posts : 797 Join date : 2013-07-09 Age : 30 Location : bundaberg qld australia
| Subject: Re: I'm clueless Tue Jun 17, 2014 8:58 pm | |
| try this should stop that error - Code:
-
function c60000088.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,0x1c0+TIMING_MAIN_END) e1:SetRange(LOCATION_HAND) e1:SetCondition(c60000088.sccon) e1:SetTarget(c60000088.sctarg) e1:SetOperation(c60000088.scop) c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetTarget(c60000088.target) e2:SetOperation(c60000088.operation) c:RegisterEffect(e2) end function c60000088.sccon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) end function c60000088.sctarg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND) end function c60000088.scop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tp,e:GetHandler(),REASON_EFFECT) end function c60000088.filter(c) return bit.band(c:GetSummonType(),SUMMON_TYPE_PENDULUM)~=0 end function c60000088.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=Duel.GetMatchingGroup(c60000088.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end function c60000088.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(c60000088.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) end |
| | | TGAP-Trixie
Member Title : Trixie does not even... Posts : 273 Join date : 2014-04-17
| Subject: Re: I'm clueless Wed Jun 18, 2014 4:04 am | |
| Error at line 31 and 7 paramaters are needed That would be the middle line in this function c60000088.scop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tp,e:GetHandler(),REASON_EFFECT) end It doesn't special summon itself but the option to attempt to now exists. I'll be looking at other cards that can special summon themselves due to their own effect to see if I can't fix this on my own. EDIT: OK this was quick. I used this in place of the line that gave me an error. Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) Obviously the destroying all special summoned monsters bit still happens but I blame that on percival for treating pendulum summons as special summons . |
| | | outlaw1994
Admin
Member Title : Red-Eyes Lord Posts : 797 Join date : 2013-07-09 Age : 30 Location : bundaberg qld australia
| Subject: Re: I'm clueless Wed Jun 18, 2014 5:57 am | |
| Lol I will look into pendulum summon part when I get my PC back |
| | | TGAP-Trixie
Member Title : Trixie does not even... Posts : 273 Join date : 2014-04-17
| Subject: Re: I'm clueless Thu Jun 19, 2014 2:36 am | |
| Maybe in the next update the answer will be there, or it'll be fixed so the system checks for monsters special summoned through a pendulum summon, rather than categorizing both as the same thing. |
| | | Sponsored content
| Subject: Re: I'm clueless | |
| |
| | | |
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| Who is online? | In total there are 2 users online :: 0 Registered, 0 Hidden and 2 Guests None Most users ever online was 270 on Sun Apr 11, 2021 4:35 pm |
Latest topics | » Goodbye allMon Aug 08, 2016 7:53 pm by Zenas» [PLEASE READ] [VERY IMPORTANT] MACKPRO REVIVALMon Aug 08, 2016 7:47 pm by Zenas» D.D. Dragons vs KozmosSun Jul 10, 2016 11:02 pm by cane_63106» Where's everyone?!Sat May 28, 2016 2:58 am by cane_63106» Mech Archetype (crappy it be, maybe you guys would like it)Sun May 15, 2016 1:11 pm by barti02» My Assassin ArchetypeSun May 15, 2016 1:10 pm by barti02» SO I have a "NEW ARCHETYPE THE "WolfPack"Sun May 15, 2016 12:35 pm by barti02» Fusion monster doesn't appear in extra deck? Sat Apr 30, 2016 9:02 pm by Marc1» Mackpro update 10/6/2015Sat Apr 02, 2016 6:36 pm by Hulkty» Bionicle Cards AKA Japanese Children's Cardgames on Swedish Toy RobotsSun Mar 06, 2016 9:37 am by Utso |
|