Home   Help Search Login Register  

Author Topic: Add action..  (Read 1395 times)

0 Members and 2 Guests are viewing this topic.

veston pants

  • Guest
Add action..
« on: 15 Sep 2004, 16:33:23 »
Hi,

I am stuck for a tute that handles addaction commands, the one available in the editors depot. by uiox is a little unclear at best, so I was hoping if somebody could point me in the direction of a tute that covers this command in detail.

Another prob I have is that I have a trigger placed over a empty truck activated by east present, the idea being another trigger activated by me (resistance) being discovered by east units will get an east unit into the truck and activate the trigger to call for re-inforcements. There is also a radio trigger placed here so I can activate the reinforcement alarm myself. I need  the command so that the radio trigger is only active whilst in the truck (addaction?), also if the truck is destroyed both triggers become inactive.

Now I've read tutes on this before, and DL'ed them somewhere, but I've got that many tutes on my HD at the mo' I've lost track of whats what and wheres where it should have been (and my head is a little scrambled :)) so a little help would be appreciated.

And finally I've tried out having a number of units move via a tripped trigger, but is it possible somehow to link 2 triggers so setting off the 2nd trigger will in actual fact trip the 1st, as opposed to linking up all the WPs of the units that are tripped from the 1st trigger to the 2nd individually?

Once again any help would be appreciated.

Thx all.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Add action..
« Reply #1 on: 15 Sep 2004, 17:08:28 »
1)  Addaction.   Check the online comref, I think there are some examples there.  Also make sure you have read the Unofficial comref and Searched both the forum and the FAQ.    It's a chore to check all the different bits I know, but c'est la vie.


2)  I don't fully understand this one.    Does the first trigger (Resy detected by East) make some East units run to the truck and get in?  What is the second trigger for?    Is the (third) radio trigger really for the mission or just for testing purposes?

For the last bit, if you want to "turn off" a trigger if the truck is destroyed then you would have

Condition:   whateverYourConditionIs and canMove truck1

If the truck can't move the trigger condition cannot be true so the trigger won't fire.


3)  I don't understand this problem either.   However, two tips which I hope are relevant... Firstly, "one trigger trips another" doesn't make sense.     There's no point in having a trigger fired by a trigger, just do whatever you need from the first one.    Secondly, the way to communicate information between triggers (and/or waypoints) is to use variables.
Plenty of reviewed ArmA missions for you to play

veston pants

  • Guest
Re:Add action..
« Reply #2 on: 16 Sep 2004, 16:35:05 »
'Ello Mac.

2. There is a trigger covering a town "res detected by east", once this is tripped then an east unit will run to the truck to use the much more powerful radio to call for assistance, this is the alarm trigger. I also want to be able to trip the alarm myself via a radio command but only from inside the truck. In this scenario the truck with radio onboard has actually broken down, so I've set the fuel to zero so it won't move. Of course if the truck is destoyed, then so is the radio and both alarm triggers become defunct.

3.It was just that i had 2 enemy base camps positioned either side of my position in a wooded area, any alarm raised in either camp would call for backup from the main camp further up the road.
I was just trying to set boundaries for the distance personal radio transmitters can travel to alarm either of the 2 smaller camps, which in turn alarm the large camp. Its just me being lazy in not wantin to line up all the WP's of units movin from the the main camp if the alarm is triggered in the 2nd smaller camp, as opposed to the 1st smaller camp, no prob really.. :)

I aint too sure about the sensitivity of the trigger areas, are they absolute when positioned, or will skirting just inside them cause them not to trip as I've tried to set most my "detected" triggers as realistic field of views from the enemy point of view.

Cheers :)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Add action..
« Reply #3 on: 16 Sep 2004, 18:23:56 »
2.   Well your triggers will have something like:-

Condition:    this and (getDammage truck1 > 0.9)


3.   Trigger boundaries are fairly well defined but you can get anomalies.     A helpful tip is to place temporary small objects around the edge of the trigger area, then Preview the mission and see exactly where that is on the ground.    
Plenty of reviewed ArmA missions for you to play

veston pants

  • Guest
Re:Add action..
« Reply #4 on: 16 Sep 2004, 19:10:20 »
Cheers Mac, I'd seen that getdammage before so thanx for the info. but the real prob is to get the radio trigger to only be active whilst in the truck, will that be triggered via an addaction command?

And I understand that for artistic purposes its nice to have a pic. in your overview, does anyone have any good tools for picture capture thats ideally suited for OFP, alternatively any info. on how to take the pic, I've got the tutes on how to implement the jpeg into the overview, unfortunately no arts/picture programmes like paint shop tho'... :-X

Thanks.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Add action..
« Reply #5 on: 16 Sep 2004, 20:32:13 »
No, this is nothing to do with addAction.    Look up setRadioMsg in the online comref.  

To take a screenshot press your PrtScrn key then paste it into your graphics programme.     PrtScrn doesn't work for everybody, you can d/l free screen capture software from the net if needs be.  Make sure it can handle DirectX.

