Home   Help Search Login Register  

Author Topic: Some Questions  (Read 2071 times)

0 Members and 2 Guests are viewing this topic.

Offline DB

  • Members
  • *
Some Questions
« on: 22 Aug 2006, 13:13:07 »
Sorry about the totally unimaginative title of this thread, but it's the only thing I could think of that was short and appropriate.

Anyway, I'd like to know a couple of things.
I'm working on my first real mission (the first one for which I'm planning objectives :D) and I wonder if/ how I can:

  • 1. Make a unit more to the location where an enemy is spotted? Preferrably using waypoints/triggers, I'm not much good at scripting (yet ;)).
    Example: Player is spotted, alarm goes off. Enemy patrol moves to the location where the player was seen. If the player is fast/smart enough he can avoid being spotted a 2nd time. If the player is not seen by the patrol, it moves back to where it came from.
Any help?

  • 2. Influence the final score?
    Example: Failure to complete a certain objective means deduction of a certain nr of points.
Possible?

  • 3. Give players a choice?
    Of course, you always have a choice in how you carry out your mission, but I'm thinking this:
    At a certain point in the mission, a person asks to join your group. You can choose to accept or decline.
    I guess I could do it the ugly way, using radio Alpha to accept and radio Bravo to decline, but I think I read something
    about another way to give the player such a choice.
Is my mind playing tricks on me?

[/list]

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re: Some Questions
« Reply #1 on: 22 Aug 2006, 13:21:33 »
1.  Give the patrol a Guard waypoint and all this happens automatically.

2.  Addrating command

3.  Go with the ugly way.   There are three choices: the radio menu (which will work just fine and you already understand); the Action menu (which is much the same kind of thing except in the yellow Action menu rather than the radio menu); or creating a dialogue.     Dialogues are not especially difficult, but they not for your first mission.   Learn the basics first, you'll have more fun.

Oh, and

Welcome to the forum!
Plenty of reviewed ArmA missions for you to play

Offline DB

  • Members
  • *
Re: Some Questions
« Reply #2 on: 22 Aug 2006, 13:38:17 »
Thanks.  :thumbsup:

About the first question though, I think it might be a bit more complicated than that.
I made a little drawing, since I find it hard to explain properly using just words. :p (Even MS Paint is useful sometimes.)

See below.
When the patrol sights the player, I want it to keep patrolling and I want the investigation group to move to the location of the sighting.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re: Some Questions
« Reply #3 on: 22 Aug 2006, 14:22:37 »
This is a classic case where you need a test missionette.     Create mission with just the player, the patrol group and its waypoints, and the investigation group.   Give the investigation group a Guard waypoint.

Experiment with the settings in the waypoints (engage, engage at will, etc).   As a default the patrol group will engage the player, which is what they would do.  You don't really want them to resume patrol until the guard group has arrived.

Experiment with a "Guarded by" trigger over the relevant area.

Experiment with more than one group on Guard.

Experiment by replacing the player unit with a small elite group of loons while you take the role of a loon in the patrol and guard groups, so that you can see what happens from their side.

Learn about switch triggers - search the forum if you don't know about them, there is plenty of information here.
« Last Edit: 22 Aug 2006, 14:25:17 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Some Questions
« Reply #4 on: 22 Aug 2006, 14:27:59 »
Without scripting it is difficult to do what your scetch suggests. But the scripting is simple if it is a Single Player mission.

1) Start with a WEST detected by EAST trigger (I just assume your player is WEST)

2) In the initField of the investigation teams leader you write
Code: [Select]
investigateTeam = GROUP this
Now you have given the group a label that you can refer to in a script or the activation field of a trigger. We're going to use the activation field...

3) In the activation field of the trigger you write
Code: [Select]
investigateTeam move (getPos player)

This is what will happen: When any EAST unit within the trigger area detects any WEST unit (anywhere on the map), the group labeled investigateTeam will start to move towards the players position. If you make the trigger a repeating one it should happen every time a new WEST group is detected in the area.
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline DB

  • Members
  • *
Re: Some Questions
« Reply #5 on: 22 Aug 2006, 14:45:33 »
Without scripting it is difficult to do what your scetch suggests. But the scripting is simple if it is a Single Player mission.

1) Start with a WEST detected by EAST trigger (I just assume your player is WEST)

2) In the initField of the investigation teams leader you write
Code: [Select]
investigateTeam = GROUP this
Now you have given the group a label that you can refer to in a script or the activation field of a trigger. We're going to use the activation field...

3) In the activation field of the trigger you write
Code: [Select]
investigateTeam move (getPos player)

This is what will happen: When any EAST unit within the trigger area detects any WEST unit (anywhere on the map), the group labeled investigateTeam will start to move towards the players position. If you make the trigger a repeating one it should happen every time a new WEST group is detected in the area.

That sounds like the easiest way to do it. ;) I think I'll go with that.

