• 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.

Warcraft 1

Status
Not open for further replies.
(I don't know if this is the appropriate section to post it)
guys, I just made a Warrcaft 1-like map Linkie
And I just played the game Warcraft 1 (DOSBOX!! :3)
Well I saw that whenever a Peasant\Peon returns their Lumber or Gold that harvested, the peasant\peon will enter the town hall for about 3-4 seconds then your current lumber\gold will increase then the Peasant\Peon will get out.

How to do this?
Also I want it improvised (I want to have some +Lumber and +gold when they get out.
(if it needs code, post it plox)


thanks for cooperation!
full credits would be given
~supertoinkz
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
JASS:
private struct time 
    unit u
endstruct

private function timerreturn takes nothing returns nothing
    local time ti = time(GetTimerData(GetExpiredTimer()))
    call ReleaseTimer(GetExpiredTimer())
    call PauseUnit(ti.unit, false)
    set ti.unit = null
endfunction

private function timer takes nothing returns nothing
    local timer t = NewTimer()
    local time ti = time.create()
    call SetTimerData(ti, integer(ti))
    set ti.unit = GetTriggerUnit()
    call PauseUnit(ti.unit, true)
    call TimerStart(ti, GetRandomReal(3.00, 4.00), false, function timerreturn)
endfunction

You'd need TimerUtils for that - it pauses the triggering Unit for 3 to 4 seconds and makes it reappear ;)
Should work, not tested thou due to my lack of wc3..
 
Status
Not open for further replies.
Top