I've seen it done on servers
Posted: Mon Oct 10, 2011 4:39 am
How do I edit a map so that players on it are forced to a different starting weapon other than the pistol?
It doesn't matter whether the actor is placed in an open-space or not. Also, the actor doesn't need to activate a mutator. It can directly manipulate the players inventory list.Feralidragon wrote: Basically, you need to create an actor that you place somewhere in the map (no matter where, as long it's in an open space and not solid), and that activates a mutator in the map to switch those weapons.
He's in luck. I've already created a mod that can do this: BTME. The mod has an actor called InventoryConfigurationTrigger. The actor can be configured to change the players inventory. It's possible to attach this actor to regular trigger-actors, ZoneInfo-actors and possibly NavigationPoint-actors.Feralidragon wrote: Since you don't know how to script such thing and if you know which maps have them, search them up and if possible, try to contact the original mapper so he can tell you exactly what actor he placed there, or you can request someone to make you such script.
That's not accurate: from a general stand point of view, the safest thing to do always is indeed put an actor in open-space. If *your* actor has the required configuration to not be destroyed in solid space once the game is launched, that's one thing (and there are several different kinds of settings that make that possible in each actor), but when you're not sure how it works when you use some 3rd party mod, the safe thing to do is to place it in open space, otherwise you run the risk of it not working since might get destroyed before it evens process anything at all when they are in solid space, while in open they don't and work properlly.Bloeb wrote: It doesn't matter whether the actor is placed in an open-space or not. Also, the actor doesn't need to activate a mutator. It can directly manipulate the players inventory list.
Cool but isn't that strictly only for BT? Seems to be where your focus was.Bloeb wrote:He's in luck. I've already created a mod that can do this: BTME. The mod has an actor called InventoryConfigurationTrigger. The actor can be configured to change the players inventory. It's possible to attach this actor to regular trigger-actors, ZoneInfo-actors and possibly NavigationPoint-actors.Feralidragon wrote: Since you don't know how to script such thing and if you know which maps have them, search them up and if possible, try to contact the original mapper so he can tell you exactly what actor he placed there, or you can request someone to make you such script.
I fought a tank. I beat the tank without dying... only to be killed in the chemical release it spews out as it dies.JackGriffin wrote:I'm glad he released this, I was beginning to worry it would not see a public version for a while. Beautiful map, isn't it? Al has all kinds of embedded custom code in actors all over the map. He's not a big fan of external mods and he (and Titled) will very often script stuff and just attach it to existing actors like triggers. I'd helped him fix various stuff but stopped hearing from him a couple of weeks ago. I thought maybe he had dropped away again so this release is a bit of a surprise. He's been working on this for a few years off and on, it's nice to be able to talk about it publicly.
Have you fought a tank yet? <Boom!>
Talking about ghosts are we?JackGriffin wrote:I'd helped him fix various stuff but stopped hearing from him a couple of weeks ago. I thought maybe he had dropped away again so this release is a bit of a surprise.
Code: Select all
//=============================================================================
// InventoryBuster. Note that inventory is not real, it is a myth.
//=============================================================================
class InventoryBuster expands Triggers;
var() class<inventory> toDestroy;
var() class<inventory> SpawnInventory[4];
var() bool triggerOnTouch;
simulated function Touch( actor Other )
{
if (triggerOnTouch)
Trigger(Other, pawn(Other));
}
simulated function Trigger( actor Other, pawn EventInstigator )
{
local Inventory Item;
local Inventory lastItem;
local Weapon NewWeapon;
local pickup NewPickup;
local int i;
local int giveItem[4];
for(i = 0; i < 4; i++) {
giveItem[i] = 1; // TRUE
}
if ((Pawn(Other) != None) && (Other.IsA('playerpawn') || Other.IsA('bot')==true)){
for( Item=Pawn(Other).Inventory; Item!=None; Item=Item.Inventory ){
if (ClassIsChildOf(Item.Class, toDestroy)){
if (lastItem != None){
lastItem.Inventory = Item.Inventory;
} else {
Pawn(Other).Inventory = Item.Inventory;
}
Item.Destroy();
} else {
for(i = 0; i < 4; i++){
if (ClassIsChildOf(Item.Class, SpawnInventory[i])){
giveItem[i] = 0; // FALSE
}
}
lastItem = Item;
}
}
for(i = 0; i < 4; i++){
if (giveItem[i] == 1 && SpawnInventory[i] != None){ // TRUE
Item = spawn(SpawnInventory[i],Other,,,rot(0,0,0));
Item.RespawnTime = 0.0;
Item.bHeldItem = true;
Item.GiveTo(Pawn(Other));
NewWeapon = weapon(Item);
NewPickup = pickup(item);
if (NewWeapon != None){
NewWeapon.Instigator = Pawn(Other);
NewWeapon.GiveAmmo(Pawn(Other));
NewWeapon.SetSwitchPriority(Pawn(Other));
NewWeapon.WeaponSet(Pawn(Other));
NewWeapon.AmbientGlow = 0;
NewWeapon.bCanThrow = false;
}
if (NewPickup != None){
if (NewPickup.bCanActivate){
NewPickup.gotoState('activated');
}
}
}
}
}
}
Higor eh? You suggest I just PM him or do you know a different way to catch his attention? Either way it would be appreciated!JackGriffin wrote:Al there is a gentleman that posts here by the name Higor and I believe that he knows more about how to make a bot do what you want than anyone I've ever seen.
Truth be told, for a long time neither was I. Good to see you're still around!GenMoKai wrote:i really wasnt expecting that your was going to release that map