YGOPRO Forum

Welcome Guest! To enable all features please try to register or login.
Options
Go to last post Go to first unread
Fireworks27  
#1 Posted : Sunday, February 12, 2017 1:36:15 AM(UTC)
Fireworks27

Rank: Newbie

Joined: 4/13/2016(UTC)
Posts: 24

Thanks: 10 times
Once per turn: If you control a face-up "X"(archetype) monster; you can special summon this card from your hand. While you control no monsters you can Special Summon this banished card in face-up attack position.

I'm still new to this pls forgive my ignorants but I tried :wall. I tried copying Junk Servant and Photon Thrasher, but the effect doesn't even activate at all.

Code:

function c14921.initial_effect(c)
--Special Summon
    local e1=Effect.CreateEffect(c)
    e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
    e1:SetCode(EFFECT_SPSUMMON_PROC)
    e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
    e1:SetRange(LOCATION_HAND)
    e1:SetCondition(c14921.spcon)
    c:RegisterEffect(e1)
--Special Summon Banished
    local e2=Effect.CreateEffect(c)
    e2:SetType(EFFECT_TYPE_FIELD)
    e2:SetCode(EFFECT_SPSUMMON_PROC)
    e2:SetRange(LOCATION_REMOVED)
    e2:SetCondition(c14921.spcon)
    c:RegisterEffect(e2)
end
function c14921.filter(c)
    return c:IsFaceup() and c:IsSetCard(0x83b0)
end
function c14921.spcon(e,c)
    if c==nil then return true end
    return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
        Duel.IsExistingMatchingCard(c14921.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c14921spcon(tp,c)
    if c==nil then return true end
    return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0
        and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c14921.atcon(e)
    return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>1
end

Edited by user Sunday, February 12, 2017 1:49:25 AM(UTC)  | Reason: Not specified

E☆HERO Pit Boss ~<3
andre060  
#2 Posted : Sunday, February 12, 2017 2:36:02 AM(UTC)
andre060

Rank: Advanced Member

Joined: 6/23/2016(UTC)
Posts: 427

Thanks: 53 times
Was thanked: 67 time(s) in 63 post(s)
Originally Posted by: Fireworks27 Go to Quoted Post
Once per turn: If you control a face-up "X"(archetype) monster; you can special summon this card from your hand. While you control no monsters you can Special Summon this banished card in face-up attack position.

I'm still new to this pls forgive my ignorants but I tried :wall. I tried copying Junk Servant and Photon Thrasher, but the effect doesn't even activate at all.

what work and what don't work?
poi
Fireworks27  
#3 Posted : Sunday, February 12, 2017 1:00:04 PM(UTC)
Fireworks27

Rank: Newbie

Joined: 4/13/2016(UTC)
Posts: 24

Thanks: 10 times
Originally Posted by: andre060 Go to Quoted Post
Originally Posted by: Fireworks27 Go to Quoted Post
Once per turn: If you control a face-up "X"(archetype) monster; you can special summon this card from your hand. While you control no monsters you can Special Summon this banished card in face-up attack position.

I'm still new to this pls forgive my ignorants but I tried :wall. I tried copying Junk Servant and Photon Thrasher, but the effect doesn't even activate at all.

what work and what don't work?


Both; the one in hand and in banish zone. The effect will not be trigger or activate at all. Can you see if my .Iua has any errors I don't know how to do it myself unfortunately.
E☆HERO Pit Boss ~<3
Valossa  
#4 Posted : Sunday, February 12, 2017 1:57:35 PM(UTC)
Valossa

Rank: Advanced Member

Joined: 2/19/2015(UTC)
Posts: 513

Thanks: 40 times
Was thanked: 8 time(s) in 8 post(s)
Ser supreme king darkwurm special summon effect, change to your special summon condition, that os while os remove remeber that when the Card os removed you need to specify the zone you want to bring it in this case monster zone, cause i tried to do a monster with the same Effects as yours and when i will special summon it it dont appear in removed zone
thanks 1 user thanked Valossa for this useful post.
Fireworks27  
#5 Posted : Sunday, February 12, 2017 3:24:57 PM(UTC)
Fireworks27

Rank: Newbie

Joined: 4/13/2016(UTC)
Posts: 24

Thanks: 10 times
Originally Posted by: Valossa Go to Quoted Post
Ser supreme king darkwurm special summon effect, change to your special summon condition, that os while os remove remeber that when the Card os removed you need to specify the zone you want to bring it in this case monster zone, cause i tried to do a monster with the same Effects as yours and when i will special summon it it dont appear in removed zone

Thanks!
E☆HERO Pit Boss ~<3
Fireworks27  
#6 Posted : Sunday, February 12, 2017 5:37:04 PM(UTC)
Fireworks27

Rank: Newbie

Joined: 4/13/2016(UTC)
Posts: 24

Thanks: 10 times
Originally Posted by: Valossa Go to Quoted Post
Ser supreme king darkwurm special summon effect, change to your special summon condition, that os while os remove remeber that when the Card os removed you need to specify the zone you want to bring it in this case monster zone, cause i tried to do a monster with the same Effects as yours and when i will special summon it it dont appear in removed zone
Wait, which scipt?

E☆HERO Pit Boss ~<3
F539  
#7 Posted : Thursday, February 16, 2017 12:44:25 AM(UTC)
F539

Rank: Advanced Member

Joined: 12/15/2013(UTC)
Posts: 121

Thanks: 9 times
Was thanked: 33 time(s) in 33 post(s)
I know I'm late but if you still need that script i have it right here, it took 5 minutes to make. It's a simple combination with Junk Servant + Right-Hand Shark (anime card) effects.


About your code, you tried to force "Photon Thrasher" effect to work in a way that is impossible.

I'm going to try and explain some things that would never work in your code. The first one is obvious, your function that special summons from banished zone is calling a filter that asks if a certain archtype of card exists on the field, that is not what you want, you want to check if you have monsters on your field.

You have 2 "spcon" functions, function c14921.spcon(e,c) &&& c14921spcon(tp,c) it seems you forgot to rename one of them, so it means that part of your card is calling the incorret function.

"e2:SetCode(EFFECT_SPSUMMON_PROC)" is used to activate the effects of monsters that summon themselves from the hand, not from banished zone.

Your card was never going to work because your code is lacking among other things the line that actually tells the program to summon your card, that is: Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)


