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.


Client-side issue: stategraph

Recommended Posts

MorickClive    13

Hi all, 

I've expanded on the spawner system of the eye plant, creating a new component which some what mirrors the original but is adjusted for specific states on spawn,

The component summons in specific modified instances of tentacles. Although this works rather cleanly on a host, the client side crashes on the first spawn of a minion. I've isolated the bug to the stategraph system, although I'm struggling to find a clear explanation as to how to implement it for the client side. Any assistance would be greatly appreciated. ^^

Sample image from host(without error):


Error produced by clientside:

325: attempt to index field 'sg' (a nil value)
LUA ERROR stack traceback:

Line in question -"rumble") -- [[ I assume I need to tell the client which Stategraph it needs to use, though unsure how ]]

Share this post

Link to post
Share on other sites
DarkXero    2,707
13 hours ago, MorickClive said:

Error produced by clientside:

Don't implement it client side.

Put inst:SetStateGraph("SGminion") after the TheWorld.ismastersim check.

The only client side stategraphs are the player related ones, since those are useful to determine in advance the animations a client with movement prediction is going to do.

Share this post

Link to post
Share on other sites
MorickClive    13

Yep, that seems to have cleared the issue; thank you so much :D.

All I need to do is shift the spawned tentacles to a different prefab name (for description and reference purposes) and apply the overlay colour for client creatures.

-- This line causes the clients to freeze (fixed)
-- fixed, minion:SetPrefabNameOverride successfull re-allocates the name so characters can uniquely comment on it.

-- These lines do no apply to clients.

    minion.AnimState:OverrideMultColour(0.1, 0.1, 0.1, 0.85) = "Shadowed Tentacle"

I'll hammer away at these, thank you for the support! ^^

-- Edit:

  • Solved an issue with prefab overriding.
  • Solved the issue with colour and naming issue: though only through creating an edited version of the tentacle file, maybe inefficient?

Share this post

Link to post
Share on other sites