SpawnSwitch Error...

- Code: Select all
class SpawnButton expands AAPickupSet;
#exec OBJ LOAD FILE=Ambient
var() Class product;
Var() int CreditCost;
function Frob(actor Frobber, Inventory frobWith)
{
local DeusExPlayer player;
local Vector loc;
local Pickup product;
player = DeusExPlayer(Frobber);
if (player != None)
{
if (player.Credits >= CreditCost)
{
PlaySound(sound'Beep5', SLOT_None);
loc = Vector(Rotation) * CollisionRadius * 0.8;
loc.Z -= CollisionHeight * 0.7;
loc += Location;
if (product != None)
{
product.Velocity = Vector(Rotation) * 100;
product.bFixedRotationDir = True;
product.RotationRate.Pitch = (32768 - Rand(65536)) * 4.0;
product.RotationRate.Yaw = (32768 - Rand(65536)) * 4.0;
}
player.Credits -= CreditCost;
}
else
player.ClientMessage("Insufficient Funds");
}
}
Function Prebeginplay()
{ItemName="RPG Shop Summon Switch.";}
This is my spawnswitch code, it works, but i want it to summon a class settable in the properties, and it doesnt summon anything at the moment.(I havent added the code to, i dont know it...)
Can someone give me the code to make a summonable class that you can change in the properties plz
