Home   Help Search Login Register  

Author Topic: GetInDriver: MoveInCargo: Respawns: Your Life, Ammo, Vehicle.  (Read 1822 times)

0 Members and 1 Guest are viewing this topic.

Offline Brandon

  • Members
  • *
Alright, I thought I remembered this stuff. And after looking some stuff up, I swear it doesn't work...

The goal here is to create a large testing ground for all the games vehicles and weapons. So I can better learn the penetration of certain launchers & other weapon effects on vehicles. It's also meant to be a shooting range so we can practice using certain weapons.

1. I (or AI) want to initially spawn in an empty vehicle as driver, or cargo.
-Previously in OFP (RedHammer/Resistance) & Arma thought it was: (My player Name) MoveInDriver (Vehicle Name). But Doesn't seem to want to do anything in Arma2.

2. Spawning additional weapons into ammo crates.
-Want to reduce number of ammo crates required for this practice range. Also want to significantly increase the amount of ammo in the crate so we can spend a lot of time out there.

3. Vehicle respawning.
I'd like to know how to first delete a vehicle after it has been destroyed (preferably on a timer like 5 seconds), and have it respawn shortly after.
-The purpose is to correct or angle and try again.

I'd like to be able to blow up multiple targets at the same time. However, the previous object may need to disappear. I guess my question is: Can I make the destroyed vehicle dissapear 5 seconds after its destroyed, and have the vehicle respawn after 10 seconds?

I wouldn't have 'reasked' the same questions that may have been asked before, but after I've seen that even the simple stuff like "GUY1 moveindriver TRUCK1" doesn't want to work... I don't know what else has changed.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
1. works fine for me.

2. addWeaponCargo & addMagazineCargo

3.1 Record the initial info regarding the vehicle and store it in a variable on it (setVariable).
3.2 Add a killed handler for the vehicle which reads the initial info already recorded on it. In the handler, delete wreck then create new one (remembering to re-record info and re-apply event handler).

There are many vehicle respawn scripts already written out there if you look. Often they respawn based on vehicle being incapacitated (can't move) rather than being destroyed though, so damaged vehicles that have been abandoned can be respawned too (as well as allowing players to shoot tires on a vehicle they don't need any more to force respawn).
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)