• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Solved] How to make random real time events

Status
Not open for further replies.
Level 5
Joined
Jun 15, 2016
Messages
111
I wanted to make a weather system that's not static/fixed.
For example, I have a Northrend Snow (light) going on.
After like a fixed 10 + random number seconds it will become a heavier snow.
And then, after a duration it returns to the light snow?

Halp.
 
Level 15
Joined
Jul 9, 2008
Messages
1,552
here it doesent change between the 2 very nicley but it works the way u want it to

  • map int
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Environment - Create at (Playable map area) the weather effect Northrend Snow (Light)
      • Environment - Turn (Last created weather effect) On
      • Set weather = (Last created weather effect)
      • Set weatherNumber = 1
  • timer
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set TIMER = (TIMER + 1.00)
  • weather change
    • Events
      • Game - TIMER becomes Equal to TIMECHANGE
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • weatherNumber Equal to 1
        • Then - Actions
          • Environment - Remove weather
          • Environment - Create at (Playable map area) the weather effect Northrend Blizzard
          • Environment - Turn (Last created weather effect) On
          • Set weather = (Last created weather effect)
          • Set weatherNumber = 2
          • Set TIMER = 0.00
          • Set TIMECHANGE = 10.00 + random real number between 40.00 and 100.00
        • Else - Actions
          • Environment - Remove weather
          • Environment - Create at (Playable map area) the weather effect Northrend snow (light)
          • Environment - Turn (Last created weather effect) On
          • Set weather[1] = (Last created weather effect)
          • Set weatherNumber = 1
          • Set TIMER = 0.00
          • Set TIMECHANGE = 10.00 + random real number between 40.00 and 100.00
 
Level 15
Joined
Jul 9, 2008
Messages
1,552
lol i fogot about the timers ..... its been awhile

use as the event for the last trigger
  • Time - WEATHERTIMER expires

and instead of setting all the vairables use
  • Countdown Timer - Start WEATHERTIMER as a One-shot timer that will expire in 30.00 seconds
and you wont need the second trigger
 
Level 5
Joined
Jun 15, 2016
Messages
111
Basically, this is what I did because I was really new to timers because I always used wait and variable increments. Thanks a lot!
At map init I set the weather to light snow.
after a 10+random number from 5 to 30 event (elapsed game time) it will change and on a new trigger where its the same event but changes back to the light snow.

It's short but is there any way I can make it in one trigger? I want my triggers to be as few as possible
 
Status
Not open for further replies.
Top