Author Topic: spawn buildings  (Read 1248 times)

0 Members and 1 Guest are viewing this topic.

robin-580

  • Online Villain
  • ***
  • Posts: 143
    • View Profile
spawn buildings
« on: July 04, 2012, 05:26:09 am »
anyone knows how to spawn buildings?

jcmomo

  • Relentless Teamkiller
  • **
  • Posts: 93
    • View Profile
Re: spawn buildings
« Reply #1 on: July 04, 2012, 05:32:53 am »
You spawn just like a vehicle, you just need to get the vehicle classnames, http://community.bistudio.com/wiki/ArmA_2:_CfgVehicles Tells you the classnames, so if you want to spawn on evryone in server u can use hte code in the hgs thread by medic.
Momo is a homo. Que?

robin-580

  • Online Villain
  • ***
  • Posts: 143
    • View Profile
Re: spawn buildings
« Reply #2 on: July 04, 2012, 06:25:49 am »
_veh="Land_NAV_Lighthouse ";//<< change this to for example "AH1Z" for attack helicopter
 {

_classname = _veh;
_logic      = _x;

call compile format ['

newvehicle = _classname createVehicle %4;
newvehicle setpos %4;
newvehicle setdir %5;
newvehicle setVehicleInit "
this setVehicleVarName ""vehicle_%1_%2"";
vehicle_%1_%2 = this;

clearWeaponCargo this;
clearMagazineCargo this;
";
processInitCommands;
"INV_ServerVclArray = INV_ServerVclArray + [vehicle_%1_%2];if (""%3"" != """") then {[""CreatedVehicle"", vehicle_%1_%2, typeOf vehicle_%1_%2, %4] execVM ""%3"";};" call broadcast;

', _x, round(random 9999), INV_CALL_CREATVEHICLE, getpos _x, getdir _x];

} foreach playableunits;
   

doesnt work am i doing something wrong?

scrx

  • Relentless Teamkiller
  • **
  • Posts: 59
    • View Profile
Re: spawn buildings
« Reply #3 on: July 04, 2012, 06:44:58 am »
i use this

Code: [Select]
_veh_type="FlagCarrierWhite_EP1";


_dir = getdir vehicle player;
_pos = getPos player;
_pos = [(_pos select 0)-1*sin(_dir),(_pos select 1)-1*cos(_dir),0];
_veh = createVehicle [_veh_type, _pos, [], 0, "CAN_COLLIDE"];
_veh setDir _dir;
sleep 10;
deletevehicle _veh;

credits mrmedic  :icon_laugh

spawns right into you, do it as long as you find the proper position then remove sleep and deletevehicle, thats how i do it

i take the object names from here http://www.armatechsquad.com/ArmA2Class151656165165341654165165165165f/index.php

works fine for me



jcmomo

  • Relentless Teamkiller
  • **
  • Posts: 93
    • View Profile
Re: spawn buildings
« Reply #4 on: July 04, 2012, 06:52:28 am »
i use this

Code: [Select]
_veh_type="FlagCarrierWhite_EP1";


_dir = getdir vehicle player;
_pos = getPos player;
_pos = [(_pos select 0)-1*sin(_dir),(_pos select 1)-1*cos(_dir),0];
_veh = createVehicle [_veh_type, _pos, [], 0, "CAN_COLLIDE"];
_veh setDir _dir;
sleep 10;

deletevehicle _veh;

credits mrmedic  :icon_laugh

spawns right into you, do it as long as you find the proper position then remove sleep and deletevehicle, thats how i do it

i take the object names from here http://www.armatechsquad.com/ArmA2Class151656165165341654165165165165f/index.php

works fine for me




This works too  :icon_thumbsup
Momo is a homo. Que?

robin-580

  • Online Villain
  • ***
  • Posts: 143
    • View Profile
Re: spawn buildings
« Reply #5 on: July 04, 2012, 07:27:43 am »
IT DISSAPEARS THOUGH

Permaphrost

  • Cheater Apprentice
  • *
  • Posts: 16
    • View Profile
Re: spawn buildings
« Reply #6 on: July 04, 2012, 07:57:12 am »
That's a nice little base (you?) made there!
« Last Edit: July 04, 2012, 08:38:23 am by Permaphrost »

jcmomo

  • Relentless Teamkiller
  • **
  • Posts: 93
    • View Profile
Re: spawn buildings
« Reply #7 on: July 04, 2012, 09:20:53 am »
take out the sleep and the delete. the first code you posted works fine
Momo is a homo. Que?

Allonsy

  • Relentless Teamkiller
  • **
  • Posts: 95
    • View Profile
Re: spawn buildings
« Reply #8 on: July 04, 2012, 11:12:21 am »
LOL medic, on all of your screenshots you got broken bones.
Is that a signature thing or what? :icon_rolleyes2

scrx

  • Relentless Teamkiller
  • **
  • Posts: 59
    • View Profile
Re: spawn buildings
« Reply #9 on: July 04, 2012, 03:55:17 pm »
IT DISSAPEARS THOUGH

lol  :icon_laugh

LOL medic, on all of your screenshots you got broken bones.
Is that a signature thing or what? :icon_rolleyes2

thats not medic screenshot its mine and yes fucking zombies breaking my bones on first hit always too lazy to fix it  :icon_laugh

if you want to make a real base i suggest making 2 buttons with the proper and the temporary placement

robin-580

  • Online Villain
  • ***
  • Posts: 143
    • View Profile
Re: spawn buildings
« Reply #10 on: July 04, 2012, 04:21:12 pm »
works now thanks didnt read very well

jcmomo

  • Relentless Teamkiller
  • **
  • Posts: 93
    • View Profile
Re: spawn buildings
« Reply #11 on: July 06, 2012, 12:15:25 pm »
np
Momo is a homo. Que?

brychu

  • Cheater Apprentice
  • *
  • Posts: 11
    • View Profile
Re: spawn buildings
« Reply #12 on: July 07, 2012, 10:21:57 pm »
Man this looks like so much fun. Thanks for the info, I want to try this out later haha. I'd imagine they'd make for some awesome bait too :)