Lion.Kanzen Posted July 3, 2020 Report Share Posted July 3, 2020 I have some questions. Actually I know how implement buildings alarm. How implement new trained unit sound? Train healer or military unit How implement an alarm from existing one? For example from capture relic or make a wonder. (event) Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 3, 2020 Report Share Posted July 3, 2020 12 minutes ago, Lion.Kanzen said: How implement new trained unit sound? Train healer or military unit <Sound> <SoundGroups> ... <trained>actor/fauna/animal/goat_trained.xml</trained> </SoundGroups> </Sound> 13 minutes ago, Lion.Kanzen said: How implement an alarm from existing one? For example from capture relic or make a wonder. (event) I'm not sure I understand this one... Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted July 3, 2020 Author Report Share Posted July 3, 2020 (edited) Ok i will paste your mp reply, thank you. Quote [5:19 a. m., 3/7/2020] Stan Dolcini: Just looked, when a unit is attacked [5:19 a. m., 3/7/2020] Stan Dolcini: the game plays [5:19 a. m., 3/7/2020] Stan Dolcini: <attacked>interface/alarm/alarm_attackplayer.xml</attacked> [5:19 a. m., 3/7/2020] Stan Dolcini: Because [5:19 a. m., 3/7/2020] Stan Dolcini: in https://github.com/0ad/0ad/blob/4b35ac33f7f30e6bb0a674a6996357a8a75cf1a3/binaries/data/mods/public/simulation/components/AttackDetection.js [5:19 a. m., 3/7/2020] Stan Dolcini: There is [5:19 a. m., 3/7/2020] Stan Dolcini: PlaySound("attacked", target); [5:20 a. m., 3/7/2020] Marcio Duron: Ok [5:20 a. m., 3/7/2020] Stan Dolcini: I could change there [5:20 a. m., 3/7/2020] Stan Dolcini: PlaySound(attackerOwner === 0 ? "attacked_gaia" : "attacked", target); [5:39 a. m., 3/7/2020] Stan Dolcini: So basically [5:40 a. m., 3/7/2020] Stan Dolcini: normal attack [5:40 a. m., 3/7/2020] Stan Dolcini: soundGroup = attacked [5:40 a. m., 3/7/2020] Stan Dolcini: gaia attack [5:40 a. m., 3/7/2020] Stan Dolcini: soungroup = attacked_gaia [5:40 a. m., 3/7/2020] Stan Dolcini: capture [5:40 a. m., 3/7/2020] Stan Dolcini: normal [5:40 a. m., 3/7/2020] Stan Dolcini: attacked_capture [5:40 a. m., 3/7/2020] Stan Dolcini: gaia [5:40 a. m., 3/7/2020] Stan Dolcini: attacked_capture_gaia [5:41 a. m., 3/7/2020] Stan Dolcini: That means you have to put it in Edited July 3, 2020 by Lion.Kanzen Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 3, 2020 Report Share Posted July 3, 2020 https://code.wildfiregames.com/D2859 https://code.wildfiregames.com/D2860 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.