• 🏆 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!

research trigger

Status
Not open for further replies.
Hello, so here is my trigger request:
First thing you need to know, I want that somes units and somes buildings must not be availables, players must not be able to see it. So please, tell me how to do that ;)

Here is my main request:
I need a research trigger that work in this way: First, a 2minutes timer must be shown. it will cooldown, and when it reach 0:00. then, a research will be unlocked. But the player must not be able to choose what, but he will know what will be unlocked. Another thing: the timer will cooldown by 1 second per second. But the player can buy a kind of unit that increase the cooldown speed: the scientist, a very expensive unit.
When the player owns 1 scientist: the cooldown will be 2 seconds per second.
If the player owns 3 scientist: the cooldown will be 4 seconds per second.
If you don't understand, please post here.
Ah and: the research that will be unlocked must be randomized in a group. Example:
there is unit 1-2-3-4-5-6-7-8-9-10
Units 1-2-3-4 are in groups 1
Units 5-6-7 are in groups 2
Units 8-9 are in groups 3
Units 10 is in groups 4
All units in groups 1 must be unlocked to begin the research of groups 2, and all units in groups 2 must be unlocked to begin the research of groups 3, etc...

Please help ;)
 
Level 9
Joined
Aug 7, 2009
Messages
380
First of all, a "unseeable" unit. You can set them like the following:
Abilities - Normal Locust : This will allow this unit "unselectable"
Art - Ground Texture None : This will disapear the bricks below this unit if it is a structure
Art - Model File .mdl : .mdl is an error path of model, so, there will be no model for that unit, players can't even see it (it just a blank on the map, a green black box in world editor)
Stats - Sight Radius (Day)/(Night): 0 : This will allow this unit to see nothing, cause map markers/players will know something there if this unit have sight :ogre_haosis::ogre_hurrhurr:

That's all you need to make a unsee/selectable object. About the research one, i'll have to "research" about it :ogre_haosis:
_____________________________________________________________________________________________________________________________________________
 
Level 15
Joined
Jul 9, 2008
Messages
1,552
um here this should work for the cool down i dont understand what you want for the reasearch stuff tho

  • timer
    • Events
      • use an event for when you want it to start
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set cooldown_time2[(Integer A)] = 120.00
          • Countdown Timer - Start cooldown_time[(Integer A)] as a One-shot timer that will expire in cooldown_time2[(Integer A)] seconds
          • Countdown Timer - Create a timer window for (Last started timer) with title cooldown?
          • Countdown Timer - Show (Last created timer window) for (Player((Integer A)))
          • Countdown Timer - Pause (Last started timer)
      • Trigger - Turn on cooldown <gen>
  • cooldown
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set Temp_integer[(Integer A)] = 1
          • Set Temp_Group[(Integer A)] = (Units in (Playable map area) owned by (Player((Integer A))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in Temp_Group[(Integer A)]) Equal to 1
            • Then - Actions
              • Set Temp_integer[(Integer A)] = 2
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in Temp_Group[(Integer A)]) Equal to 3
                • Then - Actions
                  • Set Temp_integer[(Integer A)] = 4
                • Else - Actions
          • Set cooldown_time2[(Integer A)] = (cooldown_time2[(Integer A)] - (Real(Temp_integer)))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Integer(cooldown_time2[(Integer A)])) Less than or equal to 0
            • Then - Actions
            • Else - Actions
              • Countdown Timer - Start cooldown_time[(Integer A)] as a One-shot timer that will expire in cooldown_time2[(Integer A)] seconds
              • Countdown Timer - Pause (Last started timer)
 
Level 9
Joined
Aug 7, 2009
Messages
380
About the cooldown research, do it like above ^^!. But, about the unit group:
Set each unit you want as a group to: Techtree - Requirements: [an upgrade]. So, when you "unlocked" a group, you oder a "unseeable" unit that have this research to research that upgrade. So, that group will be available. Hopefully it helps
 
Status
Not open for further replies.
Top