Home   Help Search Login Register  

Author Topic: Another Trigger deactivation needed  (Read 470 times)

0 Members and 1 Guest are viewing this topic.

DC10_starvinmarvin

  • Guest
Another Trigger deactivation needed
« on: 28 Jul 2003, 17:36:18 »
Hi!

I got a couple of triggers controlling a chat between a soldier and a prisoner. he tries to investigate him but if the prisoner (player) runs away the soldier screams halt and so on ;) but i want the chat to end if the prisoner tries to escape. so that the soldier doesnt keep talking about the weather ;) when the player is on the run.

plz help me with this

Greetz // StarvinMarvin    ;D

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Another Trigger deactivation needed
« Reply #1 on: 28 Jul 2003, 19:56:41 »
Create a trigger over the area.   Group it to the player unit and you will find new options in the Activation box.   Select group leader (ie player) not present.    

On Activation:   runAway=true

Now, in your dialogue, just check to see if the variable runAway is true:  if it is, the dialogue ends.

So in your dialogue script you'll have a line

runAway:exit

If you are doing it with triggers then the condition line of the trigger will look somehting like this

Condition:    (Whatever you have already) and not runAway
Plenty of reviewed ArmA missions for you to play

DC10_starvinmarvin

  • Guest
Re:Another Trigger deactivation needed
« Reply #2 on: 28 Jul 2003, 20:30:03 »
hmm that makes sence to me but somehow it doesnt work... even thou the runaway trigger is not activated the dialogue doesnt show up at all

im using a couple of triggers that are activated with 5 sec between each and every trigger got a small dialogue

the trigger around the player is grouped to him and its 2 x 4 m wide..

The mission is finished so i could post it here for you to try if you like.. just need to fix the briefing and a readme file.. cause there are some ww2 addons used

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Another Trigger deactivation needed
« Reply #3 on: 28 Jul 2003, 21:07:28 »
In your init.sqs write this

runAway=false

If the game encounters and expression containing an undefined variable it assumes the whole expression is false.   You don't always need to define variables - it depends on how you are using them - but in this case I think you need to.   Try it and see.

Once your mission is "finished" head over to the beta testing board and post it there.   There's a sticky at the top of the board with tips on how to go about it.
Plenty of reviewed ArmA missions for you to play

DC10_starvinmarvin

  • Guest
Re:Another Trigger deactivation needed
« Reply #4 on: 28 Jul 2003, 21:32:37 »
Hehe now the dialogues works perfect but they are still displayed when the runaway=true.. but my triggers are set so that all are activated by the soldier but they are activate after 5 sec 10,15,20 etc.. maybe thats they problem or what do you think?? i dont know anyway else to do the dialogues

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Another Trigger deactivation needed
« Reply #5 on: 28 Jul 2003, 22:36:58 »
It's better (and easier) to do dialogues in a script, rather than using lots of triggers.

Read snYpir's "Friendly Introduction to Code Snippets" and look at the examples in the Tutorial Mission.
Plenty of reviewed ArmA missions for you to play

peter

  • Guest
Re:Another Trigger deactivation needed
« Reply #6 on: 28 Jul 2003, 23:38:05 »
?! shouldnÂ't it be:

So in your dialogue script you'll have a line

? runAway:exit

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Another Trigger deactivation needed
« Reply #7 on: 29 Jul 2003, 00:12:15 »
Yes of course it should, good spot.
Plenty of reviewed ArmA missions for you to play