Block Monsters, not Bots... Anyone know how to do this?
Block Monsters, not Bots... Anyone know how to do this?
Here's my problem: My queen has Teleport Destinations, but it appears that when she leaves the zone, she no longer teleports to them, and gets teleportation spazzes that we all just love her for I *Tried* using BlockMonster actors at the doorway, *BUT* it appears that these block BOTS form accessing the area too (They walk into it and get stuck >w>) Does anyone know how to block MONSTERS and not BOTS?
- Feralidragon
- Godlike
- Posts: 5493
- Joined: Wed Feb 27, 2008 6:24 pm
- Personal rank: Work In Progress
- Location: Liandri
Re: Block Monsters, not Bots... Anyone know how to do this?
That's strange, I thought that bBlockActors wouldn't block bots, since they are "players", unless bBlockPlayers is something only thought for Unreal (like most of the engine mapping specific actors stuff), and therefore they didn't take "bots" into account, but only the "playerpawn".
Either ways, try this:
By my own experiments, I think it works with bStatic=True as well (if so, it's better for performance reasons), but try it like that first to see if it works as it is. Basically, both players and bots will be able to pass, but other pawns will "bump" on it and should not pass.
Also, I didn't test the code, so there's absolutelly no guarantees it will work (I built it in a few seconds).
Either ways, try this:
Code: Select all
class BlockMonstersFix extends Keypoint;
function Touch (actor Other)
{
if (Pawn(Other) != None && !Pawn(Other).bIsPlayer)
Other.Bump(self);
}
defaultproperties
{
bCollideActors=True
bStatic=False
}
Also, I didn't test the code, so there's absolutelly no guarantees it will work (I built it in a few seconds).
Re: Block Monsters, not Bots... Anyone know how to do this?
Will try that, Thanks :B Failing that, since Im rebuilding the queen area anyway (Damn BSP holes ) I'll just shrink the doorway so she can't get her fat ass thru
Re: Block Monsters, not Bots... Anyone know how to do this?
Didn't work Skaarj just ran right through it as if it wasn't even there :S
- Shadow
- Masterful
- Posts: 743
- Joined: Tue Jan 29, 2008 12:00 am
- Personal rank: Mad Carpenter
- Location: Germany
- Contact:
Re: Block Monsters, not Bots... Anyone know how to do this?
You should maybe try out the IsA function:
The bIsPlayer bool is rather irrelevant in this case, as ScriptedPawns don't have bIsPlayer = true
Code: Select all
function Touch (actor Other)
{
if (Pawn(Other) != None && !Pawn(Other).bIsPlayer && Pawn(Other).IsA('Skaarj'))
Other.Bump(self);
}
Re: Block Monsters, not Bots... Anyone know how to do this?
I just went ahead and changed the doorway in the end, lol, and by some miracle I didn't get a BSP explosion (I can't even add a cube without the map going OMGWTF .-.) Skaarj can still get thru, but as long as her heighness can't, its all good Thanks anyway
- Feralidragon
- Godlike
- Posts: 5493
- Joined: Wed Feb 27, 2008 6:24 pm
- Personal rank: Work In Progress
- Location: Liandri
Re: Block Monsters, not Bots... Anyone know how to do this?
That was the idea regarding bIsPlayer. Bots and Players have bIsPlayer=True, while other pawns do not. However, further code reading tells that some pawns alternate this variable, so it would give bugs anyway, so yeah, bIsPlayer is not suited for the job.Shadow wrote:You should maybe try out the IsA function:
The bIsPlayer bool is rather irrelevant in this case, as ScriptedPawns don't have bIsPlayer = trueCode: Select all
function Touch (actor Other) { if (Pawn(Other) != None && !Pawn(Other).bIsPlayer && Pawn(Other).IsA('Skaarj')) Other.Bump(self); }
In that case, IsA('ScriptedPawn') would be better, or perhaps create a name variable and then IsA(WhateverPawnNameVar), so a filtering could be defined by the mapper.
Perhaps Other.Bump(self) isn't working either for some pawns (well, since I already saw them "bumping" into stuff but keep going onto it lol).
So perhaps, it should be:
Code: Select all
class BlockMonstersFix extends Keypoint;
var() name PawnType;
function Touch (actor Other)
{
if (Pawn(Other) != None && Pawn(Other).IsA(PawnType))
{
Other.Bump(self);
Other.MoveSmooth(Other.OldLocation - Other.Location);
}
}
defaultproperties
{
PawnType=ScriptedPawn
bCollideActors=True
bStatic=False
}
- Shadow
- Masterful
- Posts: 743
- Joined: Tue Jan 29, 2008 12:00 am
- Personal rank: Mad Carpenter
- Location: Germany
- Contact:
Re: Block Monsters, not Bots... Anyone know how to do this?
Yeah of course using a name Variable for the PawnType is indeed more comfortable.
Re: Block Monsters, not Bots... Anyone know how to do this?
SkaarjTrooper :BShadow wrote:You should maybe try out the IsA function:
The bIsPlayer bool is rather irrelevant in this case, as ScriptedPawns don't have bIsPlayer = true
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Block Monsters, not Bots... Anyone know how to do this?
I know this thread is old, but is it still a problem? It would be simple to script a monster specific blocker that only blocks certain types of monsters/pawns.zacman wrote: I *Tried* using BlockMonster actors at the doorway
So long, and thanks for all the fish
Re: Block Monsters, not Bots... Anyone know how to do this?
BlockMonsters does indeed block also bots, if you don't mind seeing a couple of Skaarj flying you can use a Kicker that will affect only ScriptedPawns to achieve the same effect. It isn't a very subtle solution but I found it to be the most reliable...
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Block Monsters, not Bots... Anyone know how to do this?
Here's the entire code:
BlockMonsters is really a mis-naming of this actor. It's a block everything but playerpawn. You want a fixed one?
Code: Select all
class BlockMonsters extends Keypoint;
defaultproperties
{
bCollideActors=True
bBlockActors=True
}
So long, and thanks for all the fish