Jump to content

Another simple question.


Recommended Posts

So I'm working on a character and shes doing well but I have two questions:

 

1. I know how to make a character transform by just pressing a key but I don't want her to transform in special circumstances like the GIR mod. I just want her to transform by pressing a key period.

 

2. When she transforms, everything equippable  becomes invisible. Everything!

 

Why? Because:

 

MlUERCC.png

 

Because I want to be a ball when I grow up.

Edited by rons0n
Link to comment
Share on other sites

1. I know how to make a character transform by just pressing a key but I don't want her to transform in special circumstances like the GIR mod. I just want her to transform by pressing a key period.

 

The character Warfarin has a transformation that occurs whenever you want. (He actually rolls, but he is transformed in a ball during a second.)

 

You could take a look at this.

 

Edit: Everything on him becomes invisible as well.

 

Wanna touch my special fluffy tail?

Edited by GalloViking
Link to comment
Share on other sites

@Kzisor
 

 

I did this and it worked great!

local BALL = GLOBAL.Action()BALL.str = "Ball"BALL.id = "BALL"BALL.fn = function(act)            local silent = true				act.target.AnimState:SetBuild("tamamo_ball")            -- act.target.components.health:SetCurrentHealth(1)            -- act.target.components.health:DoDelta(0)            return trueendAddAction(BALL) 

But I can't transform back. I remember a thread that had this same problem. You said something about a boolean to denote the transformation so I did this:

local BALL = GLOBAL.Action()BALL.str = "Ball"BALL.id = "BALL"BALL.fn = function(act)            local silent = true				act.target.AnimState:SetBuild("tamamo_ball")			if act.target.transformed then				act.target.AnimState:SetBuild("tamamo")			else				act.target.AnimState:SetBuild("tamamo_ball")			end 				act.target.transformed = not act.target.transformed            -- act.target.components.health:SetCurrentHealth(1)            -- act.target.components.health:DoDelta(0)            return trueend

But it crashed, so i'm guessing I pasted it completely wrong.

 

Also on Warfarin, I don't think i'll find it xD. So many lines to scroll...

 

 

Link to comment
Share on other sites

Execute:

inst.AnimState:Hide("hat")inst.AnimState:Hide("hat_hair")inst.AnimState:Show("hair_nohat")inst.AnimState:Show("hair")inst.AnimState:Show("head")inst.AnimState:Hide("head_hair")inst.AnimState:Hide("swap_body")inst.AnimState:Hide("arm_carry")inst.AnimState:Show("arm_normal")

To make yourself appear normal if you have things equipped.

 

And viceversa to switch back to normal.

Unless have nothing equipped.

 

Re-equipping hats or weapons will make them appear again though. But you can avoid this if you don't equip things when ball-mode, or by overriding the equip functions on things and putting these functions there to counter the animations.

Link to comment
Share on other sites

@rons0n, make sure you have inst.transformed as a variable before trying to determine if you can access it. 

 

@Kzisor

 

Ugh, me and my stupidity.

Thank you!

 

Also on the invisible weapons I appreciate your suggestions but I decided to keep the items.

Why? Because:

 

axazFbn.jpg

 

Yeh. Thats why.

Link to comment
Share on other sites

Talk about short lived, just when I was about to release her to the public I get a error:

 

If you're not the host, reviving her with a Telltale heart crashes the game:

[00:02:59]: Could not find anim [idle_loop] in bank [FROMNUM][00:02:59]: [string "scripts/components/transparentonsanity.lua"]:32: attempt to index field 'sanity' (a nil value)LUA ERROR stack traceback:scripts/components/transparentonsanity.lua:32 in (method) OnUpdate (Lua) <23-43>   self =      offset = 4.0285909568847      target_alpha = 0.10504829256357      inst = 111216 - shadowskittish (valid:true)      osc_speed = 1.2929395428327      alpha = 0.10504829256357      most_alpha = 0.4   dt = 0.033333335071802   player = 100719 - tamamo (valid:true)scripts/update.lua:179 in () ? (Lua) <146-209>   dt = 0.033333335071802   tick = 2941   k = 111216   v = 111216 - shadowskittish (valid:true)   cmp = table: 2275F870

And if you're the host, upon revival makes you completely invisible(To the non-host). Now I don't know if these two are related but it has thrown me back some steps. Anything would be helpful

Edited by rons0n
Link to comment
Share on other sites

Do you do anything with Tamamo's sanity?

 

Have you accidentally triggered ball-mode when ghost?

 

@DarkXero,

 

Related to sanity? I don't think so.

-Infinite follower time

-Tranformation(No sanity conditions, only transforms by key)

-invisible swap_body

 

And to the second one, I don't think so. Do I have to put in ms_respawnfromghost or something?

 

Problem solved, I added this:

	--Merm	inst:AddTag("merm")    inst:AddTag("mermfriend")			--Tallbird	inst:AddTag("tallbird")    inst:AddTag("tallbirdfriend")		--Hounds	inst:AddTag("hound")	inst:AddTag("houndfriend")	inst:AddTag("firehound")	inst:AddTag("firehoundfriend")	inst:AddTag("icehound")	inst:AddTag("icehoundfriend")		--Walrus	inst:AddTag("walrus")    inst:AddTag("walrusfriend")	inst:AddTag("little_walrus")    inst:AddTag("little_walrusfriend")

From the alice mod back in don't starve. I guess that was a bad thing. So I removed it. Shucks thats pretty bumming.

 

Well regardless I'm going to release her, she lacks a lot of perks but I think shes still fun! See her soon on the steam workshop!

Edited by rons0n
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...