Jump to content
Sign in to follow this  
Leving

Message Triggers.

Recommended Posts

Okay, so I have an interesting question...

I want to add a message to the game (ie hint 'xxx') but ONLY AFTER someone has fired an artillery barrage.

I assume that it is possible to add a condition to the trigger, for example;

Condition: 'arty fired'

On Act: hint 'the artillery has been fired.'

I do not however, know what the condition would be.

Any ideas?

Thanks,

Leving.

Share this post


Link to post
Share on other sites

You could declare a variable after your artillery fires. Something like

Pseudo:

artyFired = 1;

In your condition you can just make a loop asking for that waits until artyFired = 1 and when that condition is met, you'll have your hint.

Share this post


Link to post
Share on other sites
You could declare a variable after your artillery fires. Something like

Pseudo:

artyFired = 1;

In your condition you can just make a loop asking for that waits until artyFired = 1 and when that condition is met, you'll have your hint.

Well, artyfired = 1 isn't a boolean condition. artyfired == 1 could be

@Leving : can you be more specific and tell us how do you create an artillery barrage ? Because if you use BI artillery module, there are variables that can be checked with the getvariable command. For example, the "ARTY_COMPLETE" variable is set too true when the artillery has finished firing.

Share this post


Link to post
Share on other sites
Well, artyfired = 1 isn't a boolean condition. artyfired == 1 could be

@Leving : can you be more specific and tell us how do you create an artillery barrage ? Because if you use BI artillery module, there are variables that can be checked with the getvariable command. For example, the "ARTY_COMPLETE" variable is set too true when the artillery has finished firing.

Yea I just marked it as pseudocode so he could get the concept. I'm doing VBscript right now at work so I don't need two equal signs! :yay:

Share this post


Link to post
Share on other sites

Okay, this is how I made my arty;

1. Add in Secops, name 'som1' and link to the player.

2. Add in a logic trigger:

Condition; 'som1 getVariable "initDone"; '!alive car1'.

On Act; [["artillery_barrage"], player, [[RIPPER, [1,7,9]]]] call BIS_SOM_addSupportRequestFunc;

Set timeout 900 seconds.

This artillery then becomes active 900 seconds (fifteen minutes) after car1 is destroyed.

For the artillery its self, I placed three MLRS, grouped, and synched to an Artillery module named 'RIPPER.'

So anyway, what I want to happen is, IF the player decides to use the artillery, after it has finished, a message (hint) will show - which gives more directions into the mission.

Thanks,

Leving.

Edited by Leving

Share this post


Link to post
Share on other sites

I never had the guts to go into scripting and I have learned to work around those problems by taking advantage of the present/not present conditions.

If I wanted to receive a message after the airstrike is done I would place a unit (that doesn't move) where the airstrike is supposed to happen and place a small trigger area around the unit. The airstrike will probably kill the unit and my "activation: Not present" would take care of the rest.

I am just lazy like that.

Share this post


Link to post
Share on other sites

Well, name the artillery group as you want (such as arty_group), with writing this in the group leader init :

arty_group=group this

Then your condition should be (not tested though but according to wiki !) :

arty_group getVariable "ARTY_COMPLETE"

Edited by ProfTournesol
precision

Share this post


Link to post
Share on other sites

yes I had thought of that myself, but there are too many variables which might cause the hint trigger to be activated at the wrong time, or not at all.

IE, someone kills the unit too early/no one kills the unit/the artillery doesn't kill the unit, and so on. That kind of thing works in some situations, where certain variables are definite.

It almost certainly wont work for me though.

---------- Post added at 03:48 PM ---------- Previous post was at 03:34 PM ----------

Okay, that didn't work Pro. Is there anything specific I should add to the trigger other than condition; arty_group getVariable "ARTY_COMPLETE" and on Act; hint 'blahblahblah'

I tried this with the arty set to both repeating and once. neither worked.

Perhaps the group naming code is wrong? I'm not sure but I've seen code for it, looked a tad different to the one you posted.

You have any other suggestions?

Thanks,

Leving.

Share this post


Link to post
Share on other sites

yeh, maybe the first element called shouldn't be the artillery group but the GL.

Try :

ripper getVariable "ARTY_COMPLETE"

Have a look at the biki :

Artillery module

Edited by ProfTournesol
add details

Share this post


Link to post
Share on other sites

Okay, so this worked, however, the message appears when the arty has started firing, but thats okay because I can put a timer on the message.

Just on a side note, RIPPER is the name given to the artillery module not the name of the artillery group leader. I was planning on naming the GL Ripper (its currently unnamed) but I guess I don't need to.

Thanks very much for your help. I appreciate it. Its cool when you get something like this to work.

Thanks again,

Leving.

Share this post


Link to post
Share on other sites

My pleasure, i'm learning trying to answer those questions :)

By the way, by "GL" i meant "Game Logic".

Edited by ProfTournesol
adding details

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
Sign in to follow this  

×