19.01.2008, 10:00:31
What if ...
- a DLL needs per-object variables like cBuilding::timesThisHasBeenCaptured ?
- I want a crate that makes every single unit on the map cloaked for two minutes, and, naturally, not lose the actually cloakable units' cloak when uncloaking everything else afterwards? I imagine the callback on MyTimerExpired will need to iterate the units and reload their Cloakable status from the INI, meaning certain INI changes will work mid-game and potentially desync.
- I want a new AI Script Action/Trigger Event/Action ?
- And two developers reuse the same Action number?
- I want to lift the built-in array length limits like ScriptType/TaskForce length?
- multiple DLLs hook up to one address, and ...
- the first one sets a return address, does that block the second, third, etc. DLL from receiving the event?
- two of them set different return addresses?
- the first one alters a data structure which the second one was going to access? Different results depending on the DLL call order. E.g., callback on UnitAttacked(cObject *target, cObject *attacker, cWeapon *weapon) , the first DLL does weapon->damage += some_value_dependant_on_the_attacker's_stats (hm, there should be other ways without altering the weapon for later shots...) , and the second replenishes the attacker's hitpoints by weapon->damage points. Switch the DLL order, wham, different replenishment.