To Isaac

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
User avatar
Mysterious
Posts: 226
Joined: Wed Nov 06, 2013 8:31 am

To Isaac

Post 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 :)
User avatar
Isaac
Posts: 3190
Joined: Fri Mar 02, 2012 10:02 pm

Re: To Isaac

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

Return to “Mod Creation”