-edit- ok I'm digging around to figure this out and it has to do with the bInWorld property. But I am unfamiliar with unreal script. So could someone show me how to write up a very simple piece of script which checks for a flag to be true in the beginning of the map, and sets bInWorld to either false or true?
-edit- lol, I'm laughing thinking of how I could use movers to slam the NPCs into teleporters. (this didnt work)
-edit- DDL created a trigger for me that you can save as a .uc file:
Sure thing!
Setting bInworld=false means that at startup the pawn turns its collision to "off" for all settings, makes itself invisible and then hides itself 20000 uunits below its curret position. You probably grasped that, though.
Calling the function enterworld(); makes pawns switch between the states, either appearing or disappearing: it toggles the bool and also makes them jump up, start colliding (according to their initial collision settings, so bob page's hologram, which starts as non-colliding, jumps up and is STILL non colliding), and otherwise behave normally.
But, currently (i.e. given DX's existing build state) there are no triggers that actually call this function, which is..idiocy on the part of the devs, really.
Thus: either you make and compile one, or you script it. Now I could give you a long terrible discussion about the joys of missionscripts (there was one on DXE, but that died) or I could just post up code for a trigger. Latter sounds good?
Code: Select all
class PawnAppearTrigger extends Trigger;
enum EEntryType
{
ENT_Enter,
ENT_Leave,
ENT_Toggle
};
var() EEntryType Appear;
function Touch(Actor Other)
{
local ScriptedPawn P;
foreach AllActors(Class'ScriptedPawn',P, event)
{
if(Appear == ENT_Enter)
P.EnterWorld();
else if(Appear == ENT_Leave)
P.LeaveWorld();
else
{
if(!P.bInWorld)
P.EnterWorld();
else
P.LeaveWorld();
}
}
}
function Trigger(Actor other,Pawn instigator)
{
local ScriptedPawn P;
foreach AllActors(Class'ScriptedPawn',P, event)
{
if(Appear == ENT_Enter)
P.EnterWorld();
else if(Appear == ENT_Leave)
P.LeaveWorld();
else
{
if(!P.bInWorld)
P.EnterWorld();
else
P.LeaveWorld();
}
}
}
defaultproperties
{
Appear=ENT_Toggle
}
So this'll find any pawns that match its event field, and either force entry, exit, or toggle of enterworld().