IRONFRONT FANS FORUM
Register Latest Topics
 
 
 


Reply
  Author   Comment   Page 1 of 2      1   2   Next
Gunter Severloh

Avatar / Picture

Admin
Registered:
Posts: 2,724
Reply with quote  #1 
!Alive Check
Using !Alive in a trigger basically checks to see if the object (name) is alive.
So this can be a soldier, a car, a radio tower, anything that moves, or exists, almost depends as a radio tower is a static object.

How to create objectives using the !Alive check
This is a very simple way to create many objectives in a mission without the need of all sorts of scripts
and extra coding. When i normally use this parameter I like to use it in relation to a marker.

Example on how to use
Heres how this works, below is an example of how to use this :

Killing an enemy officer Example
  1. Place a player on the map wherever you want, basically where you want him to start.
  2. Place (insert) an enemy officer wherever you want, away from you somewhere that you need to travel too.
  3. Give this officer a name, so on the right side of the (edit unit) window lets name the officer Ivan
  4. Create a trigger under axis A and Axis B at the top make the numbers 0 (zero)
  5. Condition
    Code:
    !alive ivan
  6. On Act.
    Code:
    hint "The enemy Officer has been eliminated!"; deleteMarker "ivan";

  7. Create a marker name: Ivan  Text: Enemy officer
  8. Save, play. Once ingame go to your map you should see a marker that says: Enemy Officer
  9. Go to where that marker is on your map, kill the officer and a hint (message) will popup on the screen and say:
Quote:
The enemy Officer has been eliminated!

At the same time the marker on the map will be deleted.
==================
As you can see you can copy this and use it for multiple objectives, for example you can set it up to have a radio
tower as an objective, same concept applies, just give the tower a name, put a marker down, adjust the !alive trigger.

You can use this concept with anything ingame that can be destroyed, makes for a long mission when
your map is dotted with multiple objectives.
===============


__________________
0
santiagojamesaea

Sergeant
Registered:
Posts: 106
Reply with quote  #2 
Very nicely explained.Would the old hands please put up more of this sort of thing!!
0
Joe98

Avatar / Picture

Captain
Registered:
Posts: 198
Reply with quote  #3 
Yes all very simple and I never knew!

These typees of hints are wonderful!

0
CAREEREVIL

Avatar / Picture

IFR Team
Registered:
Posts: 139
Reply with quote  #4 
ill try it, if i do it is easy
we may need get on team speak for this lol
YA real cool look great but hard thing was killing that
Enemy Officer took longer to kill ,what the lol
should gave him a spoon not a gun ha ha
CAREEREVIL


__________________
0
Gunter Severloh

Avatar / Picture

Admin
Registered:
Posts: 2,724
Reply with quote  #5 
I'll break it down for you guys into a list, keep in mind the points of how this works:

In order
  1. Place player.
  2. Place enemy officer.
  3. Name the officer Ivan
  4. Create a trigger and put
    Code:
    !alive ivan
    in the condition box.
  5. Put
    Code:
    hint "The enemy Officer has been eliminated!"; deleteMarker "ivan";
    in the on act box.
  6. Create a marker  name: Ivan  Text: Enemy officer
  7. Save, then preview the mission, go to the map ingame look for the marker on the map it should say: Enemy officer
  8. Move to the area where you placed the officer, and kill him, when the officer is killed a hint (a message)
will pop up on the screen and the marker on the map will disappear (be deleted).

__________________
0
Tayuk

Avatar / Picture

Admin
Registered:
Posts: 452
Reply with quote  #6 
Just an alternative to the above, the condition could also be:-

Code:
Not Alive Ivan


This does exactly the same as:-

Code:
!alive Ivan


If you wanted the condition to be the death of 2 officers then simply (2nd officer for this example called Eric)

Code:
Not Alive Ivan AND Not Alive Eric


The trigger won't activate until both are dead.
0
[EVO] Dan

Sergeant
Registered:
Posts: 85
Reply with quote  #7 
if your going to have an 'and' statement, it is better to put each check into brackets as the game might hickup on them.

Quote:
(!alive meh) && (!alive dude)


I can put up some other things concerning conditions if you want, such as it being based upon a count of units inside the trigger area.
0
Santa Six

Avatar / Picture

Colonel
Registered:
Posts: 360
Reply with quote  #8 
Groups
If group is named group1

