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

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

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

Postby MainMan » Sun Oct 30, 05 9:35 am

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
Last edited by MainMan on Sat Nov 05, 05 7:34 pm, edited 2 times in total.
<center>ty m7
</center>
User avatar
MainMan
<i>Tru' Playa' Fer Defs</i>
 
Posts: 4655
Joined: Sun Jun 05, 05 7:38 am
Location: London, UK

Postby Gishank » Sun Oct 30, 05 3:12 pm

it's a trigger u add to an item or to the floor
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Postby MainMan » Sun Oct 30, 05 3:22 pm

(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.
<center>ty m7
</center>
User avatar
MainMan
<i>Tru' Playa' Fer Defs</i>
 
Posts: 4655
Joined: Sun Jun 05, 05 7:38 am
Location: London, UK

Postby Alex » Sun Oct 30, 05 3:43 pm

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.
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby Gishank » Sun Oct 30, 05 4:44 pm

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.
Last edited by Gishank on Thu Jan 05, 06 1:46 pm, edited 1 time in total.
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Postby Alex » Sun Oct 30, 05 4:56 pm

That, is called flooding.
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby MainMan » Sun Oct 30, 05 5:55 pm

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:
}
<center>ty m7
</center>
User avatar
MainMan
<i>Tru' Playa' Fer Defs</i>
 
Posts: 4655
Joined: Sun Jun 05, 05 7:38 am
Location: London, UK

Postby Alex » Sun Oct 30, 05 6:55 pm

Ok, i switched those 2, but the rest worked for me :P
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby AlexDenton » Sun Oct 30, 05 7:00 pm

(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?
Hey! Hey, Guys! Check My Girlfriend's Rack!
Image
User avatar
AlexDenton
Forum Legend
 
Posts: 5694
Joined: Fri Jun 18, 04 9:57 pm
Location: Passed out in a hotel bathroom.

Postby Wasted » Wed Jan 04, 06 4:10 pm

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?
FFS
User avatar
Wasted
Forum Hero
 
Posts: 2861
Joined: Sun Oct 30, 05 6:29 pm
Location: 1337 14ND

Postby Rödewijk » Wed Jan 04, 06 4:49 pm

~€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:
Rödewijk
Master
 
Posts: 1028
Joined: Tue Jun 28, 05 10:40 am

Postby Gishank » Wed Jan 04, 06 5:14 pm

I do have a reason to be here and that wasn't spamming little boy it was floodding :P
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Postby AgentSmyth » Wed Jan 04, 06 7:13 pm

~€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...
<font color="red" size="1">Who Said Life Was Fair</font>
Image
User avatar
AgentSmyth
Regular
 
Posts: 396
Joined: Fri Oct 01, 04 6:05 pm
Location: On my Computer

Postby MainMan » Wed Jan 04, 06 7:37 pm

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
<center>ty m7
</center>
User avatar
MainMan
<i>Tru' Playa' Fer Defs</i>
 
Posts: 4655
Joined: Sun Jun 05, 05 7:38 am
Location: London, UK

Postby [Z]COCO-POPS » Wed Jan 04, 06 7:40 pm

where do u put the spawn object file?
Image
User avatar
[Z]COCO-POPS
Newbie
 
Posts: 8
Joined: Wed Jan 04, 06 7:34 pm
Location: Manchester/uk

Postby Wasted » Wed Jan 04, 06 8:23 pm

I wasnt being mean there, thats nothin
FFS
User avatar
Wasted
Forum Hero
 
Posts: 2861
Joined: Sun Oct 30, 05 6:29 pm
Location: 1337 14ND

Postby Bob » Wed Jan 04, 06 8:52 pm

~€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.
Bob
Forum God
 
Posts: 8552
Joined: Sun Apr 25, 04 9:14 pm
Location: Scotland - Marco's House =P


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 2 guests
cron