Page 1 of 1

Line Set Portal Target to Permanent Random Destination

Posted: Fri Sep 21, 2018 8:06 pm
by Mini--Joe
https://i.imgur.com/15KTDpR.png

I am trying to use the "Line set portal target" action to change the portal with no assigned destination to have a random destination of one of a few different options.
I want the randomly chosen destination to essentially be linked to the line with no destination upon a button press, and then be unchangeable (one time use switch).

I tried using the method that works with teleporters, as in I use the same tag for multiple teleport destinations (substituting tele destinations with linedefs, for the visual effect) but that seems to just not work.

I also tried doing this,
https://i.imgur.com/e8Es39Q.png
but I really had no knowledge basis for something like this to work, I was just hoping something it would.

Is there a way to use Set Portal Target to set a random linedef destination(of a set of given options)?

Re: Line Set Portal Target to Permanent Random Destination

Posted: Mon Oct 08, 2018 4:58 am
by Kinsie
Use ACS.

Code: Select all

#include "zcommon.acs"

script "RandomPortal" OPEN
{
	Line_SetPortalTarget (1, random(2,4));
}