Rotating the party

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Rotating the party

Post by Komag »

I don't think so, but you could do something close, maybe by instructing the party to place the item on the floor, where you have an invisible plate check whether it's the right item then activate the teleporter for it
Finished Dungeons - complete mods to play
User avatar
Edsploration
Posts: 104
Joined: Wed Sep 19, 2012 4:32 pm

Re: Rotating the party

Post by Edsploration »

SinusPi wrote:I mean the moment a party/monster/item gets teleported, if I were to make - say - a teleporter that only works under certain conditions, or only teleports certain items thrown at it, and lets others through.
Hidden pressure plates, even those dynamically created and destroyed, can work wonders for non-flying monster and the party. As for thrown items... you might be able to get away with an x, y check on a fast timer, and then destroy and recreate the item elsewhere.

In one of my dungeons I have a lighting script which dynamically creates lights based on thrown objects coordinates. It doesn't bog down my computer even with recalculating lighting on a fast timer! Although I am still concerned about it and have to do more tweaking.
Open Project -> Community FrankenDungeon: viewtopic.php?f=14&t=4276
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: Rotating the party

Post by msyblade »

This is so much easier than it sounds, follow close. Place an active teleporter, make sure it is only triggered by party,it is invisible, silent, changes facing, DOES NOT EMIT LIGHT OR FLASH SCREEN (all checkboxes).and activated. Then use the change facing tool (the green triangle pointing to one of four quadrants at the top of the inspector), and point the green arrow the direction you want it to turn the party. do not make a teleport target, it defaults on the same square.Be warned that this trick does not work as well as it did in dungeon master because there are different wall textures used in consecutive squares. You can use torchholders to get rid of shackles and such that may give it away when it changes, just be sure to make another, opposite and identical when they get turned around. Still not seamless, but the player will have to be paying close attention to catch the nuance change.
Currently conspiring with many modders on the "Legends of the Northern Realms"project.

"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
SinusPi
Posts: 8
Joined: Fri Oct 19, 2012 11:57 am

Re: Rotating the party

Post by SinusPi »

Thanks msyblade, but this only makes a teleporter turning the party in a specific direction. I wanted a random or 180'-depending-on-their-current-facing turn.
User avatar
Wolfrug
Posts: 55
Joined: Wed Oct 03, 2012 6:56 pm

Re: Rotating the party

Post by Wolfrug »

SinusPi wrote:Thanks msyblade, but this only makes a teleporter turning the party in a specific direction. I wanted a random or 180'-depending-on-their-current-facing turn.
Place an invisible pressure plate underneath the teleporter that activates a lua script:

Code: Select all

function activate(object)
-- print (object.name)
	for i in entitiesAt(object.level, object.x, object.y) do
		if i.name == "teleporter" then
  		local math = math.random (0,3)
		i:setTeleportTarget(i.x, i.y, math)
		end
	end
end
There, that's all you need. Whenever you step into the teleporter+on top of the pressure plate, it will randomly reassign the facing of the teleport.

You only need the one Lua script, as it works for any pressure plate attached to it.

-Wolfrug
Try my Mordor: Depths of Dejenol LoG-ification. Feedback much appreciated!
User avatar
djoldgames
Posts: 107
Joined: Fri Mar 23, 2012 11:28 pm
Contact:

Re: Rotating the party

Post by djoldgames »

In my EOB remake I use new objects (instance of teleporters) for rotating the party, then I can easily place this "spiner" like objects anywhere by Dungeon Editor and set target/facing individualy if needed...

This is script onMove hook for PARTY object (help.entitiesAtDir is a helper function from framework by JKos)

Code: Select all

onMove = function(self,dir)
	for e in help.entitiesAtDir(self,dir) do
		if e.name == 'teleporter_rotator90' then
			e:setTeleportTarget(e.x, e.y, (self.facing + 1)%4)
			print("Party rotated by 90")
		end
		if e.name == 'teleporter_rotator180' then
			e:setTeleportTarget(e.x, e.y, (self.facing + 2)%4)
			print("Party rotated by 180")
		end
		if e.name == 'teleporter_rotator270' then					
			e:setTeleportTarget(e.x, e.y, (self.facing + 3)%4)
			print("Party rotated by 270")
		end
	end
end
and this is definition of new cloned objects:

Code: Select all

cloneObject{
	name = "teleporter_rotator90",
	baseObject = "teleporter",
}
cloneObject{
	name = "teleporter_rotator180",
	baseObject = "teleporter",
}
cloneObject{
	name = "teleporter_rotator270",
	baseObject = "teleporter",
}
These 3 teleporters (spinners) are all I need for rotating (or rotating and moving) party on specific places in the dungeon...
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: Rotating the party

Post by msyblade »

Ahhh, i see. I was really thinking of a specific puzzle from DM. Guess it left a lasting impression on me! (swahili for traumatized)
Currently conspiring with many modders on the "Legends of the Northern Realms"project.

"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
User avatar
TheLastOrder
Posts: 104
Joined: Wed Oct 17, 2012 1:56 am

Re: Rotating the party

Post by TheLastOrder »

Grimwold wrote: * Create 4 plates and name them plate_N; plate_E; plate_S and plate_W
* Link all 4 plates to a script entity with the above code and the action replaceTeleport
* Place a teleporter and name it turner_teleporter
* Change the co-ordinates of the spawn location and teleport target to suit.

This setup rotates the party clockwise... for other combinations, change the Tfacing values.
Sorry Grimwold, but where must I place the plates?? And why are they needed for?
Isn't better hidden plates????
I understood that if you uses that teleport, it only works once, and then it deactivates itself.

Thanks for everything!
Post Reply