Powered by Invision Power Board


Forum Rules OFP.info Forum Rules
 

> activate triger when player killed
45CdoRM
Posted: June 30, 2007 12:53


New Member
*

Group: Members
Posts: 9
Member No.: 8214
Joined: July 13, 2006



Hi there!

I want to make two triggers....name two troops and when those troops are killed that the trigger is activated....can you help..

I guess this is has probably allready been covered but i tried to do a search and get nothing similar.

cheers!
Top
SaS TrooP
Posted: June 30, 2007 13:20


Junior Member
**

Group: Members
Posts: 187
Member No.: 9568
Joined: December 21, 2006



It can be found over here...
And not that forum. It is to mission editing & scripting
graduated.gif

You write in contidion of trigger:



CODE
NOT alive soldier_name AND NOT alive soldier2_name2


Exactly with big and small letters.
Where soldier_name there you put name of soldier in editor


--------------------
www.travian.com- Travian is a browser based MMOG where you can compete with thousands of other players by taking control of a small village and leading your people to glory and victory.

www.ofp.bmj.pl- The best polish site for OFP. Home of OFPC PL (WP soldiers, Silent War, September 1939).
Users Website
Top
kalasnikov471
Posted: June 30, 2007 13:59


OFP Mission/campaign/ addon/island/mod maker...
***

Group: Members
Posts: 349
Member No.: 9719
Joined: March 10, 2007



QUOTE
Exactly with big and small letters.


Well, it dosen't acually matter if you type it in small or big letters... blink.gif

But there is one more command that you can use, it's an older version of the command that SaSTrooP gave...But still works the same, I prefer it becaouse it keeps it more organised if you are using eg. 20 units... graduated.gif

CODE
not (alive nameOFunit1) and not (alive nameOFunit2)


Were it says "nameOFunit--" you put the soldiers name that is ment to die eg. "S1", so it should looks like this:

CODE
not (alive S1) and not (alive S2)



--------------------
KALASNIKOV ©



QUOTE
Mamy tradicje jebac policje! HWDP! We have traditions, to fuck the police!!! HWDP!
Users Website
Top
Linker Split
Posted: June 30, 2007 14:14


OFP Big Boss
***

Group: Members
Posts: 676
Member No.: 6679
Joined: August 31, 2005



or try

CODE
{alive _x} count units thislist == 0


so that all the units in the trigger that are under the side you select will be checked if alive or not wink.gif
it should be more global than the others, that are good anyway!


--------------------

Only the dead have seen the end of war (Plato)
Users Website
Top
SaS TrooP
Posted: June 30, 2007 15:05


Junior Member
**

Group: Members
Posts: 187
Member No.: 9568
Joined: December 21, 2006



NOT, AND and OR ALWAYS have to be with big letters in condition. Try and make youself sure Kalash


--------------------
www.travian.com- Travian is a browser based MMOG where you can compete with thousands of other players by taking control of a small village and leading your people to glory and victory.

www.ofp.bmj.pl- The best polish site for OFP. Home of OFPC PL (WP soldiers, Silent War, September 1939).
Users Website
Top
kalasnikov471
Posted: June 30, 2007 17:02


OFP Mission/campaign/ addon/island/mod maker...
***

Group: Members
Posts: 349
Member No.: 9719
Joined: March 10, 2007



QUOTE
NOT, AND and OR ALWAYS have to be with big letters in condition. Try and make youself sure Kalash


No, NO and NO, I always type them in small letters and it works perfectely...Besides, I don't think mission editor distinguishes small and capital letters...


--------------------
KALASNIKOV ©



QUOTE
Mamy tradicje jebac policje! HWDP! We have traditions, to fuck the police!!! HWDP!
Users Website
Top
45CdoRM
Posted: June 30, 2007 18:27


New Member
*

Group: Members
Posts: 9
Member No.: 8214
Joined: July 13, 2006



and how could i put it if where just an individual soldier
....ie triger activated when soldier 1a is killed.
Top
kalasnikov471
Posted: June 30, 2007 18:40


OFP Mission/campaign/ addon/island/mod maker...
***

Group: Members
Posts: 349
Member No.: 9719
Joined: March 10, 2007



Write this in to the Activation box of the trigger...

CODE
not (alive 1a)


--------------------
KALASNIKOV ©



