Deployable Command Centers

SmokeyMeadow

Well-Known Member
Hey guys. Just sharing some requested code from a WIP script I've been playing around with. This script will allow your players to refold any of the HQ buildings (BDRM, BTR, BMP2, or LAV) into the drivable version of itself. Unfolded, it gives access to a deployable signal fire, search light, tripod machine gun, supply tent, scout bike, and purified water supply. Players can monitor your server's CCTV grid, activate an alarm to draw attention, and even activate a macro version of Fred's Anti-Zed Emitter, to kill all zombies in a certain range. The idea is for it to act as a movable citadel for admins, or just give players something neat to fight over.

Of course there are some issues. Currently, this script requires you to be running Dayz of Glory. All credit for the code to make it spawn the various vehicles goes to Sporkulus. It's my intent to make it so it doesn't require users to run the RP mod as well. But currently I'm stalled on that. An included deployable UAV is unstable and dangerous, and the controls to make it act as a drone don't appear to exist. Refolding the BMP has been known to make it fly into the air. And the various drivable HQs only seat 2 people, which I see no way to change. So that sucks.

Anyway, here is the code so far. Like I said, all credit goes to Sporkulus and Freaking Fred for the foundation of this script.

Here are the various sqf files needed:
http://www.mediafire.com/download/c8594qj1cka8g7x/hq+script.zip
If I missed something let me know. They all go in the scripts folder in your mission file.
These files are for the sounds:
https://www.mediafire.com/?iu7ywu8aqexjto1
Once again, if I missed something let me know. It's late and I haven't actually messed with any of this stuff in a few months.

This very long part goes at the end of fn_selfactions:

http://pastebin.com/NtdB68mC

You will need to have Dayz of Glory and RMod or RMod 2/2.1 to make this work. My intent in creating this thread is to make it so the script can be used without Dayz of Glory. But first I need to understand how Spork made the vehicle spawning in his mod work, which has eluded me.
 
have you tried it with the spawn system of blue phoenix admin tool?
like this for an Offroad:

Code:
_spawn = "BAF_Offroad_D";
_posplr = [((getPos player) select 0) + 2, ((getPos player) select 1) + 2, 0];
_dirplr = getDir player;
_spwnveh = _spawn createVehicle (_posplr);
_spwnveh setVariable ["Sarge",1,true];

I'm also using DayZ of Glory on my Server, but i find it quite anoying that the vehicles spawning right after the lvl up (e.g. in buildings), so i put a addaction to the script so players can choose when they want to spawn the vehicle.
Maybe it will help you :)
 
It's nice to see that some people are still poking around with my addons. Thanks for crediting me SmokeyMeadow. :)
Heh, no prob. That's a great script. I actually made a few variations on it for my server. There's the standard buildable version like in the original, and I've added a ready-made deployable version of that which is stowed in the s1203 van. Then there's the medium range version for the command centers. I also made a long range version that uses the anti-aircraft radar from Warfare. This protects my main base. And there's an ultra long range version that is based at the Green Mountain tower. The range of the Green Mountain emitter will kill every zombie on the map.
 
Last edited:
That was how I got my start here, opening up that script and learning how it works. Very gracious of you to allow that. Not sure why, but suddenly all the stuff I had been looking at started to make sense. We all teach each other, I guess.
 
This very long part goes at the end of fn_selfactions:

http://pastebin.com/NtdB68mC

this looks VERRY cool....
however I see alot of calls to scripts that are not in the download
like...

