Jump to content

Chase and Ram Behaviors; Bearger's Differences?


Recommended Posts

The chase and ram behavior in Don't Starve is shared with very few creatures, with the most obvious possessor of the behavior being the clockwork rook. It's used as a way for creatures to chase after a target in a straight line, without changing direction in the time running. Looking through the codes however, I noticed one creature who possesses this behavior and handles it differently; the Bearger. It's chase and ram behavior is used when it starts running at full speeds, but unlike the clockwork rook and Ancient Guardian, the Bearger is able to change directions during its running state. By comparing codes, I do not see any difference between their chase and ram behavior, for their code strings look so similar. Can anyone tell me how the Bearger is able to handle the chase and ram behavior differently?

It's because of stategraph tags.

If you read the ChaseAndRam behaviour, you see the usage of the "canrotate" tag.

Bearger has it on its "run" state. The rook does not.

AddStategraphPostInit("rook", function(sg)
	sg.states.run.tags.canrotate = true
end)

Adds the tag to the relevant state, allowing the rook to work like a homing missile to you.

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...