Home   Help Search Login Register  

Author Topic: Simple Group Question  (Read 1602 times)

0 Members and 1 Guest are viewing this topic.

Flubby

  • Guest
Simple Group Question
« on: 10 May 2005, 01:13:33 »
I have a group of 12 men when they reach a set way-point I need 4 of them to separate from the group get into a vehicle go off and do something following their own way-points, then come back and rejoin the group....how do i do this?

I have tried the search option but after reading through 360 posts I got no-where fast  ???

I tried this [p1, p2, p3, p4] join grpNull they seperated from the group ok and looked like they formed their own group but I could not set any way-points for this new group?

Offline Pilot

  • Contributing Member
  • **
Re:Simple Group Question
« Reply #1 on: 10 May 2005, 01:38:23 »
Try something like this:

[p1, p2, p3, p4] join grpNull
_group = group p1
[p2] join _group
[p3] join _group
[p4] join _group

_group move WhatEverPositionYouWant

-Student Pilot

Flubby

  • Guest
Re:Simple Group Question
« Reply #2 on: 10 May 2005, 01:59:07 »
Just so you have an idea of what i am after in the mission i am trying to make the squad comes across an empty T72 with no fuel (unless the crew manage to board the tank before the guys can kill them, further on they stumble upon an enemy refuel truck while the driver is having his merry way with one of the local lady's  :o I need this group to separate from the main group board the fuel truck then drive back to where the T72 is and refuel it, then 3 of them then board the T72 and drive it back to the main group with the fuel truck following and join back up with the main group.

*Student*
with what you have posted how do I then get the new way points to instruct the new group to refuel the tank then board it and return back to the main group?

my first idea was to have a group of 4 and a group of 8 at the start of the mission with a join group command, then at the specific way-point they would separate and follow the next way-point after the join way-point but they just stood there in their own little group twiddling their thumbs  ???

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Simple Group Question
« Reply #3 on: 10 May 2005, 02:08:24 »
You could try placing one unit and giving him a group name and all the necessary waypoints to do what you require.......then delete him.

The group he was a part of will still exist and ...I think......so will the waypoints still exist.

You could then get your guys to join this group, at which point they will start following the waypoints..........I hope.


Planck
I know a little about a lot, and a lot about a little.

Offline Pilot

  • Contributing Member
  • **
Re:Simple Group Question
« Reply #4 on: 10 May 2005, 03:58:38 »
I have attached a script to this post that will do what you want.  I have put comments in the script, so you can see how I did it.

Call the script like this:
[NameOfFuelTruck, NameOfTank, NameOfGroup] exec "GetTank.sqs"

NameOfFuelTruck is, obviously, the name of the fuel truck
NameOfTank is the name of the empty tank you want the men to get into
NameOfGroup is the name of the group the men leave.  To name the group, put this into the leader's init field:
NameOfGroup = group this

So, if you had:
Code: [Select]
Grp1 = group thisin the leader's init, Fuel1 as the fueltruck name, and Tank1 as the name of the tank, you would call the script like this:
[Fuel1, Tank1, Grp1] exec "GetTank.sqs"

I hope the script helps.

-Student Pilot

EDIT
Sorry, I misread part of your post, I have to adjust the script, I'll post a newer version when I finish

EDIT2
Uhg, 10:00 pm is too late for me to work coherently.  I have rereread your post, and realized what you want isn't possible.  The fuel truck can only carry three people, and those three people are needed for the tank.  So if the three people board the tank, the fuel truck is left behind.  I will repost my script in it's current version.  When the script is called, p1, p2, and p3 will leave the group, get in the fuel truck, move to the tank, get into the tank, and refuel it.  Once the tank is refueled, they will join the group they left.  The fuel truck will get left behind.
« Last Edit: 10 May 2005, 04:21:52 by Student Pilot »

Flubby

  • Guest
Re:Simple Group Question
« Reply #5 on: 10 May 2005, 13:26:45 »
Student Pilot you are F-in brilliant!

Although I cant try the script out until I get back from work just reading what it does looks as though it is going to do what i want (and i don't have a clue with scripting). You have just saved a 40 year old kid from going bald before his time  ;D

Cheers mate  :cheers:

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Simple Group Question
« Reply #6 on: 10 May 2005, 20:28:46 »
You know........

If you tried the method I posted above, there would be no need for a script, ................but, whatever floats your boat.   ;D ;D


Planck
I know a little about a lot, and a lot about a little.

Offline Pilot

  • Contributing Member
  • **
Re:Simple Group Question
« Reply #7 on: 10 May 2005, 20:46:14 »
Planck,

That would work?!  I never knew that.  Sure does save time scripting and testing, but I guess some of us just have to do it the hard way. ;D

-Student Pilot
« Last Edit: 10 May 2005, 20:46:35 by Student Pilot »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Simple Group Question
« Reply #8 on: 10 May 2005, 20:52:51 »
Thats the thing with OFP, there is often more than one way to do something, some ways are simpler than others.   ::) ::)


