Home   Help Search Login Register  

Author Topic: Cargo weapons and the Y-axle  (Read 827 times)

0 Members and 1 Guest are viewing this topic.

DEAD RABBIT

  • Guest
Cargo weapons and the Y-axle
« on: 15 May 2004, 12:26:36 »
1. How to remove cargo weapons and magazines from vehicles?
I am bussy with a mission using MTCO units. Now you have the BMP 3 from VIT APC pack addon and it has the BIS RPG and Strela Launcher loaded as cargo standard every time you play. With MTCO you have of course a completely different RPG launcher, I would like to remove all the cargo weapons and magazines, but this seems impossible. Someone know how to do this??

2. How to turn units over the Y-axle
With OFP you have the setDir command, which only turns the vehicle over Z and X axle. I want to turn stuff over the Y-axle. Could someone explain me how to do this??
« Last Edit: 15 May 2004, 14:56:43 by DEAD RABBIT »

DEAD RABBIT

  • Guest
Re:Cargo weapons and the Y-axle
« Reply #1 on: 15 May 2004, 14:57:32 »
Are my questions that difficult??

DEAD RABBIT

  • Guest
Re:Cargo weapons and the Y-axle
« Reply #2 on: 16 May 2004, 12:51:56 »
OK,

Other question then :P

When creating arrays of for example numbers like:
array1 = [1,2,3,4,5]

And I would wish to choose the computer a number randomly... can I use 'random array1'??

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Cargo weapons and the Y-axle
« Reply #3 on: 16 May 2004, 14:00:23 »
1.  Can't you use removeMagazines and removeWeapon?

2.  If you mean can you turn a vehicle upside down, the short answer is that you can't.

3.  The command random generates a random number.   You can comebine this with the command mod to generate a random whole number.   (See the online comref for an example.)    You can then use that random whole number to select a particular element in the array.

Hope that helps.

PS - questions on this board often take 24 hours to get answered ... so there's no point in bumping your post before then.   ;)
Plenty of reviewed ArmA missions for you to play

DEAD RABBIT

  • Guest
Re:Cargo weapons and the Y-axle
« Reply #4 on: 16 May 2004, 15:59:01 »
1. Tried that, didn't work. I even tried the removeAllWeapons command, but I removed all the vehicles related weapons and not its cargo weaponry.
2. How is it possible then that when you use a bomb and blow up a Jeep, it turns over all the three axles (x,y,z) and crashes upside down for example?
3. I don't really get the last part 'selecting a particular element'. Isn't it so, that the computer can't choose a random number out of nowhere, but has to use a list of numbers to a certain amount of digits to choose from? Doesn't it count aswell for arrays? You give the computer a list of numbers, from which it can choose from.

Thx for your help :D

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Cargo weapons and the Y-axle
« Reply #5 on: 16 May 2004, 18:46:26 »
The jeep can indeed crash upside down if you create an explosion underneath it.   However, there is no way of controlling it exactly unless you make an addon of an upside down jeep.

I thought you were trying to get the computer to select an element of an array at random.   If you just want a random number, just use the command random.    If you want a random number within certain parameters just combine random with other commands (like arithmetic operators, or mod, or another random command) to get what you want.

Example

_rand = (random 9) - (random 3) + 6

will create a random number between 3 and 15.

Plenty of reviewed ArmA missions for you to play

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Cargo weapons and the Y-axle
« Reply #6 on: 16 May 2004, 19:42:37 »
1. clearWeaponCargo unitname
    clearMagazineCargo unitname

2. No you can't (100%). The reason for the vehicle turning around when exploding is the same reason you can jump up and down (IRL), physics...
There's a script that makes vehicles turn upside down, but it does it so that you can not use it if player(s) have direct line of sight to it when it turns upside down... It basically creates another vehicle near the used vehicle and forces it to turn upside down, so it's not so pretty to look at...

3.Random 6 will results a floating point between 0.000000 and 6.000000... So, it can be something like 2.758934...
If you want it to be an integer, you can use the command mod as Macguba said... Basically like this:
 _rand = random 6
 _rand = _rand - (_rand mod 1)
This returns a random number between 0 and 6...

Of course, if I'm spreading misinformation, please correct me  ;)
And no guarantees on any syntaxes  :P
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

DEAD RABBIT

  • Guest
Re:Cargo weapons and the Y-axle
« Reply #7 on: 16 May 2004, 22:33:24 »
1. Just what I was looking for, thx!
2. That part I already understood :P. I just find it weird that you can turn a vehicle over the X and Z axle and not over the Y axle. Hell, its all related to physics in some way.
3. @guba: Yes, im trying to get an random element out of an array. What I meant with the list thing was that an array is a list of elements. The random command chooses its elements aswell from a list. Can't you use that array as the list for the random command to choose from?

I better stop asking these questions... there leading to nowhere.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Cargo weapons and the Y-axle
« Reply #8 on: 16 May 2004, 23:50:18 »
Hopefully I understood you correctly  :-[ :

3.You can choose a random element from an array...
Code: [Select]
_shellArr = ["Shell73","Heat73","Shell105","Heat105","Shell120","Heat120","Shell125","Heat125"]
_shellRnd = random (count _shellArr)
_shellRnd = _shellRnd - (_shellRnd mod 1)
_useShell = _shellArr select _shellRnd
This will choose a random shell type from that array...

You determine the random integer first and then select an element from the array matching that integer...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

DEAD RABBIT

  • Guest
Re:Cargo weapons and the Y-axle
« Reply #9 on: 17 May 2004, 21:59:34 »
Thx, that was exactly what I was looking for.

Now to save the forum another topic with a question...

1. Question/problem: 'Im using the Chopper Landing script from snYper (check comments at the command 'land' in the command reference). I put every preload syntax for the functions in the init.sqs, added all the scripts and used every right command. Now my problem is, is that when I put the line: "[choppername, getWPPos [group choppername, number waypoint]]" in an activation box and preview the mission, the editor loads Desert Island and displays a blank editor sheet!? How to solve this very irritating problem?'
« Last Edit: 18 May 2004, 14:49:06 by DEAD RABBIT »