["First Aid","scripts\bandage.sqf"
"Take Ration","scripts\mre.sqf"
"Take M4","scripts\m4.sqf"
"Take STANAG Magazine","scripts\m4mag.sqf"
"Access Scout Pod Camera","cctv\initdrone.sqf"
"Deploy Tent","scripts\camp.sqf"
"Deploy Scout Pod","scripts\drone.sqf"
"Deploy Search Light","scripts\light.sqf"
"Deploy Machine Gun","scripts\mg.sqf"
"Purified Water Supply","scripts\water.sqf"

verry interested in these, are they the raven ??
"Access Scout Pod Camera","cctv\initdrone.sqf"
and
"Deploy Scout Pod","scripts\drone.sqf"
 
is there a fix to allow refold to work ???
when I choose to refold the btr it vanishes and does not appear
 
This line at the end of the btr.sqf deletes the deployed btr and then it passes the classname to the vehicle_spawner script. That script is in the Dayz of Glory addon, do you have that installed?
Code:
deleteVehicle _createBTR;
spawnthisshit = "BTR90_HQ";call vehicle_spawner;
 
No I Use this on my overpoch server and it works well except for a few issues like
the fact that it dissapears on repacking...
I have disabled that option until I find a fix...
I can deploy it even if its locked.. I have tried a few different ways to stop this from allowing locked to be deployed with no success...

I have tried...

Code:
if(cursorTarget isKindOf "BTR90_HQ"&&!locked &&(player distance cursorTarget <10))then{
    nearBTR =true;}else{
    nearBTR  =false;};if(nearBTR)then{
    if(s_player_hqe <0)then{
    s_player_hqe = player addAction [("<t color=""#0096ff"">"+("Deploy HQ")+"</t>"),"scripts\hq script\HQE.sqf","",0,false,true,"",""];
    };}else{
   player removeAction s_player_hqe;
    s_player_hqe =-1;};

also tried.....

Code:
_isaBTR = _cursorTarget isKindOf "BTR90_HQ";if(_isaBTR and!locked )then{
    nearBTR =true;}else{
    nearBTR  =false;};if(nearBTR)then{
    if(s_player_hqe <0)then{
    s_player_hqe = player addAction [("<t color=""#0096ff"">"+("Deploy HQ")+"</t>"),"scripts\hq script\HQE.sqf","",0,false,true,"",""];
    };}else{
   player removeAction s_player_hqe;
    s_player_hqe =-1;};
 
Sorry to walk away from this one and not be around for tech help. I kind of forgot I posted it. I have reached a bit of an impasse, so if anyone has ideas that would be cool. Basically, I want the script to spawn a vehicle in the DB, so it will be there after server resets. I know this is possible, because of a hack tool I encountered that allowed people to spawn cars until the DB crashed. However, I have no idea where to obtain this tool for examination, and hackers aren't particularly forthcoming about how it works. We would need a spawn command for the DB, and a delete command to remove the vehicle when it gets packed. These would ideally replace the Dayz of Glory code.
 
Sorry to walk away from this one and not be around for tech help. I kind of forgot I posted it. I have reached a bit of an impasse, so if anyone has ideas that would be cool. Basically, I want the script to spawn a vehicle in the DB, so it will be there after server resets. I know this is possible, because of a hack tool I encountered that allowed people to spawn cars until the DB crashed. However, I have no idea where to obtain this tool for examination, and hackers aren't particularly forthcoming about how it works. We would need a spawn command for the DB, and a delete command to remove the vehicle when it gets packed. These would ideally replace the Dayz of Glory code.
I mean you could take a look at and/or ask infiSTAR for some pointers. Not sure how important it is to you but that's all I can think of. Good luck!
 
It's a bit tricky but possible.
The vehicle key changer for Epoch can give an idea.
Basicly you need an extra part in the server_updateObject and in your deploy Script a public Variable call.

I will be back home on Monday, then I could give you some better information about this if you like.

Cheers
 
Sorry to walk away from this one and not be around for tech help. I kind of forgot I posted it. I have reached a bit of an impasse, so if anyone has ideas that would be cool. Basically, I want the script to spawn a vehicle in the DB, so it will be there after server resets. I know this is possible, because of a hack tool I encountered that allowed people to spawn cars until the DB crashed. However, I have no idea where to obtain this tool for examination, and hackers aren't particularly forthcoming about how it works. We would need a spawn command for the DB, and a delete command to remove the vehicle when it gets packed. These would ideally replace the Dayz of Glory code.
take a look at admin tools 1.9.1 it has a spawn permanet vehicle feature and also a delete feature that im dure you could rejig to do what your asking :)

also love the idea!!
 
This very long part goes at the end of fn_selfactions:

http://pastebin.com/NtdB68mC

this looks VERRY cool....
however I see alot of calls to scripts that are not in the download
like...

["First Aid","scripts\bandage.sqf"
"Take Ration","scripts\mre.sqf"
"Take M4","scripts\m4.sqf"
"Take STANAG Magazine","scripts\m4mag.sqf"
"Access Scout Pod Camera","cctv\initdrone.sqf"
"Deploy Tent","scripts\camp.sqf"
"Deploy Scout Pod","scripts\drone.sqf"
"Deploy Search Light","scripts\light.sqf"
"Deploy Machine Gun","scripts\mg.sqf"
"Purified Water Supply","scripts\water.sqf"

verry interested in these, are they the raven ??
"Access Scout Pod Camera","cctv\initdrone.sqf"
and
"Deploy Scout Pod","scripts\drone.sqf"

These are the scripts that handle the command center's actions. They are very basic, and allow the player to deploy certain items. The only one I'm not including is initdrone.sqf, which I could never get to work right.

https://www.mediafire.com/?u937q61tnq88685

Basically, the idea was to allow the player to deploy a scout pod, the drone from PMC. First I wanted to make it controllable from the base, but apparently the module to do that is unfinished. It won't work as advertised. No big deal, it's still flyable by a man. I wanted to have a camera on the drone similar to the security cameras script. So you could watch from base as the pod flew around to get a bird's eye view. However, the camera would not track the pod in flight. Only from its last position on the ground. And the camera angle was buried in the pavement making even that view worthless. So I abandoned the idea and just left the flyable pod, since it was pretty cool. Be forewarned, it will most likely crash and kill you if you try to fly it. It's a tricky vehicle to maneuver.

I've also got a smaller scale script that makes some items deployable from the S1203 and the red Land Rover. I'll share those too if people are interested. Lets you deploy a TV, radio, bong, and tent. Just about everything you need for camping. Also includes a portable version of Fred's antized emitter.
 
Last edited:
Here's the van/landrover camping thing, like I mentioned in the other post. This part goes in fn_selfactions:
https://www.mediafire.com/?eudn4244omr74ih

And this should be everything it needs to work:

https://www.mediafire.com/?gdrqk03abg4g1nx
You also need the cctv script. I would post mine but it's all modified and personalized to my server. You can find the vanilla cctv script in another topic in this forum.

Let me know if I missed anything.
 
Back
Top