Jump to content

[Help]Would this be possible?


Rosten

Recommended Posts

So, basically what i'd like to know if you can make multiple forms for a character, similar to the werebeaver, like if you eat a certain food, then you would transform into a form with a added meter along with all your others telling you how long this form would last, would you also be able to make multiple forms triggered by different items, and each one would have some sort of cooldown? 

Link to comment
Share on other sites

  • Developer

Switching what your character or creature looks like is pretty easy code wise.  This snippet will switch between the different main players every second.

 

characters = { 'wes', 'wickerbottom', 'willow', 'wilson', 'wolfgang', 'woodie', 'wx78' }Assets = {} for i, c in ipairs( characters ) do    Assets[i] = Asset("ANIM", "anim/"..c..".zip")end  local character_index = 0local function SwitchCharacter()    local player = GLOBAL.GetPlayer()    if player then        character_index = character_index + 1        player.AnimState:SetBuild( characters[character_index] )        character_index = character_index % #characters    endend AddGamePostInit( function()    GLOBAL.scheduler:ExecutePeriodic( 1, SwitchCharacter ) end)

Link to comment
Share on other sites

Archived

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

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...