[...]
  • [...]
  • Newbie Topic Starter
2015-10-25T00:33:43Z
I need to Help with this card! I created this card and only is activating one of two effect :

--Change Battle Position
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(235862585,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_QUICK_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCategory(CATEGORY_POSITION)
e1:SetTarget(c235862585.target)
e1:SetOperation(c235862585.operation)
c:RegisterEffect(e1)
end
function c235862585.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,sg,sg:GetCount(),0,0)
end
function c235862585.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if sg:GetCount()>0 then
Duel.ChangePosition(sg,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0)
end
--summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(235862585,0))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c235862585.sumtg)
e2:SetOperation(c235862585.sumop)
c:RegisterEffect(e2)
end
function c235862585.filter(c)
return c:IsSetCard(166) and not c:IsCode(235862585) and c:IsSummonable(true,nil)
end
function c235862585.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c235862585.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c235862585.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c235862585.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end



The effect is Normal Summon in additional to a monster Ranger and after this, change the battle position of all opponent monsters. PLEASE HELP-ME!![:cry:]
Vertex
2015-10-25T00:49:05Z
Can you provide the full script of the card (if this is exactly how you write it, the local e2=Effect.CreateEffect(c), and everything that follows needs to be in the initial_effect block, before the end, preferably just under c:RegisterEffect(e1)).