fargo007 Posted October 21, 2021 Posted October 21, 2021 I see we can create them and they do run back 'n forth quite well in MP. They also seem to throw hit/dead events at some level, but these aren't accessible as far as I can tell. --- onChatMessage--- RED AI in T-90 killed BLUE unknown in Locomotive with nil I cannot make them respond to waypoint actions of any kind. They also don't draw enemy AI fire, or make triggers fire. Is there anything I am missing at this point? Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/
Gambit21 Posted October 24, 2021 Posted October 24, 2021 I've been experimenting with trains myself, and it seems so. All I can do it seems is activate them late as I would any other unit, but that's as complex as I can get with their logic. No speeds changes, no stops, no triggers etc.
Dangerzone Posted November 25, 2021 Posted November 25, 2021 On 10/22/2021 at 3:50 AM, fargo007 said: I see we can create them and they do run back 'n forth quite well in MP. They also seem to throw hit/dead events at some level, but these aren't accessible as far as I can tell. There doesn't appear to be much - however I have been able to identify if particular carriages are hit by their IniTypeName (using Moose): ie: evh1 = EVENTHANDLER:New() evh1:HandleEvent(EVENTS.Dead) function evh1:OnEventDead(EventData) if EventData.IniTypeName == "Coach a tank yellow" then MESSAGE:New("You have hit a yellow tank carriage!" ,30):ToAll() end if EventData.IniTypeName == "Coach a passenger" then MESSAGE:New("You have killed civilians!" ,30):ToAll() end end --OnEventDead / evh1 Hope this helps.
fargo007 Posted November 25, 2021 Author Posted November 25, 2021 (edited) 14 minutes ago, Dangerzone said: There doesn't appear to be much - however I have been able to identify if particular carriages are hit by their IniTypeName (using Moose): ie: evh1 = EVENTHANDLER:New() evh1:HandleEvent(EVENTS.Dead) function evh1:OnEventDead(EventData) if EventData.IniTypeName == "Coach a tank yellow" then MESSAGE:New("You have hit a yellow tank carriage!" ,30):ToAll() end if EventData.IniTypeName == "Coach a passenger" then MESSAGE:New("You have killed civilians!" ,30):ToAll() end end --OnEventDead / evh1 Hope this helps. Thank you very much for the reply. This does help a lot actually. I imagine with it I can track events by unit (rail car) as well, and have scenarios where single cars in a large train might be specifically targeted, or when attacked (hit), have enemies spill out from them with SpawnFromUnit() and start fighting back. Edited November 25, 2021 by fargo007 Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/
Dangerzone Posted November 25, 2021 Posted November 25, 2021 20 minutes ago, fargo007 said: Thank you very much for the reply. This does help a lot actually. I imagine with it I can track events by unit (rail car) as well, and have scenarios where single cars in a large train might be specifically targeted, or when attacked (hit), have enemies spill out from them with SpawnFromUnit() and start fighting back. Quite possibly. Not sure if this is of any help. I know that I can mount and dismount troops from vehicles - it may be possible to implement with trains as well. (Although I imagine with trains, once they're hit - they stop permanently - so such a script may not be required). Re the script above, the way I found out the iniUnitName was by basically having something similar to the following: evh1 = EVENTHANDLER:New() evh1:HandleEvent(EVENTS.Dead) function evh1:OnEventDead(EventData) if EventData.IniTypeName == "Coach a tank yellow" then MESSAGE:New("You have hit "..EventData.IniTypeName ,30):ToAll() end end --OnEventDead / evh1 ... and then I started blowing up each one to get the unit names. (There may be other references to this but I didn't know where to find it, so I did it this 'hack' way). I'd love to see the ability to name individual carriages and refer to each one - but I'm not holding my breath on that one. Good luck with your designing. Glad this was of help!
fargo007 Posted November 25, 2021 Author Posted November 25, 2021 Thank you, same. I will check it out soon and see what can be expanded from where we are here. If an indexed, spawned unitname is exposed, I'm pretty sure we can get it and use it, at least with an event handler. It's cool stuff we're doin' bro. We toil for the glory of DCS. 1 Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/
Recommended Posts