OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Zorbtek on 14 Jul 2004, 19:04:16
-
Hi,
I'm trying to find out what I put in the Triggers On Activation field...
I have 10 objects you must find, like a scavenger hunt.
I want it so when West is present in the Trigger it says
"You found 1 of 10 Bunny Rabbit Eggs"
And then if you happen to find another, it says
"You found 2 of 10 Bunny Rabbit Eggs"
ETC.
When you find the last one, I want it to say something like, Congrats! You unlocked blahh blahhh.
How do I do this?
-
have a variable hold the number of found eggs(?:D) and just print the value.
In some unit's init field: eggcount = 0
1st trigger:
activation by: west present
condition: this
on activation: eggcount = eggcount +1; hint format ["You found %1 of 10 Bunny Rabbit Eggs",eggcount]
2nd trigger:
activation by: west present
condition: this
on activation: eggcount = eggcount +1; hint format ["You found %1 of 10 Bunny Rabbit Eggs",eggcount]
...
Do 10 of the above and then
check trigger:
condition: eggcount == 10
on activation: hint format ["Congrats! You have just hunted down 10 silly eggs. Now it's time to make camp and have some scrambled eggs with mushrooms.",eggcount]
-
This sounds like a verrrrrrry interesting mission! :o