Jump to content
papa6

Simple script issue: kill the general!

Recommended Posts

I'm creating a small campaign to span different islands perhaps.

 

I setup a survivor under enemies and named him "target"

 

then I set a trigger with the following accordingly:

 

!Alive target

endmission "end1"

 

now.. in the triggers attributes I set it up as

 

Opfor

"end #1"

 

I ran the mission accordingly and killed the general "target" and nothing happened. I've searched around the internet and can't find anything about figuring out the syntaxes of ending a mission successfully by killing the general.

 

any help on the proper way to create an end mission based upon killing a lead target?

 

-papa6

Share this post


Link to post
Share on other sites

Why dont you just set the trigger owner to the "target"?

  1. Place a trigger covering the area you want. Make it big in case he runs away.
  2. Place your target AI.
  3. Right click trigger and select "Set trigger owner", drag line to the target AI.
  4. Set trigger to - Type: End#1 - Activation: Owner only - Activation Type: Not Present.

Share this post


Link to post
Share on other sites

 

Why dont you just set the trigger owner to the "target"?

  1. Place a trigger covering the area you want. Make it big in case he runs away.
  2. Place your target AI.
  3. Right click trigger and select "Set trigger owner", drag line to the target AI.
  4. Set trigger to - Type: End#1 - Activation: Owner only - Activation Type: Not Present.

 

I appreciate first off, your reply. I'm new to scripting so please forgive my child like ignorance. I'll give it a shot

Share this post


Link to post
Share on other sites

Alternatively without triggers:

deadgeneral = [this] spawn {
if !(isServer) exitWith {false};
params ["_general"];
waituntil {!alive _general};
endmission "end1"
};

Copy this into the target units init field.

 

Cheers

Share this post


Link to post
Share on other sites

Alternatively without triggers:

deadgeneral = [this] spawn {
if !(isServer) exitWith {false};
params ["_general"];
waituntil {!alive _general};
endmission "end1"
};

Copy this into the target units init field.

 

Cheers

thank you grumpy old man. I'll hook it up

  • Like 1

Share this post


Link to post
Share on other sites

Alternatively without triggers:

deadgeneral = [this] spawn {
if !(isServer) exitWith {false};
params ["_general"];
waituntil {!alive _general};
endmission "end1"
};

Copy this into the target units init field.

 

Cheers

I'm in the midst of creating a SP/MP campaign and my next issue is, is there a resource to adding the screen to show the objectives of the mission?

Share this post


Link to post
Share on other sites

Tasks are what you're probably asking for.

They're good for a quick guidance on where to do what.

 

Alternatively you can use the diary entries for a different approach or to provide further details.

 

You can also create your own dialog with the GUI Editor or ctrlCreate, might be a bit over the top though.

 

Cheers

Share this post


Link to post
Share on other sites

Tasks are what you're probably asking for.

They're good for a quick guidance on where to do what.

 

Alternatively you can use the diary entries for a different approach or to provide further details.

 

You can also create your own dialog with the GUI Editor or ctrlCreate, might be a bit over the top though.

 

Cheers

Thanks. check back every so often. This is a campaign in progress

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×