These will check if there are less than four units remaining in group1.
Code:
({alive _x} count units group1) < 4
or
({alive _x} count units group1) == 3


These will check if the whole group1 is dead.
Code:
({alive _x} count units group1) < 1
or
({alive _x} count units group1) == 0
0
santiagojamesaea

Sergeant
Registered:
Posts: 106
Reply with quote  #9 
This is turning into a FANTASTIC thread.Great work Gunter.
[EVO] Dan and Santa Six keep posting!

Now if as the newbie i am i can just ask a couple of things...

OK,imagine that i've used Gunters/Tay's example and killed Ivan and Eric.My trigger/task message has said "well done"and my next "task"is to move back to my "start point" for a pick up,back to base and a hot meal.
If i have placed a truck at this point how do i get it to wait for me and drive off after my team and myself are aboard?
What i want to do is start the mission,complete the mission,move to a n RV point,board a truck and have the truck drive off with me and the team in it.
I'm fine(ok,that's relative!)about all except the last part,i would like to finish the mission some 200 metres down the road,using a trigger obviously...but what syntax would one use?"player1 present?"
0
Tayuk

Avatar / Picture

Admin
Registered:
Posts: 452
Reply with quote  #10 
This trigger condition checks to see if all living memebers of a named group, in this example called Grp1 are in a truck called truck1

Code:
{_x in truck1} count units Grp1 == count units Grp1;


To name your group Grp1 put this in the leaders init line

Code:
Grp1 = Group this;


Place a truck named truck1 of the same side as you with a move waypoint right in front of it, then other waypoints for the truck to follow once your in it. Then syncronize the 1st move waypoint with the trigger with the condition from the 1st line above. The trigger won't activate (truck wont move) until all the living members of your squad are in it.

Optional - I would also put this line in the init of the truck to make sure it doesn't get detected/destroyed by enemy before you get to it (this stops the truck reacting to enemy and also stops enemy reacting to the truck):-

Code:
this setcaptive true


In my experience with Ironfront there is a possibility that at some point during the mission your AI squad mates, if thats what you have, may just stand there and not follow orders anymore, if this occurs you will need to kill that/those disobedient fellow/s brefore you get to the truck or the trigger wont work as its waiting for him etc.

0
Santa Six

Avatar / Picture

Colonel
Registered:
Posts: 360
Reply with quote  #11 
Place your units and a truck on the map. Give a HOLD waypoint to the truck. Make a Switch Trigger 3x1 in size or so it only covers the truck. Group that trigger with your group leader. Now set Trigger Activation to Whole group. Give the Timeout at least 3 sec to allow group to enter. Now sync the same Trigger to the  trucks HOLD waypoint.

On the last waypoint for the truck. Place a trigger that ends the mission. Group the trigger to the truck. Make the Trigger Activation Vehicle. Making the truck end the mission. 

I'm sure there's a syntax way. This is the mechanical version.

There's also a player in vehicle condition thing but its for single unit.

0
scars09

Sergeant
Registered:
Posts: 73
Reply with quote  #12 
use the group instead the truck for the endtrigger, in case the truck gets destroyed or dammaged the players will still be able to finish mission successfully, nothing more annoying then getting to the end and nothing happens cause a trigger doesnt fire.
and as far i know does this setcaptive true only prevent ai shooting at you, not the other way around, in that case not a big problem since the truck is unarmed
0
santiagojamesaea

Sergeant
Registered:
Posts: 106
Reply with quote  #13 
Okay,Thanks everyone got that to work first time!
Just one more thing.The usual thing would be to use a trigger to end the mission when the truck passes through the trigger,"ussr Present";for example.The only thing is i already have a truck passing down the same stretch of road at the begining of the mission.So how do i get a trigger to fire when one particular group or object is present.Kind of "group1" or "truck1" "present"(this would be useful for other things too).I've tried synchronizing the trucks last waypoint to an end trigger but to my surprise it didn't work.I could "group"the truck to the end trigger but i've found that that only works on "empty" vehicles (and i want to be driven not drive!!)
Any ideas? and thanks again.
0
Tayuk

Avatar / Picture

Admin
Registered:
Posts: 452
Reply with quote  #14 
Have the condition of the end trigger:-

Code:
truck1 in thislist;







0
santiagojamesaea

Sergeant
Registered:
Posts: 106
Reply with quote  #15 
ook! Thats the oneI imagine you can use that syntax for a huge variety of situations?
Thanks again Tay
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.