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)?
Line Set Portal Target to Permanent Random Destination
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
- Kinsie
- Posts: 7399
- Joined: Fri Oct 22, 2004 9:22 am
- Graphics Processor: nVidia with Vulkan support
- Location: MAP33
- Contact:
Re: Line Set Portal Target to Permanent Random Destination
Use ACS.
Code: Select all
#include "zcommon.acs"
script "RandomPortal" OPEN
{
Line_SetPortalTarget (1, random(2,4));
}