Hyper.nl Unreal Services Forum Index Hyper.nl Unreal Services
The forum of Hyper.nl Unreal Services and the semi-offical resource for Winged Unicorn's Unreal mods
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

did any one know about this ?

 
Post new topic   Reply to topic    Hyper.nl Unreal Services Forum Index -> General
View previous topic :: View next topic  
Author Message
Hybrid



Joined: 07 Mar 2005
Posts: 193
Location: TZ Warp Forge

PostPosted: Sun May 08, 2005 11:26 pm    Post subject: did any one know about this ? Reply with quote

i was fiddleing with the editor and in movment there "mass"...spike told me that if u set the mass to 2 or lower you can type "grab" in the console and pick it up(bites u cant pick up players) (that be a fun mod..cat and mouse)
_________________
Long live Unreal! -Hybrid
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
BOZO



Joined: 11 Oct 2004
Posts: 48

PostPosted: Mon May 09, 2005 9:31 pm    Post subject: Reply with quote

Here is the relevant code that controls this for Pawns:



Code:

function DropDecoration()
{
   if (CarriedDecoration != None)
   {
      CarriedDecoration.bWasCarried = true;
      CarriedDecoration.SetBase(None);
      CarriedDecoration.SetPhysics(PHYS_Falling);
      CarriedDecoration.Velocity = Velocity + 10 * VRand();
      CarriedDecoration.Instigator = self;
      CarriedDecoration = None;
   }
}

function GrabDecoration()
{
   local vector lookDir, HitLocation, HitNormal, T1, T2, extent;
   local actor HitActor;

   if ( carriedDecoration == None )
   {
      //first trace to find it
      lookDir = vector(Rotation);
      lookDir.Z = 0;
      T1 = Location + BaseEyeHeight * vect(0,0,1) + lookDir * 0.8 * CollisionRadius;
      T2 = T1 + lookDir * 1.2 * CollisionRadius;
      HitActor = Trace(HitLocation, HitNormal, T2, T1, true);
      if ( HitActor == None )
      {
         T1 = T2 - (BaseEyeHeight + CollisionHeight - 2) * vect(0,0,1);
         HitActor = Trace(HitLocation, HitNormal, T1, T2, true);
      }
      else if ( HitActor == Level )
      {
         T2 = HitLocation - lookDir;
         T1 = T2 - (BaseEyeHeight + CollisionHeight - 2) * vect(0,0,1);
         HitActor = Trace(HitLocation, HitNormal, T1, T2, true);
      }   
      if ( (HitActor == None) || (HitActor == Level) )
      {
         extent.X = CollisionRadius;
         extent.Y = CollisionRadius;
         extent.Z = CollisionHeight;
         HitActor = Trace(HitLocation, HitNormal, Location + lookDir * 1.2 * CollisionRadius, Location, true, extent);
      }

      if ( Mover(HitActor) != None )
      {
         if ( Mover(HitActor).bUseTriggered )
            HitActor.Trigger( self, self );
      }      
      else if ( (Decoration(HitActor) != None)  && ((weapon == None) || (weapon.Mass < 20)) )
      {
         CarriedDecoration = Decoration(HitActor);
         if ( !CarriedDecoration.bPushable || (CarriedDecoration.Mass > 40)
            || (CarriedDecoration.StandingCount > 0) )
         {
            CarriedDecoration = None;
            return;
         }
         lookDir.Z = 0;            
         if ( CarriedDecoration.SetLocation(Location + (0.5 * CollisionRadius + CarriedDecoration.CollisionRadius) * lookDir) )
         {
            CarriedDecoration.SetPhysics(PHYS_None);
            CarriedDecoration.SetBase(self);
         }
         else
            CarriedDecoration = None;
      }
   }
}



The meat of the operation is for a thing to be picked up has to be subclassed off of Decoration. Its mass must be less than or equal to 40 and it must not have its bPushable setting set to true. Also you cannot be carrying a weapon with a mass greater than 20 at the time you try to do the grab. You can also only pick up the top object from a stack of objects.

It gives me a good idea to build a level made completely from movable stuff...
_________________
Darn Floppy Feet!!

{KDS}BOZO / <NDP>BOZO / LordBozo
bozo@kds-clan.com
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Hyper.nl Unreal Services Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group