Planck
I know a little about a lot, and a lot about a little.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Simple Group Question
« Reply #9 on: 10 May 2005, 20:55:14 »
I believe Planck's method does work, though I've never tried it myself.

If you can imagine that something might be possible with triggers and waypoints, it usually is.   They are very powerful, much more powerful than most scripters realise.    The scripted solution will work too, of course.
Plenty of reviewed ArmA missions for you to play

Flubby

  • Guest
Re:Simple Group Question
« Reply #10 on: 11 May 2005, 04:00:48 »
Hey Planck,

Didn't mean to ignore your suggestion, but in all honesty what you posted just didn't look as though it would work or make sense to me, and lets face it even you wasn't sure yourself  ;D and the amount of times I tried different stuff to try and get it to work, only for OFP to give me a good slap around the chops while shacking its head in disapproval just made it that little harder to try something again that sounded like a 40/60 chance of working.

Please don't let my ignorance put you off helping sorry individuals like myself, I/we need all the help I/we can get, and maybe in time I/we will listen and try what is suggested even if it looks very doubtful it would work OFP is a strange girl to get on the right side of  ;).

I appreciate your continued contribution to-wards any other issues I/we come across later......I promise you there will be some  :-[

Flubby

**Edit**
Planck your idea worked perfectly, it actually gives a bit more freedom for those of us that don't have a clue where to start with scripting, so if i wanted to add something else to their planned mission using the way-points will be a lot easier....I tell you something you guys are brilliant how you find this stuff out amazes me, especially when most of it is not even documented, little jems like this should be in a sticky someplace  8)
« Last Edit: 11 May 2005, 04:47:15 by Flubby »

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Simple Group Question
« Reply #11 on: 11 May 2005, 08:25:18 »
I believe Planck's method does work, though I've never tried it myself.

I can confirm that definitely does work... I use it for (temporarily) putting medics which are part of another group onto a support waypoint.

It's great as in many situations you can't do that with scripting (ie. if you need a specific waypoint type, like support). ;)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Simple Group Question
« Reply #12 on: 11 May 2005, 09:11:02 »
Quote
the amount of times I tried different stuff to try and get it to work, only for OFP to give me a good slap around the chops while shacking its head in disapproval
Lol we all know about that.

However, answers given in the forum are almost always substantially correct but with minor errors of syntax or whatever.    In other words, when you see an answer assume that it is correct but won't work if you cut and paste - you always have to understand what you are doing.
Plenty of reviewed ArmA missions for you to play

Jet_Plane

  • Guest
Re:Simple Group Question
« Reply #13 on: 11 May 2005, 18:20:36 »

Picking up on this,

have used the method of having waypoints for a to be deleted unit in past, and wondered if it would work with a game logic.

You can attach a waypoint but get an "and" "or" option instead of the normal move commands etc.

Any ideas how this works with the game logic, a quick search did not pick anything up

Pete

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Simple Group Question
« Reply #14 on: 13 May 2005, 21:01:52 »
Quote
Hey Planck,

Didn't mean to ignore your suggestion

Not a problem Flubby, I was only trying to point out that you could do it without a script if you wanted.

Student Pilots script probably works very well also and it is quite possible to use either method.

Anyway, glad you got it sorted out...how about solving the thread.   ::) ::)


Planck
« Last Edit: 13 May 2005, 21:02:15 by Planck »
I know a little about a lot, and a lot about a little.