Please note that i use wotgreal. it has a autocomplete function that when you type a class then a period (ie "DeusExPlayer.") it gives you a list of the properties of that class. Well, if i so this with this "PlayerSwitch" class, no properties come up as they should (ie the vector location, which i use here, and every actor has). Here is the code:
- Code: Select all
class PortalSwitch extends Switch1;
var PortalSwitch PortalExit[10];
function Frob(Actor Frobber, Inventory frobWith)
{
local PortalSwitch Portal;
local int i;
i=0;
foreach allactors(class'PortalSwitch',Portal)
{
portalexit[i]=portal; //make a list of all the portals in the level
i++;
}
if (i==1)
return; //if only one portal, prevents player from being teleported.
i=rand(i); //select random portal
Frobber.SetLocation(PortalExit[i].Location); //do teleport
}
I also tried using an actor as the meat to the Portal, but i have the same problem. It teleports me to 0,0,0, and no properties if i do the aformentioned thing. I have never run into this problem b4 :S
EDIT: if i type "switch1." i get the properties listing, so i am confused.