Home   Help Search Login Register  

Author Topic: scripting issue  (Read 777 times)

0 Members and 1 Guest are viewing this topic.

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
scripting issue
« on: 11 Dec 2004, 22:50:36 »
I'm presently working on a map and I stumped.....to break it down for you this is the senario. Allied forces are moving towards an airfield where they suspect Adolf Hitler's plane is. The way I have it set up now is when the allied cross a certain spot, it sets off atrigger that makes "Adolf", get in his plane and leave. That in an of itself is fine, but when I tried it with my friends, some of them were able to go around the trigger and actually shoot him. now what I want to know is; is there someway to make a scripted trigger for the "Adolf" unit saying that once Hitler has been killed the allies win? I tried doing it as a trigger but when the allies set off the alarm, there are ways to destroy the plane with him in it, but the game just continues. If anyone can help me I appreciate it......thanks


Regards,
Trash Can Man

Offline .pablo.

  • Former Staff
  • ****
  • When in doubt, empty the magazine.
Re:scripting issue
« Reply #1 on: 11 Dec 2004, 23:24:57 »
Quote
is there someway to make a scripted trigger for the "Adolf" unit saying that once Hitler has been killed the allies win?
yes there is, and its actually quite simple:
1. make a trigger
2. set the condition field from "this" to "!(alive hitler)" where "hitler" is whatever you named the "Adolf" unit
3. set the "Type" to "End #," where the # corresponds to the ending in your briefing

Quote
I tried doing it as a trigger but when the allies set off the alarm, there are ways to destroy the plane with him in it, but the game just continues.
you would have to provide details on exactly what you did for me to be able to tell you why it didn't work

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
Re:scripting issue
« Reply #2 on: 12 Dec 2004, 00:49:10 »
what I did was make a small trigger around the unit and made it an end#. it only works if the alarm trigger was not activated. once the alarm trigger is activated, the "Adolf" unit gets in the plane and escapes. Even if we were to wreck, or blow up the plane, the game continues. what I would like to do ( if possible), is make that particular unit (ADOLF) scripted. So even if the alarm is tripped, the mission will end with either his death, or his escape. I guess what I'm saying is I would like to avoid using a trigger field if it isn't necessary.

Regards,
Trash Can Man

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
Re:scripting issue
« Reply #3 on: 19 Dec 2004, 06:03:34 »
So, can anyone help me please!!!!  I want to know is there a script out the to end a mission when a particular person is killed. Without having to use a trigger.....Something that I can put in the init field perhaps....

Regards,
Trash Can Man

Rokket

  • Guest
Re:scripting issue
« Reply #4 on: 19 Dec 2004, 06:37:08 »
Not sure I'm following totally, but if .pablo.'s sugg isn't working, what about grouping Adolf with the trigger? I know you're trying to avoid triggers, but what you really want to do is make game end whether Adolf is killed or escapes, right? so as long as the solution works...

A grouped trigger would work on this principle: if Adolf was not present (either dead or moved outside), then condition is met!

like this: group Adolf to the trigger (just choose Group and draw line to trg). Set condition to Not Present.

I've used it for destroying buildings (setdamge to .9 to the object, grooup to trigger, not present, bang, add-in multi explosions).

I think this will work. The only other thing i can think of is your init line logic, but I don't think conditional statements work in there...


Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:scripting issue
« Reply #5 on: 20 Dec 2004, 00:54:19 »
Rokket is right.    You can, if you really want, do this with a looping script but what you really want is a trigger.    Triggers are very good at what they do:   exploit them to the full.

It cannot possibly be anything whatsoever to do with init fields.    Init field are exectuted at the start of the mission:  if you are considering anything that happens or might happen more than about 2.5 seconds in the mission (assuming its a big mission, much less if it is small) then the one thing you can be absolutely sure of is that init fields do not come into the solution.
Plenty of reviewed ArmA missions for you to play