-=LK-site=-
Usted no se conecto a su cuenta. O Bien no esta registrado , Registrarte a la Comunidad LKSITE y Se parte del Mismo!!!

Para que se valla este cartel molesto, registrarte o conectate a tu cuenta Wink




Unirse al foro, es rápido y fácil

-=LK-site=-
Usted no se conecto a su cuenta. O Bien no esta registrado , Registrarte a la Comunidad LKSITE y Se parte del Mismo!!!

Para que se valla este cartel molesto, registrarte o conectate a tu cuenta Wink


-=LK-site=-
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.

[GUIA]Combinacion de items

2 participantes

Ir abajo

[GUIA]Combinacion de items Empty [GUIA]Combinacion de items

Mensaje por LuchioK Jue Nov 13, 2008 5:47 pm

Hola Editores Very Happy, bueno ak les voy a hacer una guia de la combinacion de items Wink

En esta guia vamos a ser una combinacion de Item1 + Item2 = Item3

Para que se combinen estos tres items y formen el item3 necesitamos hacer el siguiente detonador.


Combinacion Item
Idea Acontecimientos
Unidad - A unit Adquiere un objeto
Idea Condiciones
Idea Acciones
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
(Item-type of (Item carried by (Triggering unit) of type Item1 )) Igual a Item1
(Item-type of (Item carried by (Triggering unit) of type Item2 )) Igual a Item2
Entonces: Acciones
Efecto especial - Create a special effect at (Position of (Triggering unit)) using [Efecto que desean que haga]
Efecto especial - Destroy (Last created special effect)
Objeto - Remove (Item carried by (Triggering unit) of type Item1 )
Objeto - Remove (Item carried by (Triggering unit) of type Item2)
Objeto - Create Item3 at (Position of (Triggering unit))
Heroe - Give (Last created item) to (Triggering unit)
Otros: Acciones


Notas:
- Donde dice "item" va el item que queremos que combine.
Ejemplo:
Item1: supongamos que sea "Papá"
Item2: supongamos que sea "Mamá"
Y el Item 3 que vendria a ser el resultado final sera "Hijo"


Ak les dejo el detonador con el ejemplo que les di recien.
Código:
Combinacion Item
    Acontecimientos
        Unidad - A unit Adquiere un objeto
    Condiciones
    Acciones
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            Si: Condiciones
                (Item-type of (Item carried by (Triggering unit) of type Mama)) Igual a Mama
                (Item-type of (Item carried by (Triggering unit) of type Papa)) Igual a Papa
            Entonces: Acciones
                Efecto especial - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                Efecto especial - Destroy (Last created special effect)
                Objeto - Remove (Item carried by (Triggering unit) of type Papa)
                Objeto - Remove (Item carried by (Triggering unit) of type Mama)
                Objeto - Create Hijo at (Position of (Triggering unit))
                Heroe - Give (Last created item) to (Triggering unit)
            Otros: Acciones

Ak se los dejo En JASS

Código:
function Trig_Combinacion_de_items_JASS_Func001C takes nothing returns boolean
    if ( not ( GetItemTypeId(GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I000')) == 'I000' ) ) then
        return false
    endif
    if ( not ( GetItemTypeId(GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I001')) == 'I001' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Combinacion_de_items_JASS_Actions takes nothing returns nothing
    if ( Trig_Combinacion_de_items_JASS_Func001C() ) then
        call AddSpecialEffectLocBJ( GetUnitLoc(GetTriggerUnit()), "Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl" )
        call DestroyEffectBJ( GetLastCreatedEffectBJ() )
        call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I001') )
        call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I000') )
        call CreateItemLoc( 'I002', GetUnitLoc(GetTriggerUnit()) )
        call UnitAddItemSwapped( GetLastCreatedItem(), GetTriggerUnit() )
    else
    endif
endfunction

//===========================================================================
function InitTrig_Combinacion_de_items_JASS takes nothing returns nothing
    set gg_trg_Combinacion_de_items_JASS = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Combinacion_de_items_JASS, EVENT_PLAYER_UNIT_PICKUP_ITEM )
    call TriggerAddAction( gg_trg_Combinacion_de_items_JASS, function Trig_Combinacion_de_items_JASS_Actions )
endfunction



Y ak les dejo el mapa para que lo puedan ver y usar Wink

DESCARGAR MAPA GUIA

PD:Vale aclara que este detonador se puede usar para mas de dos items,siempre agregandolos a los requerimientos.


saludos espero que me hallan entendido Very Happy
LuchioK
LuchioK
Admin
Admin

Cantidad de envíos : 1627
Edad : 33
Localización : Haciendo deporte informatico!
Experiencia Foro :
[GUIA]Combinacion de items Left_bar_bleue500 / 500500 / 500[GUIA]Combinacion de items Right_bar_bleue

Puntos : 5968
Fecha de inscripción : 09/09/2008

https://lksite.superforo.net

Volver arriba Ir abajo

[GUIA]Combinacion de items Empty Re: [GUIA]Combinacion de items

Mensaje por Plater Vie Nov 14, 2008 3:03 pm

Esta buena la guía, pero yo encontre una manera de hacer exactamente lo mismo y ahorrandome el trabajo de 2 detos, el del efecto especial y el de crear/despues dar el item desado. Aca lo posteo.

Código:
Comprar ITEM DESEADO
    Acontecimientos
        Unidad - A unit Adquiere un objeto
    Condiciones
    Acciones
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            Si: Condiciones
                ((Triggering unit) has an item of type ITEM 1) Igual a True
                ((Triggering unit) has an item of type ITEM 2) Igual a True
                ((Triggering unit) has an item of type ITEM 3) Igual a True
            Entonces: Acciones
                Objeto - Remove (Item carried by (Triggering unit) of type ITEM 1l)
                Objeto - Remove (Item carried by (Triggering unit) of type ITEM 2)
                Objeto - Remove (Item carried by (Triggering unit) of type ITEM 3)
                Héroe - Create ITEM DESEADO and give it to (Triggering unit)
                Efecto especial - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Items\AIsm\AIsmTarget.mdl (como ejemplo)
            Otros: Acciones
                Do nothing

Salu2.-
Plater
Plater
GameTester
GameTester

Cantidad de envíos : 1601
Edad : 31
Localización : No lo se :/ Hitpoints: 50000/50000 Magicpoints: 7500/7500 Powerpoints: 15000/15000 ---------------------------- Moderador GD ----------------------------
Experiencia Foro :
[GUIA]Combinacion de items Left_bar_bleue175 / 500175 / 500[GUIA]Combinacion de items Right_bar_bleue

Puntos : 5710
Fecha de inscripción : 16/09/2008

http://criticasmanga.blogspot.com/

Volver arriba Ir abajo

[GUIA]Combinacion de items Empty Re: [GUIA]Combinacion de items

Mensaje por LuchioK Vie Nov 14, 2008 6:35 pm

Bueno es una alternativa pero es buena Wink
LuchioK
LuchioK
Admin
Admin

Cantidad de envíos : 1627
Edad : 33
Localización : Haciendo deporte informatico!
Experiencia Foro :
[GUIA]Combinacion de items Left_bar_bleue500 / 500500 / 500[GUIA]Combinacion de items Right_bar_bleue

Puntos : 5968
Fecha de inscripción : 09/09/2008

https://lksite.superforo.net

Volver arriba Ir abajo

[GUIA]Combinacion de items Empty Re: [GUIA]Combinacion de items

Mensaje por Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.