Page 1 of 1

Need help from the "top-notch editing specialists"

PostPosted: Sat Dec 31, 05 4:26 pm
by MainMan
This is for my RPG map. I've made a bank, and each player has his own vault. I want the items to stay in there forever if they are deposited (but not respawn, obviously). Here is my code for the zone:

Code: Select all
//=============================================================================
//
//=============================================================================
class MMRPGBankArea extends MMRPGSafeArea;

event ActorEntered( actor Other )
{
   Super.ActorEntered(Other);

   if(Other.isA('DeusExProjectile'))
   {
      if((Other.IsA('MMRPGCreditsProjectile'))||(Other.IsA('MMRPGCreditsProjectileFive'))||(Other.IsA('MMRPGCreditsProjectileTen')))
      {
         Other.Lifespan = 0.0;
         
      }

   }

   if(Other.isA('Inventory'))
   {
      if (Other.IsInState('Pickup'))
      {
         Inventory(Other).LifeSpan = 0.0;
         Inventory(Other).RespawnTime = 0.0;
      }
   }
}

event ActorLeaving( actor Other )
{
   Super.ActorLeaving(Other);

}


defaultproperties
{
}


Ok now as you can see there are 2 parts.

The first part deals with credits (which in my case extend deusexprojectile), but override some features. This part works in single player, but not in multiplayer. In MP, they just destroy themselves as usual.

The second part deals with items. The code works only partially, - this is what happens:
1. you pickup weapon.
2. you throw it in safe.
3. it stays there forever.
4. you pick it up again.
5. you throw it in safe (again).
6. It destroys itself like in a normal zone.




Help is much appreciated! :shock:

PostPosted: Sat Dec 31, 05 5:00 pm
by Alex
I think you fucked up the leaving part, you need to set back it's settings. So not lifespan=0.0 etc.

PostPosted: Sat Dec 31, 05 5:50 pm
by MainMan
Ok I've sorted out the problem with the credits. I had to override Tick(float deltatime) in the projectile.

Now i only need to fix the weapon thing.

PostPosted: Sat Dec 31, 05 8:27 pm
by Spiderbot01
Darkforce bank vaults were able to store weapons, though once you left the server they went, so maybe you could look at the code?

PostPosted: Sat Dec 31, 05 8:50 pm
by Wasted
Well if someone top notch comes, I will ahv to quote them and pretend That i know remotely what ur on about

PostPosted: Sat Dec 31, 05 9:22 pm
by Alex
[Z]_Spiderbot01_[Z] wrote:Darkforce bank vaults were able to store weapons, though once you left the server they went, so maybe you could look at the code?

Do they? All I can remember is that they can save money.

PostPosted: Sat Dec 31, 05 10:18 pm
by Spiderbot01
No in DF mall there were ones you could open an put weps in...

PostPosted: Sun Jan 01, 06 6:36 pm
by Wasted
Well as long as u dont put something in, and then nobody else can open it when u leave

PostPosted: Sun Jan 01, 06 6:52 pm
by Allan
Or follow you in in cloaked form... That would be a nightmare scenario

"Allan is about to deposit 1,000,000 credits into his bank, but is followed by player_133 who sees fit to cloak and follow me in, disabling all the shields, so he doesnt get detected. After Allan leaves, Player helps himself to more that 70% of Allan's money! NOOOOOOOOOOOO!!!!!!!!!"

Here are a few protections i use for the protection of safes.

an EMP Field that saps 100Emp per second out of you. You suffer, but it's worth it when a cloaker just pops out of thin air :P

Beam triggers/Lasertriggers. The only ways to remove these are a dead giveaway to your location, and going through them makes a noise, so listen out for unwanted intruders...

PostPosted: Sun Jan 01, 06 8:09 pm
by Wasted
Main doesnt have augs on his server. :D I know what ur talkin bout! Im a genius!

PostPosted: Mon Jan 02, 06 8:19 pm
by MainMan
ah screw you top notches, i've already figured this one out myself :D

PostPosted: Mon Jan 02, 06 8:22 pm
by Allan
lol, we top notchers=screwed XD

Please, do tell us MainMan, how did you make the safe,um..., safe?

PostPosted: Mon Jan 02, 06 8:26 pm
by Wasted
I been there its pretty good, The doors rock main

PostPosted: Mon Jan 02, 06 8:27 pm
by MainMan
ok for projectiles (credits in my case) you need to make sure they do not super.tick(deltatime) - edit the projectile file, so this makes everything a whole lot simpler.

For the inventory items, i edited the zone (from the first post) like so:

Code: Select all
   if(Other.isA('Inventory'))
   {
      Inventory(Other).LifeSpan = 0;
      Inventory(Other).RespawnTime = 0;
      Inventory(Other).bTossedOut = True;
   }


and then obviously put it back to the default upon actorexit.

PostPosted: Mon Jan 02, 06 8:29 pm
by MainMan
Wasted wrote:I been there its pretty good, The doors rock main


I also made some shops that you can buy and own, so you can sell your own stuff yourself. :D

PostPosted: Mon Jan 02, 06 8:49 pm
by Wasted
mm not bad, Put it up