View Single Post
Old 10-13-2012, 09:03 PM   #4
Senior Member
JCarter426's Avatar
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,668
No worries... this one is pretty simple. As I said you need to look up the tags, but I can type out everything else:
void main() {

	object oPrisoner = GetFirstPC();
	object oCage = GetNearestObjectByTag("tag", oPrisoner, 1);
	object oCageBlocker = GetNearestObjectByTag("tag", oPrisoner, 1);

AssignCommand(oCage, ActionPlayAnimation(202, 1.0, 0.0));
DestroyObject(oCageBlocker, 0.0, 0, 0.0, 0);

If the prisoner is someone other than the player, just replace
GetObjectByTag("tag", 0);
Also note this doesn't play the cage shut off sound. But there is a universal script in the game for that; it would be easier to run that through the DLG file in addition to this, since everything is already set up.

Last edited by JCarter426; 10-13-2012 at 09:18 PM.
JCarter426 is offline   you may: quote & reply,