Paint doesn't really cut the mustard when it comes to handling the pic.   You'll need to get something from somewhere.    Paint shop pro and the other biggies do free trials, but the download is big and they expire just when you want it again.  ;D    The screen capture prog might be enough though, if you find a good one.    Google it.
Plenty of reviewed ArmA missions for you to play

veston pants

  • Guest
Re:Add action..
« Reply #6 on: 17 Sep 2004, 15:18:12 »
Sorry Mac but the setradiomsg commands implementation in making a radio trigger have a set area where its active is escaping me. I still end up with a radio at the start of the mission, and can trip the alarm from anywhere on the map, which isn't good :(

Anyhelp plz anypeep?


Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Add action..
« Reply #7 on: 17 Sep 2004, 15:54:57 »
init.sqs
1 setRadioMsg "null"


Trigger
Condition:    vestonpants in radioTruck
On Activation:   1 setRadioMsg "Help!"

Syntax etc. not guaranteed.
Plenty of reviewed ArmA missions for you to play

veston pants

  • Guest
Re:Add action..
« Reply #8 on: 17 Sep 2004, 15:58:04 »
Cheers Mac..

Your cheques in the post..  ;)

veston pants

  • Guest
Re:Add action..
« Reply #9 on: 19 Sep 2004, 23:20:55 »
Sorry to bother you again Mac, but this trigger isn't doin' what I want.

I have a group of loons doin a general walkabout, but need them to run to this trucks position when the triggers activated. The trigger is a switch, synched to the looms cycle WP.

In the condition field:
rus2 in RadioTruck and (getDammage RadioTruck > 0.9)

rus2 bein the loon that gets in the truck, and radiotruck bein the name of the truck. I don't think the triggers axis are important in this sort of trigger setup, so I've set em to zero.

The trigger worked when I had an axis field placed over the truck, grouped to rus2, and nothing in the condition field.

I just wanted to see if I knew what I thought I was doin with condition fields. (obviously not-lol)

Once again anyhelp in telling me what I should be doin (lol) would be appreciated.

Tanks.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Add action..
« Reply #10 on: 20 Sep 2004, 01:38:01 »
I can't remember the ins and outs of all this but you probably want

< 0.9

Plenty of reviewed ArmA missions for you to play

veston pants

  • Guest
Re:Add action..
« Reply #11 on: 21 Sep 2004, 20:15:47 »
Ta very much Mac, its worked... :)

I've now got my basic trigger work in place, and thanks to help I've recieved here, I've done a little experimenting with the triggers and got the alarm to sound if you destroy a nerby patrolling BMP aswell (not amazing to most scripters here...but for me it was a miracle ;D).

The major prob now is once I rescue the civ, the east still refuse to shoot at him.

I've altered "CIV" to "GUER" in both vehicle fields in the mission.sqm, and in the editor the unit shows as resistance.

In CIV init field setcaptive true.

switch trigger around him is 1 of my obj triggers but also includes setcaptive false and join commands.

I understand putting too much scripting in units/WP's init fields can cause probs, the only reason I can think of why the ruskies refuse to shoot at the civ is coz they still see him as a captive, but I aint sure, so I thought I'd ask.

Thanks for the help.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Add action..
« Reply #12 on: 21 Sep 2004, 22:37:08 »
Don't alter the mission.sqm.  It works, but it's not worth the trouble.     Group the civvy under a resistance group leader who has his probability of presence set to 0.   Make sure the resistance is friendly to west.   Write

this setCaptive true

in the init field of the civvy.  When you want east to shoot at him, write somewhere

civvyName setCaptive false

Use hints in the on activation fields of triggers to check that they are actually firing.      format commands can be very useful, for example to check the status of variables.

Two or three lines of code in an init field doesn't usually cause any problems.

Is the civvy joining your group correctly?   Do East shoot at you OK?
Plenty of reviewed ArmA missions for you to play

veston pants

  • Guest
Re:Add action..
« Reply #13 on: 23 Sep 2004, 11:22:21 »
Its working fine now that i've grouped the civ to a res, the east still allow a few of them to be picked off by him before they return fire (they usually shoot and hit me from miles away) but atleast theyre shooting at him now.

Cheers.

One final Q, my end trigger needs to fire only if me and the civ is present, at the mo' it fires if i'm alone but only if i've completed the necessary obj's beforehand.

Whats the correct line to have the trigger fire only if me and the civ are present, and another alternate ending if me and the civ and the woman who helped us out is present?

Their names are cV1 and cV2 respectively.

Cheers.


Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Add action..
« Reply #14 on: 23 Sep 2004, 11:43:00 »
Obviously you need two triggers, probably covering the same area.    

Activation box:    whatever side you are present

Condition:   (player in thislist) and (cV1 in thislist) and (not alive cV2)

Condition:   (player in thislist) and (cV1 in thislist) and (cV2 in thislist)


Syntax not guaranteed but I hope you get the idea.   If the relevant condition is not cV2 dead then maybe it would be a variable.    You need to have something about her otherwise both triggers will fire.   Or maybe just

(player in thislist) and (cV1 in thislist) and (not (cV2 in thislist))
Plenty of reviewed ArmA missions for you to play