Home   Help Search Login Register  

Author Topic: Scripting name & remove a member  (Read 1690 times)

0 Members and 1 Guest are viewing this topic.

Offline crisbal

  • Members
  • *
Scripting name & remove a member
« on: 25 Apr 2011, 13:45:40 »
Scripting name:
RHS v.2 ammo crate ? "rhs_reammobox" doesn't works
BAS ammo crate ? "bas_reammobox" doesn't works

What must I have to do to remove a member from an existing goup?

Thanks!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Scripting name & remove a member
« Reply #1 on: 25 Apr 2011, 14:01:50 »
Not sure what you mean with the first question..

Quote
What must I have to do to remove a member from an existing goup?
[unit] join grpNull should work.
unit is obviously the unit you want to remove from it's group.
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline crisbal

  • Members
  • *
Re: Scripting name & remove a member
« Reply #2 on: 25 Apr 2011, 16:02:42 »
First cuestion: I want to create a vehicle. It's an ammo box, but I need the name of that vehicle, in this particular case is the Red Hammer Studios reammo box.  I write in the activation of the trigger : ammo = "rhs_reammobox" createvehicle (getmarkerpos "marker_1");  but when I play the mission and the trigger is activated no ammo box is created. Same trouble as with the Ballistic Addons Studios reammobox. But no problem with the original "west_reammobox" or "jam_reammobox".

Second cuestion: First do I have to create a group called GrpNull ??

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Scripting name & remove a member
« Reply #3 on: 25 Apr 2011, 16:30:01 »
Why don't you try to creat it in the editor and don't use the createvehicle command. Try to add an ammo box in the editor and if you want to add it RHS weapons you must just add it with the addMagazineCargo and addWeaponCargo commando.

Quote
Second cuestion: First do I have to create a group called GrpNull ??

The GrpNull command is to remove an unit from a group.

I hope it helps

Cheers,
Aldo15
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Walter_E_Kurtz

  • Guest
Re: Scripting name & remove a member
« Reply #4 on: 25 Apr 2011, 21:52:12 »
Quote
ammo = "rhs_reammobox" createvehicle (getmarkerpos "marker_1")
I made a quick test and this worked fine for me. Are you sure you have a marker of that name? Are you sure the trigger is being activated?

The problem I had was that it was necessary to wait 20 seconds after creating the crate to access its contents. I think Aldo is on the right lines: place the crate in the mission editor first, name it, and then use setPos in the trigger to move it where you need it.


GrpNull is something that the game understands on its own, so you don't have to define it. The same goes for player and nil.