View Single Post
Old 15th Jun 2008, 10:56 PM   #10
Fuzzy Bunny
Member
 
Fuzzy Bunny's Avatar
 
Registered: Sep 2004
Location: In before Moses
Posts: 4,002
Kind of fumbling about in the dark, but this might help:
Code:
function BeginPlay()
{
	Super.BeginPlay();

	// when summoned needs to be set up
	if ( AoGameInfo(Level.Game) != None )
	{
		AoGameInfo(Level.Game).SetupNPC(self);
		AoGameInfo(Level.Game).AddDefaultInventory(self);
	}
	// add weapon
	Primary=AoGiveWeapon("AoEFRCode.AoDSMG_Conelly");
	Secondary=AoGiveWeapon("AoEFRCode.AoDSMG_Conelly");
    	GiveClips("AoEFRCode.AoDSMG_Conelly", 20);
	//GiveSecondaryAmmo("AoTelicBeta.AoDSMG",4);

	// bring it up
	if ( Primary != None)
		SwitchToBestWeapon();
}
Part of Conelly's code that might be relevant; taken from the AoEFRCode.u file.

Code:
// class of the current weapon this pawn is using
var class<AoWeapon> MarineWeaponClass;

// this marine's marineinfo object
var AoMarineInfo MarineInfo;

// primary and secondary equipment slots
var Inventory Primary;
var Inventory Secondary;
var Inventory Extra;

var Actor LastDroppedPickup;	// the last pickup we spawned when dropping an item
var int SelectedSlot;       //1=primary 2=secondary 3=extra
This is from the AoMarine class, and I think subclasses inherit everything from the original class.



My actual knowledge of uscript is a bit sketchy, so I don't really know if this helps or not
Fuzzy Bunny is offline   Reply With Quote