I hope that you see this post and that by looking at the code i posted in the spoiler you can understand some of the reasons why your code is not working.
Be really careful when you copy code from another card, because the smallest different in the wording of the card itself, means that the code works in a completly different way.

Edited by user Thursday, February 16, 2017 12:53:54 AM(UTC)  | Reason: Not specified

thanks 1 user thanked F539 for this useful post.
Valossa  
#8 Posted : Friday, February 17, 2017 5:13:05 PM(UTC)
Valossa

Rank: Advanced Member

Joined: 2/19/2015(UTC)
Posts: 513

Thanks: 40 times
Was thanked: 8 time(s) in 8 post(s)
Yes this way is great, i will steal this code, can i? kkkkkkkkk
Fireworks27  
#9 Posted : Saturday, February 18, 2017 10:44:05 PM(UTC)
Fireworks27

Rank: Newbie

Joined: 4/13/2016(UTC)
Posts: 24

Thanks: 10 times
Originally Posted by: F539 Go to Quoted Post
I know I'm late but if you still need that script i have it right here, it took 5 minutes to make. It's a simple combination with Junk Servant + Right-Hand Shark (anime card) effects.


About your code, you tried to force "Photon Thrasher" effect to work in a way that is impossible.

I'm going to try and explain some things that would never work in your code. The first one is obvious, your function that special summons from banished zone is calling a filter that asks if a certain archtype of card exists on the field, that is not what you want, you want to check if you have monsters on your field.

You have 2 "spcon" functions, function c14921.spcon(e,c) &&& c14921spcon(tp,c) it seems you forgot to rename one of them, so it means that part of your card is calling the incorret function.

"e2:SetCode(EFFECT_SPSUMMON_PROC)" is used to activate the effects of monsters that summon themselves from the hand, not from banished zone.

Your card was never going to work because your code is lacking among other things the line that actually tells the program to summon your card, that is: Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)


I hope that you see this post and that by looking at the code i posted in the spoiler you can understand some of the reasons why your code is not working.
Be really careful when you copy code from another card, because the smallest different in the wording of the card itself, means that the code works in a completly different way.


Thank you a lot, also this may be asking for too much but what's the effect that triggers when it is added by hand by "X archtype" monster? can't find cards with similar effect and I solved most of the problems still struggling but I'm still getting the hang of this. just need the fuction for that effect and then I'm ready to test my new archetype.
E☆HERO Pit Boss ~<3
F539  
#10 Posted : Sunday, February 19, 2017 12:37:23 AM(UTC)
F539

Rank: Advanced Member

Joined: 12/15/2013(UTC)
Posts: 121

Thanks: 9 times
Was thanked: 33 time(s) in 33 post(s)
If I'm understanding correctly you want something like: When this card is added to your hand by the effect of a "X" archtype monster, ""do something"".

If so, try this code that will special summon this card when this card is added to the hand by the effect of a monster from a "X" archtype.

Code in the spoiler

Edited by user Sunday, February 19, 2017 12:39:24 AM(UTC)  | Reason: Not specified

thanks 1 user thanked F539 for this useful post.
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