QUOTE
Mamy tradicje jebac policje! HWDP! We have traditions, to fuck the police!!! HWDP!
Users Website
Top
SaS TrooP
Posted: June 30, 2007 19:18


Junior Member
**

Group: Members
Posts: 187
Member No.: 9568
Joined: December 21, 2006



When you use not (alive _unit) you dont need big letters, but if you use NOT alive _unit
You must!
The same is with AND and OR. Try to write this in small letters:
CODE
NOT alive _unit OR NOT alive _unit



--------------------
www.travian.com- Travian is a browser based MMOG where you can compete with thousands of other players by taking control of a small village and leading your people to glory and victory.

www.ofp.bmj.pl- The best polish site for OFP. Home of OFPC PL (WP soldiers, Silent War, September 1939).
Users Website
Top
kalasnikov471
Posted: June 30, 2007 21:36


OFP Mission/campaign/ addon/island/mod maker...
***

Group: Members
Posts: 349
Member No.: 9719
Joined: March 10, 2007



I dont know mate? I just used your code in my mision with small letters and it workes fine... wacko.gif


--------------------
KALASNIKOV ©



QUOTE
Mamy tradicje jebac policje! HWDP! We have traditions, to fuck the police!!! HWDP!
Users Website
Top
Linker Split
Posted: July 01, 2007 11:08


OFP Big Boss
***

Group: Members
Posts: 676
Member No.: 6679
Joined: August 31, 2005



OFP engine doesn't care about Capital letters or not.

Ah, and it's
QUOTE
NOT alive unit OR NOT alive unit

and not
QUOTE
NOT alive _unit OR NOT alive _unit


SaS Troop, cause in your case, _unit is a global variable in a local ambient[/CODE]

This post has been edited by Linker Split on July 01, 2007 11:10


--------------------

Only the dead have seen the end of war (Plato)
Users Website
Top
kalasnikov471
Posted: July 01, 2007 13:52


OFP Mission/campaign/ addon/island/mod maker...
***

Group: Members
Posts: 349
Member No.: 9719
Joined: March 10, 2007



Thank you Linky hug.gif

See SaSTrooP, I told you it don't matter , but everyone makes mistakes thumbsup.gif


--------------------
KALASNIKOV ©



QUOTE
Mamy tradicje jebac policje! HWDP! We have traditions, to fuck the police!!! HWDP!
Users Website
Top
SaS TrooP
Posted: July 01, 2007 16:43


Junior Member
**

Group: Members
Posts: 187
Member No.: 9568
Joined: December 21, 2006



My goodness! _unit was just an example!!!

Write:
CODE
NOT alive soldato1 OR NOT alive soldato2

And watch it working...

Now write:
CODE
not alive soldato1 or not alive soldato2

And watch it's mistake and error

And now write:
CODE
not (alive soldato1) OR not (alive soldato2)

And watch it's working...

Only three words: NOT, OR and AND must be in all big letters, rest it doesnt matter rolleyes.gif


--------------------
www.travian.com- Travian is a browser based MMOG where you can compete with thousands of other players by taking control of a small village and leading your people to glory and victory.

www.ofp.bmj.pl- The best polish site for OFP. Home of OFPC PL (WP soldiers, Silent War, September 1939).
Users Website
Top
Linker Split
Posted: July 01, 2007 17:08


OFP Big Boss
***

Group: Members
Posts: 676
Member No.: 6679
Joined: August 31, 2005



Ok, kalasnikov471, SaSTroop, it's not a problem cause you can also write instead of OR,END,NOT the following:
END: &&
OR: ||
NOT: !
biggrin.gif
problem solved


--------------------

Only the dead have seen the end of war (Plato)
Users Website
Top
kalasnikov471
Posted: July 01, 2007 17:40


OFP Mission/campaign/ addon/island/mod maker...
***

Group: Members
Posts: 349
Member No.: 9719
Joined: March 10, 2007



Still dough, cap's don't matter __glurps.gif and even if they did, I always write in small letters and it works the same...

This post has been edited by kalasnikov471 on July 01, 2007 17:42


--------------------
KALASNIKOV ©



QUOTE
Mamy tradicje jebac policje! HWDP! We have traditions, to fuck the police!!! HWDP!
Users Website
Top
« Next Oldest | Mission Editing & Scripting | Next Newest »

Topic Options Fast Reply