With triggers, of course.
To make the trigger run each 5 seconds, you simply add a periodic event and set its value to 5 seconds.
For random point, there is a pretty thing called "random point in rect", you can create a point variable named Loc for example, and set it to "random point in map".
For earthquake, there are ripples, for example (temporary terrain deformation). You can choose the style for the ripple and set its values the way you want to.
For camera shaking, there is the "shake/sway camera" action, you can set the point and the magnitude there.
For damaging, you can just use "set unit life" action to reduce their life (if you don't want a damager).
For map pinging, there is a "ping minimap" action (if that was what you meant).
Putting all these in a trigger would look something like this:
-
Earthquake
-
Events
-
Time - Every 5.00 seconds of game time
-
Conditions
-
Actions
-
Set Loc = (Random point in (Playable map area))
-
Set Radius = 1000.00
-
Set LifeLoss = 50.00
-
Camera - Shake the camera for Player 1 (Red) with magnitude 5.00
-
Environment - Create a 4.00 second Normal ripple deformation at Loc with starting radius 1024.00, ending radius Radius, and depth 100.00, using 0.50 second ripples spaced 100.00 apart
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within Radius of Loc) and do (Actions)
-
Loop - Actions
-
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - LifeLoss)
-
Cinematic - Ping minimap for (All players) at Loc for 3.00 seconds
-
Custom script: call RemoveLocation(udg_Loc)
-
Wait 4.00 seconds
-
Camera - Stop swaying/shaking the camera for Player 1 (Red)
-
Environment - Stop (Last created terrain deformation) over 2.00 seconds
I just set the constants at the beginning so it's easier to modify. That
set bj_wantDestroyGroup = true
part is just for preventing leaks. Same as that
call RemoveLocation(udg_Loc)
, just remember to add udg_ prefix.
This erthquake will last 4 seconds and the units within the range will lose 50 hp. So this is just an example, you would probably want to create a more complicated one.