Page 1 of 1

Snail Race!

Posted: Tue Oct 16, 2012 6:02 am
by Grimorial
Is it possible to restrict monster movement to a linear path without the use of blockers and walls? I was thinking making a snail race to gamble on.

Re: Snail Race!

Posted: Tue Oct 16, 2012 9:58 am
by antti
Sure thing. Adding something like this to the monsters.lua in your modding assets produces a new monster which is unable to turn (warning, untested code follows):

Code: Select all

cloneObject{
	name = "racing_snail",
	baseObject = "snail",
	onTurn = function(monster, direction)
		return false
	end,
}

Re: Snail Race!

Posted: Tue Oct 16, 2012 4:04 pm
by Grimorial
That's wonderful news, I appreciate the assistance and provided script very much. I will put that to good use. :D

I'll post back once I have worked this in.

Re: Snail Race!

Posted: Thu Oct 18, 2012 12:53 am
by Grimorial
Ok, it was successful. Thanks again.