Home   Help Search Login Register  

Author Topic: baby steps - need hand up..  (Read 948 times)

0 Members and 3 Guests are viewing this topic.

mos19k

  • Guest
baby steps - need hand up..
« on: 29 Oct 2003, 08:28:41 »
Hello everyone,

long story short I've been trying to learn OFP mission editing/scripting over the past two days.  I've done pretty well with setting the foundation for my first mission with a nice little camera intro and a few guards on roving patrol.

I'm running into some trouble with the triggers.  I found the handy dandy "hint format" tip and it would appear my trigger is being set off, however I MUST be violating some unwritten/hidden rule in my trigger/scripting.

Here's my scenario...  I have a tent with a friendly in it "setcaptive."  There is an east officer and a soldier pulling guard.  I have a narrow tigger running in the "line of sight" out the tent door from the guard.

By setting my tigger to "West detected by east" Condition "this" and OA "hint format ["%1", tentguard distance captive1] as soon as I am a) in the trigger area and b) detected I get the nice littlle hint with the distance (about 2.9).

Now, I go back to the triggers I've tried out in the OA with no luck (minus the #))

1)  captive1 setcaptive false; tentguard dotarget captive1; tentguard dofire captive1
2)  tentguard dotarget captive1; tentguard dofire captive1;
3)  tentguard dofire captive1
4)  tentguard setcombatmode red; tentguard dofire captive1

I even tried

5)  tentguard dotarget captive1; tentguard dofire captive1; hint"well @$*@*, you've been spotted"; captive1 setdamage 1

All I got was the hint and a good laugh when the captive dropped like a sack of potatos.

Anyhow, I'd like to get this trigger worked out and then maybe the rest will all come into play.

* mos19k dons dumb n00b hat, waits for laughter to die down, and accepts any help.
:help:

And if you really feel sorry for me theres an attached sqm file to play with..

*edit* Mozilla didn't like the attachment feature, it should be there now?
« Last Edit: 29 Oct 2003, 08:38:17 by mos19k »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:baby steps - need hand up..
« Reply #1 on: 29 Oct 2003, 12:05:46 »
What are you trying to achieve?    And what's going wrong?     I assume the guard is not shooting the prisoner as he tries to escape.

Try something like this in the on activation field of the trigger:-

captive1 setCaptive false; tentguard setBehaviour "aware"; tentguard reveal captive1; hint "tent trigger fired"

Check the syntax.    Check also that you have named the units correctly.    You might use the command knowsabout in the debug hint too, that might help.

On which island is this set?   We need to know to look at the mission.sqm.
Plenty of reviewed ArmA missions for you to play

mos19k

  • Guest
Re:baby steps - need hand up..
« Reply #2 on: 29 Oct 2003, 20:18:46 »
macguba,

Thanks for taking the time to look at this..  the mission is set on malden. I haven't "exported" it to SP/MP yet.. It's straight out of my users folder.  If you need it "exported" I can do that...

Here's the scenario I WANT.

Briefing (not included in mission file):
A rebel force has taken an american soldier as a POW on a desolate island off of the southeastern coast of malden.  Black ops have been dispatched to insert at LZ Alpha and rescue the POW.  Secondary objective is to destroy a nearby BMP at a refueling station..

In the mission:
I've got a POW in the tent with an officer (interrogator) and a guard.  My blackops team is supposed to move in take out all the guards and then rescue the hostage.  If the officer is shot the guard is supposed to becoame "aware" that something in wrong and target the POW.  If the black ops are detected he has orders to kill the POW.  Thats the "loosing" scenario...

In the winning scenario the black ops kill the patrols, officer, and tent guard.  When the black ops are within 1 M of the POW he will get in the UAZ at the tent and wait for the blackops to carry him back to the UH-60 at the LZ.  At the UH-60 the POW will disembark and get in the 60.  When the POW is safely returned to Le Port the mission is complete.

I'm far from getting ALL of that into the mission but I've got all the major players in there and I've been trying to get these triggers worked out before I move on to the final triggers which I suspect to be much easier ;)

I may sneak a trigger in to call up "reinforcements,"  a BMP to come on a seek and destroy mission at the beach, since I think the mission is too easy right now.

Anyhow, I don't expect anyone to write this mission for me, thats half of the fun ;)  Just a swift kick in the "what the hell were you thinking" direction will do.

Anyhow..  Gotta reboot into windows and test out this trigger you suggested.  I'll post the results in an edit.

EDIT:  The guard and the officer still lay down when I am detected. The POW is not shot but the hint "tentguard trigger fired" does pop up.  
Maybe this has something to do with the way I am creating unit's and groups?  To make a group of "two" I've made an entire infantry squad and then deleted everyone I didn't want.  to get a lone soldier I did the same thing.  They behave as expected but maybe thats where certain triggers aren't working?  I've tried the guard as a "lone" unit and attached to the officer.  I really don't want him attached because he tries to get in "formation" and I have to issue a dostop to make him stay where I put him.

Also I've been trying to avoid doing too much of the scripting in separate sqs files.  Looking back at it seems I might be beter off using the sqs files to do this instead of the init fields?  Any suggestions on what the best practice is?  I know complicated stuff needs it's own place but I would think simple stuff like this should be handled well in the editor.

Thanks,

mos19k
« Last Edit: 29 Oct 2003, 20:33:39 by mos19k »

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:baby steps - need hand up..
« Reply #3 on: 29 Oct 2003, 22:31:48 »
hmm - i've had a look into the mission.sqm file, you attached
in your first post.

