Home   Help Search Login Register  

Author Topic: Triggers  (Read 493 times)

0 Members and 1 Guest are viewing this topic.

Zorbtek

  • Guest
Triggers
« 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?

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Triggers
« Reply #1 on: 14 Jul 2004, 19:37:39 »
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]
Not all is lost.

Captain Courageous

  • Guest
Re:Triggers
« Reply #2 on: 24 Jul 2004, 16:59:54 »
This sounds like a verrrrrrry interesting mission!  :o