Page 1 of 1

[Solved by MainMan/[A]lex] help with coding

PostPosted: Sun Oct 30, 05 9:35 am
by MainMan
ok, how do i make a code that spawns something in my inventory?

eg a pickup, that when i activate it, it spawns something in my inventory

PostPosted: Sun Oct 30, 05 3:12 pm
by Gishank
it's a trigger u add to an item or to the floor

PostPosted: Sun Oct 30, 05 3:22 pm
by MainMan
(kcw)L)klop wrote:it's a trigger u add to an item or to the floor


klop cant you take a hint? please shut up, youre spamming in every one of my posts.

PostPosted: Sun Oct 30, 05 3:43 pm
by Alex
Here, don't mind that it's build in the sodacan class, i just love using that class :P

Code: Select all
//=============================================================================
// Sodacan.
//=============================================================================
class Sodacan extends DeusExPickup;

state Activated
{
   function Activate()
   {
      // can't turn it off
   }

   function BeginState()
   {
      local DeusExPlayer Player;
      local SpawnObject Inventory;
      Super.BeginState();
      Player = DeusExPlayer(Owner);
          SpawnObject = Spawn(Class'Your Class Name Here');
          SpawnObject.Frob(Player,none);
          SpawnObject.Destroy();
      UseOnce();

   }
Begin:
}

defaultproperties
{
     maxCopies=10
     bCanHaveMultipleCopies=True
     bActivatable=True
     ItemName="Soda"
     ItemArticle="some"
     PlayerViewOffset=(X=30.000000,Z=-12.000000)
     PlayerViewMesh=LodMesh'DeusExItems.Sodacan'
     PickupViewMesh=LodMesh'DeusExItems.Sodacan'
     ThirdPersonMesh=LodMesh'DeusExItems.Sodacan'
     LandSound=Sound'DeusExSounds.Generic.MetalHit1'
     Icon=Texture'DeusExUI.Icons.BeltIconSodaCan'
     largeIcon=Texture'DeusExUI.Icons.LargeIconSodaCan'
     largeIconWidth=24
     largeIconHeight=45
     Description="The can is blank except for the phrase 'PRODUCT PLACEMENT HERE.' It is unclear whether this is a name or an invitation."
     beltDescription="SODA"
     Mesh=LodMesh'DeusExItems.Sodacan'
     CollisionRadius=3.000000
     CollisionHeight=4.500000
     Mass=5.000000
     Buoyancy=3.000000
}


That should work.

PostPosted: Sun Oct 30, 05 4:44 pm
by Gishank
kaner wrote:
(kcw)L)klop wrote:it's a trigger u add to an item or to the floor


klop cant you take a hint? please shut up, youre spamming in every one of my posts.


look this isn't spamming
(kcw)L)klop wrote:it's a trigger u add to an item or to the floor



this would be

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor

x many times

You get the picture


EDIT BY KLOP: Ha Ha HA Very funny,please don't fuck my posts up again.

PostPosted: Sun Oct 30, 05 4:56 pm
by Alex
That, is called flooding.

PostPosted: Sun Oct 30, 05 5:55 pm
by MainMan
um well firstly, you got the SpawnObject and Inventory the wrong way round lol, and secondly, it does NOT work!!!

it says 'you found a (whatever)' but its not in the inventory...


EDIT:::::

I just fixed it;

Code: Select all
state Activated
{
   function Activate()
   {
      // can't turn it off
   }

   function BeginState()
   {
   local DeusExPlayer Player;
   local Inventory SpawnObject;
   Super.BeginState();
   Player = DeusExPlayer(Owner);
   SpawnObject = Spawn(Class'yoursupernoobhackedweapon');
   SpawnObject.Frob(Player,none);
   SpawnObject.bInObjectBelt = True;
   if(SpawnObject.Owner != Player)
      SpawnObject.Destroy();

   UseOnce();

   }
Begin:
}

PostPosted: Sun Oct 30, 05 6:55 pm
by Alex
Ok, i switched those 2, but the rest worked for me :P

PostPosted: Sun Oct 30, 05 7:00 pm
by AlexDenton
(kcw)L)klop wrote:
kaner wrote:
(kcw)L)klop wrote:it's a trigger u add to an item or to the floor


klop cant you take a hint? please shut up, youre spamming in every one of my posts.


look this isn't spamming
(kcw)L)klop wrote:it's a trigger u add to an item or to the floor



this would be

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor

(kcw)L)klop wrote:it's a trigger u add to an item or to the floor


You get the picture


Awwe... :smt049

Did you type that ALL out just for me?

PostPosted: Wed Jan 04, 06 4:10 pm
by Wasted
Klop u have no buisness here leave!
actually nor do I, but i dont spam so ill stay. Was that for ur undercover pack main?

PostPosted: Wed Jan 04, 06 4:49 pm
by Rödewijk
~€Wasted€~ wrote:Klop u have no buisness here leave!
actually nor do I, but i dont spam so ill stay. Was that for ur undercover pack main?


wel u just for being rude to klop :roll:

PostPosted: Wed Jan 04, 06 5:14 pm
by Gishank
I do have a reason to be here and that wasn't spamming little boy it was floodding :P

PostPosted: Wed Jan 04, 06 7:13 pm
by AgentSmyth
~€Wasted€~ wrote:Klop u have no buisness here leave!
actually nor do I, but i dont spam so ill stay. Was that for ur undercover pack main?


your being kinda mean arnt you...

PostPosted: Wed Jan 04, 06 7:37 pm
by MainMan
AgentSmyth wrote:
~€Wasted€~ wrote:Klop u have no buisness here leave!
actually nor do I, but i dont spam so ill stay. Was that for ur undercover pack main?


your being kinda mean arnt you...


Yeah, but it's klop, so it's A-okay

PostPosted: Wed Jan 04, 06 7:40 pm
by [Z]COCO-POPS
where do u put the spawn object file?

PostPosted: Wed Jan 04, 06 8:23 pm
by Wasted
I wasnt being mean there, thats nothin

PostPosted: Wed Jan 04, 06 8:52 pm
by Bob
~€Wasted€~ wrote:Klop u have no buisness here leave!
actually nor do I, but i dont spam so ill stay. Was that for ur undercover pack main?


I'm giving you a warning, you have already been told about challenging the intelligence of others when your own is clearly minute. This added with reviving a thread that has been signed, sealed, delivered so to speak.