Changing The Ranged Attack Arrow

S3rgeus

Emperor
Joined
Apr 10, 2011
Messages
1,270
Location
London, United Kingdom
This guy:

Spoiler :


Has anyone seen a way to add a new variant of the floating red arrow and range demarcation? I'd like to add a new mission (already have code to do that) which heals a unit from range, instead of attacks them. Ideally I'd like to use the same arrow, but green instead of red. Has anyone seen any way to modify/alter the arrow? I don't yet know what exactly triggers the arrow's display, from the Lua and/or C++ source we have. (As in function calls - obviously ranged attacks trigger it conceptually.) So any pointers there would be much appreciated as well!
 
I'm not exactly sure, but look in WorldView.lua. I think the trick is INTERFACEMODE_RANGED_ATTACK. You might also look at the interplay with the functions in Bombardment.lua.
 
I'm not exactly sure, but look in WorldView.lua. I think the trick is INTERFACEMODE_RANGED_ATTACK. You might also look at the interplay with the functions in Bombardment.lua.

Awesome, thanks! I'll take a look there. :D
 
Events.SpawnArrowEvent is what you use to create the arrow. It only accepts the source X and Y and the destination X and Y as arguments though; there are no color options. Which, unfortunately, means that the colors are most likely hard-coded into the graphical DLL and thus cannot be changed.
 
Events.SpawnArrowEvent is what you use to create the arrow. It only accepts the source X and Y and the destination X and Y as arguments though; there are no color options. Which, unfortunately, means that the colors are most likely hard-coded into the graphical DLL and thus cannot be changed.

Argh! I was afraid that might be the case. :( I guess my healers will have to use red arrows until something dramatic changes.
 
Top Bottom