• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Points over objectives

Status
Not open for further replies.
Level 6
Joined
Oct 23, 2006
Messages
141
ok, im good with ideas but rubbish with scripting.
My new map will include a capturable obelisk that gives the player in control of it points over time. but is capturable by being in the vacinity of it over 5 seconds.

Can anyone tell me how to do this? if you need more details just ask, i dont know how much info u need at this point, thx
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
  • Events
    • Time - Every 1 second of the game time
  • Conditions
    • REGION contains position of UNIT equal to True
  • Actions
    • Set Timer[(Player number of (Owner of (UNIT)))] = Timer[(Player number of (Owner of (Triggering unit)))] + 1
    • If (All conditions are true), then do (Then Actions), else do (Else Actions)
      • If - Conditions
        • Timer[(Player number of (Owner of (UNIT)))] equal to 5
      • Then - Actions
        • YOUR ACTIONS
        • Set Timer[(Player number of (Owner of (UNIT)))] = 0
      • Else - Actions
  • Events
    • Unit - A unit leaves REGION
  • Conditions
    • REGION contains position of UNIT equal to False
  • Actions
    • Set Timer[(Player number of (Owner of (UNIT)))] = 0
This works for maps with 1 unit per player. If you got multiple units per player, you can use this as a base and make it work for whatever kind of units you want.
 
Status
Not open for further replies.
Top