Probably doing the same thing as Gazz one post below me,but is there a console command or something similar in kismet that will allow me to add x ammount of ammo to a exisiting UTWeapon?I was thinging of a the get property node but since i dont have a weapon var i cant plug anything.(Im trying to do a simple test with a link gun to see if it works)for future use.
class SeqAct_AllActors extends SequenceAction;
var() class<Actor> ActorClass;
var() class<Interface> InterfaceClass;
var() bool AlwaysClearObjectList;
var() bool DynamicActorsOnly;
event Activated()
{
local Actor Actor;
local WorldInfo WorldInfo;
local array<SequenceObject> ObjectList;
local SeqVar_ObjectList SeqVar_ObjectList;
if (ActorClass != None)
{
WorldInfo = class'WorldInfo'.static.GetWorldInfo();
if (WorldInfo != None)
{
// Get the object list seq var
GetLinkedObjects(ObjectList, class'SeqVar_ObjectList', false);
if (ObjectList.Length > 0)
{
SeqVar_ObjectList = SeqVar_ObjectList(ObjectList[0]);
if (SeqVar_ObjectList != None)
{
if (AlwaysClearObjectList)
{
SeqVar_ObjectList.ObjList.Length = 0;
}
if (DynamicActorsOnly)
{
ForEach WorldInfo.DynamicActors(ActorClass, Actor, InterfaceClass)
{
SeqVar_ObjectList.ObjList.AddItem(Actor);
}
}
else
{
ForEach WorldInfo.AllActors(ActorClass, Actor, InterfaceClass)
{
SeqVar_ObjectList.ObjList.AddItem(Actor);
}
}
}
}
}
}
ActivateOutputLink(0);
}
defaultproperties
{
ObjName="All Actors"
ObjCategory="Iterators"
InputLinks(0)=(LinkDesc="In")
OutputLinks(0)=(LinkDesc="Out")
VariableLinks.Empty
VariableLinks(0)=(ExpectedType=class'SeqVar_ObjectList',LinkDesc="Out Objects",bWriteable=true)
}
this is a custom ‘all actors iterator’ for kismet that will allow you to get the weapon var.hopefully you can use it to do what you need.
I did not write it and im afraid I don’t remember who did.it was part of a pack I downloaded from the old forums many years ago.
create the .uc file in the utgame/classes folder and compile.you can then find it in kismet,new action,iterators
Thanks .I will take a look on monday as my head is about to burst.Wish I was more helpful with the scripting parts on the forums.
Looks like the kismet comes from here
https://udn.epicgames.com/Three/DevelopmentKitGemsIteratorKismetNodes.html
Will see what I can find useful.