Need help from the "top-notch editing specialists"

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

Moderator: Forum Guards

Need help from the "top-notch editing specialists"

Postby MainMan » Sat Dec 31, 05 4:26 pm

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:
<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 » Sat Dec 31, 05 5:00 pm

I think you fucked up the leaving part, you need to set back it's settings. So not lifespan=0.0 etc.
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby MainMan » Sat Dec 31, 05 5:50 pm

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.
<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 Spiderbot01 » Sat Dec 31, 05 8:27 pm

Darkforce bank vaults were able to store weapons, though once you left the server they went, so maybe you could look at the code?
<center>------</center><center>
Image</center>
<center>Image</center><
User avatar
Spiderbot01
Alpha
 
Posts: 5363
Joined: Wed Nov 30, 05 8:24 pm
Location: LONDON!!!!

Postby Wasted » Sat Dec 31, 05 8:50 pm

Well if someone top notch comes, I will ahv to quote them and pretend That i know remotely what ur on about
FFS
User avatar
Wasted
Forum Hero
 
Posts: 2861
Joined: Sun Oct 30, 05 6:29 pm
Location: 1337 14ND

Postby Alex » Sat Dec 31, 05 9:22 pm

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

Postby Spiderbot01 » Sat Dec 31, 05 10:18 pm

No in DF mall there were ones you could open an put weps in...
<center>------</center><center>
Image</center>
<center>Image</center><
User avatar
Spiderbot01
Alpha
 
Posts: 5363
Joined: Wed Nov 30, 05 8:24 pm
Location: LONDON!!!!

Postby Wasted » Sun Jan 01, 06 6:36 pm

Well as long as u dont put something in, and then nobody else can open it when u leave
FFS
User avatar
Wasted
Forum Hero
 
Posts: 2861
Joined: Sun Oct 30, 05 6:29 pm
Location: 1337 14ND

Postby Allan » Sun Jan 01, 06 6:52 pm

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...
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Wasted » Sun Jan 01, 06 8:09 pm

Main doesnt have augs on his server. :D I know what ur talkin bout! Im a genius!
FFS
User avatar
Wasted
Forum Hero
 
Posts: 2861
Joined: Sun Oct 30, 05 6:29 pm
Location: 1337 14ND

Postby MainMan » Mon Jan 02, 06 8:19 pm

ah screw you top notches, i've already figured this one out myself :D
<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 Allan » Mon Jan 02, 06 8:22 pm

lol, we top notchers=screwed XD

Please, do tell us MainMan, how did you make the safe,um..., safe?
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Wasted » Mon Jan 02, 06 8:26 pm

I been there its pretty good, The doors rock main
FFS
User avatar
Wasted
Forum Hero
 
Posts: 2861
Joined: Sun Oct 30, 05 6:29 pm
Location: 1337 14ND

Postby MainMan » Mon Jan 02, 06 8:27 pm

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.
Last edited by MainMan on Tue Jan 03, 06 11:33 am, edited 1 time 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 MainMan » Mon Jan 02, 06 8:29 pm

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
<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 Wasted » Mon Jan 02, 06 8:49 pm

mm not bad, Put it up
FFS
User avatar
Wasted
Forum Hero
 
Posts: 2861
Joined: Sun Oct 30, 05 6:29 pm
Location: 1337 14ND


Return to Editing issues

Who is online

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