OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: rOk on 04 May 2004, 14:48:44

Title: There has to be someone who knows this
Post by: rOk on 04 May 2004, 14:48:44
Hi!

Had this posted on another forum; no answer, thought I'd try here...

How would be the best way to do this:

Trigger name : "MarkG"
Condition : if marker X or marker Y and marker Z are green
On Activation : "MarkG" = true


Trigger name : "Win"
Condition : if "MarkG" = true
On Activation : ?
And End#1 would have to be marked in this trigger;

Bottom line:
As you sweep through the countryside, markers change color accordingly (ie. an area still occupied by east is marked red on the map, yours is green)
and when they're all green the game ends with a victory
Thanks
Title: Re:There has to be someone who knows this
Post by: Zombie on 04 May 2004, 16:29:00
you could do it with objstatus
trigger:
east not present
condition this
on activation obj_1 objstatus "done"
and so on
 end trigger:
name win
condition: obj_1 and obj_2 and obj_3
on activation:  forceend

the end trigger may need some tweaking, all off my head, haven't tried it!  Good luck
Title: Re:There has to be someone who knows this
Post by: rOk on 04 May 2004, 16:49:32
Will forceend result in a victory?
*Does a little thinkiing then shoots*

or does the forceend take obj1 status (objx status) into account, and finishes the game accordingly'

Thanks
Title: Re:There has to be someone who knows this
Post by: PsyWarrior on 04 May 2004, 18:28:17
Greetings,

Quote
thought I'd try here...
Good choice... ;D

You could equally use End1 in the Type field, instead of forceEnd in the On Activation field.

I think forceEnd just terminated the mission completely, and returns you to the main menu. But I could be (and probably am) completely wrong about this, because I haven't used it that much. I know that it doesn't seem to do anything when previewing a mission in the editor, but should work when the mission is exported to SP.

Also, instead of checking if a marker is green, you could set variables to do the task. For instance
? east not present
markerArea1 setMarkerColor "Green"; Area1Clear=true

In the end trigger:
? Area1Clear && Area2Clear && Area3Clear &&...
Activation: Obj_1 objStatus "DONE"
Type=End#1

The '?' indicates the condition field, of course. As always, no assurances on syntax etc. ::)

-Supreme Commander PsyWarrior
-Psychic Productions Studios
Title: Re:There has to be someone who knows this
Post by: rOk on 05 May 2004, 10:25:33
Great!

The variables things does the job.

Thanks