LUA scrpting

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
Streich3r
Recruit Womprat Killer
Posts: 6
Joined: Sun Jul 15, 2012 12:36 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

LUA scrpting

Post by Streich3r »

hey gemetoastteam :D


i wanted scripting a pointregion with a timer.

ok,i think no problem and done it..



OnEnterRegion(
function(region,player)
CreateTimer("PT")
SetTimerValue("PT",15)
ShowTimer("PT")
StartTimer("PT")
OnTimerElapse(
function( timer )
AddAssaultDestroyPoints(character)
SetTimerValue( "PT", 15 )
ShowTimer( "PT" )
StartTimer( "PT" )

end, "PT"
)
end,
"Hill"
)





OK works.. But not so, as I thought..


my idea how it should work
If a player enters this region, a timer should start and count until zero. And get a point to these player, which are staying there.
And player who's left the region shouldn't get a point.
And my Scrptingpart works such that if a player enters region and the timer is on 0, then all players get a point and if a player get out of the region and after that he enters it again.
All players will then get as many points as many times the one player enters the region.... it doesn't reset.
Post Reply