Page 1 of 1
evtdisttarg command help
Posted: Thu Apr 04, 2013 8:13 pm
by alessillo
I'm working on a scenario for my Zulu Mod, I want that some Zulu units charge the British when they are at a distance of 300 yards, so I made this line in the battlescript:
evtdisttarg,Zulu_20,charge:300,,
Zulu_20 is the id of the unit, 300 is the distance, but nothing happens...
Cheers
Re: evtdisttarg command help
Posted: Thu Apr 04, 2013 8:28 pm
by Little Powell
That command can be a little buggy. I would try the charge command on the next line with evtcont. So it would look like:
evtdisttarg,Zulu_20,,300,,
evtcont,Zulu_20,,charge
Re: evtdisttarg command help
Posted: Thu Apr 04, 2013 8:30 pm
by Marching Thru Georgia
the charge command does not take a distance parameter. It is simply a command.
Re: evtdisttarg command help
Posted: Thu Apr 04, 2013 11:06 pm
by alessillo
Thank you for the answer, I used your commands Little Powell, but nothing happens, the sdk manual say that evtdisttarg is triggered when an enemy unit comes at a certain distance from the unit present in the command line... Are there some examples of the use of this event in scenarios for Gettysburg or Antietam?
Re: evtdisttarg command help
Posted: Thu Apr 04, 2013 11:18 pm
by Little Powell
The example I have above is taken from a recent scenario (in development) that I have verified works. It was used on an artillery unit so that the officer is un-TC'd when an enemy comes within 300 yards. So the only difference in your example is the charge command, I'm using a tcommoff command.
Charge can also be kind of buggy. The unit (if un-TC'd) may decide against charging. But if the unit is TC'd, it may also ignore the command.. So on paper, the commands I gave you should work, but there may be other factors preventing it...
Hopefully RebBugler will chime in. He may have used evtdisttarg along with charge before.
Edit: Also make sure the unit can charge. If they get the charge command, they still need an enemy targeted to be able to charge it. 300 yards sounds pretty far to be able to charge.
Re: evtdisttarg command help
Posted: Fri Apr 05, 2013 5:28 pm
by alessillo
This works fine, thank you very much:
evtdisttarg,Zulu_20,,300,,
evtcont,Zulu_20,charge,,
I have another question, if I write another evtdisttarg for the same unit (Zulu_20) but with different distance like this:
evtdisttarg,Zulu_20,,300,,
evtcont,Zulu_20,charge,,
evtdisttarg,Zulu_20,,200,,
evtcont,Zulu_20,charge,,
both events will be triggered or only one?
Thank you again
Re: evtdisttarg command help
Posted: Fri Apr 05, 2013 6:58 pm
by Little Powell
They would both work, but the unit would always charge at 200 yards, making the 300 yards obsolete.