Victory Timer

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Victory Timer

Post by Noobasaurus »

Alright, I've read a tutorial about timers, it didn't work, so I want to make a timer that lasts 15 minutes and when it ends you get victory. It's probably really simple but not for me. :(
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: Victory Timer

Post by Tears2Roses »

Under the instant action menu, there is a conquest then a timer button that you can set for 15 minutes. But if you always wanted a timer that lasts 15 minutes in your map that would be different. I could try the tutorials myself for a timer when I get around to it.
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Re: Victory Timer

Post by Noobasaurus »

Tears2Roses wrote:But if you always wanted a timer that lasts 15 minutes in your map that would be different.
That's what I want.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Victory Timer

Post by DarthD.U.C.K. »

try this(i havent tested it, maybe a bracket is missing)

Code: Select all

	 --Setup Timer-- 
    victory = CreateTimer("victory")
	SetTimerValue(victory, 900.0)

	-- ON FIRST SPAWN --
	onfirstspawn = OnCharacterSpawn(
        function(character)
            ReleaseCharacterSpawn(onfirstspawn)
            onfirstspawn = nil
            StartTimer(victory)
            OnTimerElapse(
				function(timer)
					MissionVictory(DEF)
					DestroyTimer(timer)
        		end,
			victory
        	)
        end
	)
its mostly from the mygeeto campaign. if you try to script something and dont know how to do it, you can always take a look at campaignscripts where something similiar happens.
and by the way: all tutorial work, if they dont, youve done something wrong.
Post Reply