Jump to content

Kill monster then teleport player to a new location on map?


Gunrock

Recommended Posts

I'm using Zdoom/ Hexen format in Ultimate Doom builder. How can I make a scenario in which I kill a single monster, then about 60 seconds later the player gets teleported to a new location on map?

Share this post


Link to post

This would be very easy to do with ACS. I would do something like the following:

 

#include "zcommon.acs"

Script 1 (int teleportID, int FloorID)
{
	Delay(2100); //This should be a 60-second delay.
	
	Teleport(teleportID, 0, 0); /*This teleports the player who activated
	the script to the destination with whatever tag "teleportID" is.*/
	
	Delay(32); //About a 1-second delay
	
	Floor_LowerToNearest(FloorID, 16); /*In case the player is playing in coop
	or with respawning toggled on, this will lower a hidden teleporter with
	the tag "FloorID" so that way whatever the destination is can still be
	reached.*/
	
	Terminate;
}

And whatever monster the monster is that triggers this effect, you will give them action 80 (Script Execute), with the proper values for arg1 (teleportID) and arg2 (FloorID) of the script. Hope this helps!

Share this post


Link to post

But that's for just ending the level, isn't it? Not for teleporting to somewhere else, like it's been asked for, right?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...