Could not do anything more for the mo, as i don't have the
addons required for it (*hint* - it would be better to post
such missions to debug without the need for ppl to download
any addons)

If this is the mission, you are talking about, then i tell you what:

I couldn't find the words: captive1 tentguard OA inside

how did you name your units?

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:baby steps - need hand up..
« Reply #4 on: 29 Oct 2003, 22:53:13 »
Chris Death is right, the simpler you can make the mission.sqm the better - delete everything irrelevant so we can concentrate on what's going wrong.

It's nothing to do with the way you create groups.    The easiest way to make a group of two is just to insert two units next to each other ... usually the game will draw the blue line between them, but if it doesn't just hit F2 and do it yourself.    The more senior or the one inserted first will be the group leader.

I always apply one of Sherlock Holme's maxims at a time like this.   "When you have eliminated the impossible, whatever is left - however improbable -  must be the truth."    If the trigger is firing correctly it could be that its not really a trigger problem, as Chris has suggested it might be a unit naming problem.
Plenty of reviewed ArmA missions for you to play

mos19k

  • Guest
Re:baby steps - need hand up..
« Reply #5 on: 30 Oct 2003, 06:46:10 »
Chris, macguba,

I did this under the GOTY resistance editor.  Only reason I used that was because the streetlight wasn't working right and the 1.46 version didn't have the "show ID function"  Other than that I don't have any addons.  If you can tell me how to turn a light off in the 1.46 editor I'll go back to that.

I did try
[object2003] switchlight off
in the init.sqm but that caused an error.  unknown operator I think
object 2003 switchlight off  worked great under 1.91, but that syntax once again didn't work in 1.46.

As far groups go the problem I'm having isn't that there isn't a leader, it's that ther IS a leader.  Inside the compound there are two guards roving parallel to each other on opposite fences.  As I understand it the leader follows the waypoints and subs follow him.  As I create individuals they all keep getting tied to the higest ranking peson.  The only way I could create them as "individuals" instead of as a unit was to create a unit and delete all the un-necessary players.  I suppose thats where better knowledge of the sqm file would help.  I could just stick them in there individually as needed.

Anyhow..  I'll strip the mission back down to bare minimum and play with it some more..  no patrols. only my player, the officer, the guard, and the captive.  If that works then I'll build it up till it breaks again ;)

Thanks!

Offline Davies1

  • Members
  • *
  • Bugger this for a game of soldiers!
Re:baby steps - need hand up..
« Reply #6 on: 30 Oct 2003, 09:29:36 »
Chris, macguba,

I did this under the GOTY resistance editor.  Only reason I used that was because the streetlight wasn't working right and the 1.46 version didn't have the "show ID function"  Other than that I don't have any addons.  If you can tell me how to turn a light off in the 1.46 editor I'll go back to that.

I did try
[object2003] switchlight off
in the init.sqm but that caused an error.  unknown operator I think
object 2003 switchlight off  worked great under 1.91, but that syntax once again didn't work in 1.46.

As far groups go the problem I'm having isn't that there isn't a leader, it's that ther IS a leader.  Inside the compound there are two guards roving parallel to each other on opposite fences.  As I understand it the leader follows the waypoints and subs follow him.  As I create individuals they all keep getting tied to the higest ranking peson.  The only way I could create them as "individuals" instead of as a unit was to create a unit and delete all the un-necessary players.  I suppose thats where better knowledge of the sqm file would help.  I could just stick them in there individually as needed.

Anyhow..  I'll strip the mission back down to bare minimum and play with it some more..  no patrols. only my player, the officer, the guard, and the captive.  If that works then I'll build it up till it breaks again ;)

Thanks!


If the units you create are getting tied to the highest ranking person select the groups function in the editor (F2) click on the unit attached to an officer and drag his attachment line away from him to a bare bit of the map and he'll no longer appear to be part of the group.

Try to have a singular man for firing at the POW instead of a group one. I don't know the syntax for the rest of it, but I may try later to help you out further. These guys know more than me and are a better bet tho ;)

« Last Edit: 30 Oct 2003, 09:30:09 by Davies1 »
Beer is the fuel for the Heavy Metal Engine.

mos19k

  • Guest
Re:baby steps - need hand up..
« Reply #7 on: 30 Oct 2003, 17:15:12 »
Davies,

Thanks!  that solved my group problem.

Everyone,

Thanks for all the help.  Started from scratch and the triggers work.  After the guard kills the "detected" soldier he turns and shoots the POW.  If the officer is alive he saves the guard the trouble.

*EDIT*  problem found!  When I place the tent into the scenario the guard and the officer no longer attack the POW.  

Any clues?  Don't use a tent?  

**EDIT 2 **
Problem fixed.  Don't use TENT OPEN, use TENT EAST...

« Last Edit: 30 Oct 2003, 18:28:10 by mos19k »

mos19k

  • Guest
Re:baby steps - need hand up..
« Reply #8 on: 30 Oct 2003, 18:41:28 »
Can one of you clarify what I need to put in init.sqs to turn off a streetlamp in 1.46?

I've seen
[object2003] switchlight "off"

and

object 2003 switchlight "off"

The first example works in the resistance version, but  in 1.46 I get

Error Type Array, object Expected

or

Operator unknown error with the second example.

I tried removing the [] from the first example since that is obviously considered an array in 1.46.

(I know, this is supposed to be in the FAQ as posted in the "how to find answers," but maybe I'm looking in the wrong FAQ as I couldn't find it even with a search.)
« Last Edit: 30 Oct 2003, 18:43:53 by mos19k »