Page 1 of 1

Only one player in artillery ?

Posted: Mon Sep 05, 2011 7:38 am
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 ).

Re: Only one player in artillery ?

Posted: Mon Sep 05, 2011 9:37 pm
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. :(

Re: Only one player in artillery ?

Posted: Fri Dec 21, 2012 6:48 pm
by freddy
Been long time since i fiddled with this, but what if just remove the networkinfo from the second pco?

Re: Only one player in artillery ?

Posted: Sat Dec 22, 2012 4:30 pm
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

Re: Only one player in artillery ?

Posted: Sat Dec 22, 2012 8:30 pm
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.