Only one player in artillery ?

Ask questions, discuss ideas, get answers
Post Reply
X=X=X=X=X=X=X=X
Posts: 17
Joined: Fri Aug 19, 2011 3:43 pm

Only one player in artillery ?

Post by X=X=X=X=X=X=X=X »

Server side mod :

Is it possible to mod artillery ( wespe, priest, katyusha ) so that when one player occupies it, no one else is able to enter ?

The player in the artillery should still be able to use both driving and firing function.

( Wespe, priest and katyusha has space for two players per default ).
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Only one player in artillery ?

Post by Apache Thunder »

As a server side mod likely not. The weapons are addTemplated to a second PCO position that controls the turret and such. They would have to be removed from the second PCO position and addTemplated to the main PCO. I don't see this happening in a server side mod. :(
ImageImageImage
I have cameras in your head!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Only one player in artillery ?

Post by freddy »

Been long time since i fiddled with this, but what if just remove the networkinfo from the second pco?
User avatar
one
Posts: 50
Joined: Thu Sep 15, 2011 4:14 pm

Re: Only one player in artillery ?

Post by one »

I don't think it was intended that both functions should be available for driver PCO. As I understood, when someone is in any Katyusha's position nobody is able to enter another (free) position.
It's easy to make only half:
1. if someone is in driver position nobody can enter a gunner position, but after he himself moves to it everybody can take a driver position;
2. the same but conversely.
But it's very hard (or impossible?) to release both of them simultaneously. Nevertheless, I tried to do it, but only mentioned in 1 works. I tried to use variables for disabling driver position entry when the gunner is occupied. I don't know why, but v_id variable doesn't change if player.vehicle changes. Also player.vehicle is "Unknown object or method!", but works fine in debugger console.
It'd be nice if someone could test this more and find a solution :)

Code: Select all

rem ***Disabling Katyusha entry when PCO1 (gunner) is occupied***

var v_id
var v_activetemplate

player.vehicle -> v_id
ObjectTemplate.active -> v_activetemplate

object.active v_id

if v_activetemplate == Katyusha_PCO1

ObjectTemplate.active KatyushaComplex
ObjectTemplate.removeTemplate 3
ObjectTemplate.removeTemplate 4
ObjectTemplate.addTemplate Katyusha_Entry
ObjectTemplate.setPosition 0/100/1.7
ObjectTemplate.addTemplate Katyusha_Entry
ObjectTemplate.setPosition 0/100/-0.199

endif

rem ***Disabling PCO1 (gunner) entry***

ObjectTemplate.active Katyusha_PCO1
ObjectTemplate.removeTemplate 1
ObjectTemplate.addTemplate Katyusha_Entry
ObjectTemplate.setPosition 0/100/-0.199
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Only one player in artillery ?

Post by Swaffy »

You can't just remove the secondary PCO and addTemplate the missile rack to the Complex bundle?
ObjectTemplate.addTemplate Katyusha_Ramp_Rot

Of course, you'd have to fix the entries, cameras, etc.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply