Page 1 of 1

To Isaac

Posted: Mon Apr 30, 2018 3:51 am
by Mysterious
Hi.
I was trying to work this script out that you wrote and well im stumped eg: (14,17,0,2,1).
What I need the script to do is when the boss gets to < 150 it positions the monster to another level.

I understand that 14, 17 is the monster position currently. the 0,2,1 I don't understand what these numbers do mb.

Code: Select all

ratling_boss_1.monster:addConnector("onDamage", self.go.id, "retreat", ratling_boss_1)

function retreat(target)
	if target.go.monster:getHealth() < 150 then
	target.go:setPosition(14,17,0,2,1)
	mine_counterweight_chains_1:createComponent("Particle"):setParticleSystem("damage_shock")
	ratling_boss_1.monster:removeConnector("onDamage", self.go.id, "retreat", ratling_boss_1)
	end
end
Any help would cool thxs I love this script :)

Re: To Isaac

Posted: Mon Apr 30, 2018 7:15 am
by Isaac
Sent via PM.
SpoilerShow
GameObject:setPosition(x, y, facing, elevation, level)

x & y indicate the tile.
facing indicates the cardinal direction; 0 to 3.
elevation indicates the elevated floor level; -7 to 7, with 0 being the default ground level.
level indicates what map.