Jump to content

Recommended Posts

If you wish your race have horns\wings\tail\special ears\etc - it be better to add this parts via CreationKit directly to your race (like argonian tail, for example).

 

For "you change your character race and something happens" better to use OnRaceSwitchComplete event, I think.

Its completely different, Its just a basic add item if this is the race used

 

For the characters starting equipment.

Link to comment

Something like this I think.

Attach this script to passive racial ability.

Scriptname _RaceEquip extends activemagiceffect  

actor property PlayerRef Auto
Race property bRace Auto
Armor property aItem Auto

Event OnRaceSwitchComplete ()
    if PlayerRef.GetRace() == bRace
        PlayerRef.AddItem (aItem, 1, true)
        PlayerRef.EquipItem (aItem)
    else
        PlayerRef.RemoveItem (aItem, 1, true)
    endif
EndEvent

Event OnEffectFinish (Actor akTarget, Actor akCaster)
    PlayerRef.RemoveItem (aItem, 1, true)
EndEvent

Add armor "aItem" to player if his race is bRace and equip it.

If player race is not bRace - then we need to remove this item from player.

Link to comment

Something like this I think.

Attach this script to passive racial ability.

Scriptname _RaceEquip extends activemagiceffect  

actor property PlayerRef Auto
Race property bRace Auto
Armor property aItem Auto

Event OnRaceSwitchComplete ()
    if PlayerRef.GetRace() == bRace
        PlayerRef.AddItem (aItem, 1, true)
        PlayerRef.EquipItem (aItem)
    else
        PlayerRef.RemoveItem (aItem, 1, true)
    endif
EndEvent

Event OnEffectFinish (Actor akTarget, Actor akCaster)
    PlayerRef.RemoveItem (aItem, 1, true)
EndEvent

Add armor "aItem" to player if his race is bRace and equip it.

If player race is not bRace - then we need to remove this item from player.

Woah thats awesome. Thank you very much.

 

Is it possible to simplify it by using a formlist?

 

kinda like spellform

 

Or there is no additem formlist in CK?

Link to comment

 

Woah thats awesome. Thank you very much.

 

Is it possible to simplify it by using a formlist?

 

kinda like spellform

 

Or there is no additem formlist in CK?

 

I think it is possible, at least for "additem" part.

Check this manual.

 

Something like

Scriptname _RaceEquip extends activemagiceffect  

actor property PlayerRef Auto
Race property bRace Auto
FormList Property ListOfObjectsFLST Auto

Event OnRaceSwitchComplete ()
    if PlayerRef.GetRace() == bRace
        Int iIndex = ListOfObjectsFLST.GetSize()
        While iIndex
            iIndex -= 1
            ObjectReference kReference = ListOfObjectsFLST.GetAt(iIndex) As ObjectReference
        PlayerRef.AddItem (kReference, 1, true)
        PlayerRef.EquipItem (kReference)
        EndWhile
    EndIf
EndEvent

Event OnEffectFinish (Actor akTarget, Actor akCaster)
        Int iIndex = ListOfObjectsFLST.GetSize()
        While iIndex
            iIndex -= 1
            ObjectReference kReference = ListOfObjectsFLST.GetAt(iIndex) As ObjectReference
    PlayerRef.RemoveItem (kReference, 1, true)
        EndWhile
EndEvent

But I'm not sure how it will work.

Link to comment

 

 

Woah thats awesome. Thank you very much.

 

Is it possible to simplify it by using a formlist?

 

kinda like spellform

 

Or there is no additem formlist in CK?

 

I think it is possible, at least for "additem" part.

Check this manual.

 

Something like

Scriptname _RaceEquip extends activemagiceffect  

actor property PlayerRef Auto
Race property bRace Auto
FormList Property ListOfObjectsFLST Auto

Event OnRaceSwitchComplete ()
    if PlayerRef.GetRace() == bRace
        Int iIndex = ListOfObjectsFLST.GetSize()
        While iIndex
            iIndex -= 1
            ObjectReference kReference = ListOfObjectsFLST.GetAt(iIndex) As ObjectReference
        PlayerRef.AddItem (kReference, 1, true)
        PlayerRef.EquipItem (kReference)
        EndWhile
    EndIf
EndEvent

Event OnEffectFinish (Actor akTarget, Actor akCaster)
        Int iIndex = ListOfObjectsFLST.GetSize()
        While iIndex
            iIndex -= 1
            ObjectReference kReference = ListOfObjectsFLST.GetAt(iIndex) As ObjectReference
    PlayerRef.RemoveItem (kReference, 1, true)
        EndWhile
    EndIf
EndEvent

But I'm not sure how it will work.

 

I'll test it out, thank you very much, I'm out for work in a bit.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use