Respawn

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

Moderator: Forum Guards

Respawn

Postby Trailmix » Wed Mar 30, 05 5:37 am

How do make it so the regular weps (assaultrifle, shotgun, sniper..etc.) don't respawn in MP?
Image
Trailmix
Poster
 
Posts: 205
Joined: Tue Nov 16, 04 6:44 am
Location: California, USA

Postby clyzm » Wed Mar 30, 05 7:12 am

There's a setting in the weapon's properties (weaponai if i remember) that says "WeaponRespawn" set it to true or something ...
Image
User avatar
clyzm
Forum Master God
 
Posts: 16023
Joined: Sun Nov 28, 04 2:48 am
Location: Chiraq

Postby Trailmix » Wed Mar 30, 05 7:25 am

Well that's extended in DeusExWeapon, but that's only for DXSP i think.
Image
Trailmix
Poster
 
Posts: 205
Joined: Tue Nov 16, 04 6:44 am
Location: California, USA

Postby clyzm » Wed Mar 30, 05 7:32 am

Dunno ...

try looking at the properties of DXMP weapons like LAWS and lams
Image
User avatar
clyzm
Forum Master God
 
Posts: 16023
Joined: Sun Nov 28, 04 2:48 am
Location: Chiraq

Postby AlexDenton » Wed Mar 30, 05 12:22 pm

im afraid its impossible

its built into the MP engine for the weapons to automatically re-spawn after a certain amount of time, and the mapper only has control over the amount of time it takes for those weapons to re-spawn

ie- the weapon rack respawns as soon as the weapon is picked up

things like Meds take 30 seconds etc
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 Dae » Wed Mar 30, 05 12:56 pm

Add destroy() in the end of the frob() function. That's all :lol:
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby AlexDenton » Wed Mar 30, 05 2:40 pm

does that bypass the MP engine's automatic command to re-spawn items?
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 Dae » Wed Mar 30, 05 4:41 pm

Destroy() destroys the class. If theres no class, theres nothing to respawn.
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby Flip » Wed Mar 30, 05 5:12 pm

But say if there is 3 assault rifles, won't that destroy them all, if only one is picked up?
Image
User avatar
Flip
Poster
 
Posts: 299
Joined: Sun Sep 07, 03 3:36 pm
Location: ROLF!!1 :O

Postby Trailmix » Wed Mar 30, 05 7:01 pm

Yes that kind of defeats the purpose of what I am asking.

Well, I have been thinking, instead of having party-map shops run by people, and having abuse of it when no admin is present. That weapon vending machines be placed instead. The coding for that is already done, but when I tested it, the weapons didn't go away.

That way also has more security.
Image
Trailmix
Poster
 
Posts: 205
Joined: Tue Nov 16, 04 6:44 am
Location: California, USA

Postby AlexDenton » Wed Mar 30, 05 7:06 pm

edit the engine :D
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 Dae » Wed Mar 30, 05 7:59 pm

Ray wrote:Yes that kind of defeats the purpose of what I am asking.

Well, I have been thinking, instead of having party-map shops run by people, and having abuse of it when no admin is present. That weapon vending machines be placed instead. The coding for that is already done, but when I tested it, the weapons didn't go away.

That way also has more security.

Was that hard to you to tell this in the first post ? It's simple to do. :) But it has numerous solutions.
There is one, that looks like:
ItemFromMachine.LifeSpan = 10;
- add in properties of spawned item.

For example, i'll take a part of the code from VendingMachine class (DeusEx.u)

if (product != None)
{
if (product.IsA('Sodacan'))
PlaySound(sound'VendingCan', SLOT_None);
else
PlaySound(sound'VendingSmokes', SLOT_None);
product.Velocity = Vector(Rotation) * 100;
product.bFixedRotationDir = True;
product.RotationRate.Pitch = (32768 - Rand(65536)) * 4.0;
product.RotationRate.Yaw = (32768 - Rand(65536)) * 4.0;
<b>product.LifeSpan = 10;</b> // now, it will disappear in some time
}


Marco goddamnit, if you learned a word 'engine' theres no need to say it in every posting!! 8)
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby clyzm » Wed Mar 30, 05 8:13 pm

Or, you could build a WeaponRespawn class in a different mod, sort of the code that goes like this *following respawn.uc*

WeaponRespawn extends Respawn

/ / This is what we do to spawn the items.
Frob() destroy()


and so forth ... like this

/ / We respawn only THESE actors
.WeaponRifle
.WeaponAssaultGun


et cetera, et cetera ... and then add this little line

/ / Now, we should add this property for spawning to make easier
Property.'SpawnClass'
extends respawn

and then, it would generate something like in the properties of a respawner class

"SpawnClass" and you can choose the weapons you wanted to respawn in the code et cetera

I'm not really into UED code, and this is just a memory i had once .. so it has a lot of problems in there ... don't blame me for 'em.
Image
User avatar
clyzm
Forum Master God
 
Posts: 16023
Joined: Sun Nov 28, 04 2:48 am
Location: Chiraq

Postby Trailmix » Wed Mar 30, 05 8:21 pm

Ok thanks guys. :)
Image
Trailmix
Poster
 
Posts: 205
Joined: Tue Nov 16, 04 6:44 am
Location: California, USA

Postby Trailmix » Wed Mar 30, 05 8:28 pm

Ok thanks everyone. It works now. :)
Image
Trailmix
Poster
 
Posts: 205
Joined: Tue Nov 16, 04 6:44 am
Location: California, USA


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 6 guests