Author Topic: Tornado's  (Read 1643 times)

Offline Eddy-B

  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
Tornado's
« on: February 04, 2006, 02:19:07 PM »
I've looked further into the SetTornado function. SirBomber found out some things already. I've just completed it, that's all

Code: [Select]
static void __fastcall SetTornado(int xStart, int yStart, int duration, int xEnd, int yEnd, int boolImmediate);

The 3 new params are:
  • xEnd, yEnd : the endpoint of the Tornado (if duration is set high enough, of course). The path will still be randomized, but the tornado will move towards the endpoint. Once the tornado has reached the end-point, it will randomly move around that point.
  • boolImmediate : when set to 1, the tornado will appear immediatly, while setting it to 0 the early-warning system has a chance to alert players. This value is probably only added because of the demo 1 and should be set to 0 in normal missions to ensure the player can use early-warning systems.
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Tornado's
« Reply #1 on: February 04, 2006, 05:22:10 PM »
Is there anything like boolImmediate for the SetMeteor function? (Apparently not, but...)

Offline Eddy-B

  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
Tornado's
« Reply #2 on: February 04, 2006, 08:35:05 PM »
Check TethysGame yourself: this only applies to tornado's, and since that's the only disaster that appears in the demo's i would be safe to assume that was the reason for it.
« Last Edit: February 05, 2006, 11:33:42 AM by Eddy-B »
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Tornado's
« Reply #3 on: February 05, 2006, 11:05:05 AM »
Yeah, there's no exported way to get meteors to appear immediately. It can be done with mem hacking by setting two flag bits and resetting the unit's internal timer though.

The flags are at offset 0x44 in the unit record. The flags in question are 0x4000 (DisasterNoFirstWarn) and 0x8000 (DisasterNoSecondWarn). Then set the timer value to something like 0 or 1 (0 might not work since the timer might only fire when it counts down to 0 and not when it already is 0). The timer is at offset 0x3C. (I think, it's been a while). Both fields are 4 bytes long.


There's also some other timers you might come across, such as stickyfoam at 0x54, EMP at 0x56, and ??? (ESG?) at 0x58. All these timers are 2 bytes long. I believe there may be some inconsistency with how these ones behave when setting them to 0. Some will stop and the effect wears off, others will wrap aroung to 65535 and last a long time.