I might try the other way too though, to find which works better.
Thanks again!

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Some Questions
« Reply #6 on: 22 Aug 2006, 15:03:17 »
Mac and I have different aproaches to the same problem. He's trying to explain how you will learn to do this all by yourself wich will help you a lot in the future. Unfortunatley I didn't see his answer before I posted mine (he's becoming too fast for me). Thus my post somewhat defeats the purpose of his school teacher intentions.

Bear in mind though, that my example only works if my assumptions are correct (that this is a SP mission and only one player is present, that no other WEST groups with only AI in them can wander into the trigger area, and so on). When you tried my solution, have a look at what Mac said for future reference. That's your homework for tomorrow :)

EDIT: ... and welcome to the Forum
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re: Some Questions
« Reply #7 on: 22 Aug 2006, 15:19:11 »
And you'll have more fun with mine.   :D

Actually this is very common.   One of the joys of OFP editing is that there are frequently several answers to the problem.   Or none.
Plenty of reviewed ArmA missions for you to play

Offline DB

  • Members
  • *
Re: Some Questions
« Reply #8 on: 22 Aug 2006, 16:12:57 »
Hehe, well I tried both.

It seems like I need to do a bit more reading on the functions of the 'Guarded by' stuff etc...

The 'doMove' solution works perfectly though.
Only how do I get them to return to base when they arrive at the player pos? Creating an object called 'home' and adding investigroup (which is my investigation group's name) move (getPos home) in the init field after the command that makes them go to the player pos. But that just makes them move to the home object instantly when the trigger is fired.

I also had another idea... (Won't start with that until I get them to return AFTER reaching the player pos.)
I'm gonna make the trigger area quite a bit larger, and make the search party move out in a UAZ instead of on foot.

I need some help with that again. ;)

Code: [Select]
groupmember1 moveindriver uaz
groupmember2 moveincargo uaz

investigroup move (getPos player)

The above would make groupmember one get in the UAZ as driver and make groupmember two get in the UAZ as cargo, and then make the entire group move to the position of the player, right?

But... I need to know how to determine wether they go on foot or by car.
Also, how do I make them disembark when they get back?

Edit: The investigation group worked a bit too well just a minute ago.  :P I played the mission, to see which parts need more work, and decided to shoot the patrol from quite a large distance. So I did, killed it off, and then another soldier runs out of the compound to the area where the patrol was shot. So I think it's a guy from the the investigation team, and I wonder where the other half of it is. I shoot him, and move on towards the enemy base. Then suddenly my nr 2 reports and shoots 2 soldiers on our flank... I was pretty glad I'd just told them to open fire...  Also, I'm adding a screenshot of the base with some guards and the patrol so you can see what I'm using it for.


« Last Edit: 22 Aug 2006, 16:43:11 by DB »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re: Some Questions
« Reply #9 on: 22 Aug 2006, 16:56:04 »
OK well you're learning fast so its time to tell you the REAL answer.   Forgot both previous answers.

Create your patrol group and give it the waypoints you want.

Move
Hold
Cycle
Getin
Getout
Seek and Destroy
Getin
Cycle

or something like that.  Use switch triggers synchroed to the cycle waypoints to control how the group moves around the waypoints.  You can make them loop through the sequence as often as you want.    Make sure the getin waypoints are attached to the vehicle.

What you're really doing is replicating the guard waypoint but in a more controllable manner.

(Actually this isn't the real answer.   The real answer is to get hold of THobson's mission Abandoned Armies and unpbo it to see how to handle patrols.  You need to add repair routines for when the UAZ is damaged and so on.)

Glad to see that you're learning that the AI is quite sophisticated.   Yes it will do flanking manouevres on its own initiative.  :D
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re: Some Questions
« Reply #10 on: 23 Aug 2006, 11:56:58 »
Well this might be a third way to answer your question.  In particular have a look at the sample mission I uploaded to this thread.

http://www.ofpec.com/forum/index.php?topic=27843.0

The sample misison has a patrol that itself goes to investigate, and then goes back to its patrol when the enemy have gone.  It should be simple to modify it so it is a different group that investigates.

IMHO the Guard waypoint is much under used and is absolutely stunning if used correctly.

I really don't like giving the enemy the location of the player ( ..doMove getPos player; or moving the waypioints to the location of the player).  It feels like cheating.  The Guard (and to a lesser extent the Hold waypoint) are great for this.

EDIT:

I only skim read this thread between meetings so I may have missed something.  The link I provided above assumes you have an infantry patrol.  If you have infantry in a vehicle that  you want to get out, then the answer is a little longer.
« Last Edit: 23 Aug 2006, 13:56:46 by THobson »

Offline DB

  • Members
  • *
Re: Some Questions
« Reply #11 on: 23 Aug 2006, 14:43:31 »
Thanks for that Thobson! It helped a lot. I think I'm getting there. ;)