$ TEXAS $ Request -1 reply

Please wait...

iDeekz

Sniper Regiment

50 XP

15th February 2008

0 Uploads

1,052 Posts

0 Threads

#1 10 years ago

Hey Texas. You haven't been on MSN lately so i thought i'd request it here. The scar script me and you made, well i really need it since i've now got company of heroes back. If you have got it please meet me on msn or upload it for me thanks. Regards, Icespeed.




$_TEXAS_$

Don't Mess with Texas

50 XP

5th September 2007

0 Uploads

195 Posts

0 Threads

#2 10 years ago

Here is the code so any one can use it: import("ScarUtil.scar") function OnGameSetup() player1 = World_GetPlayerAt(1) player2 = World_GetPlayerAt(2) end function OnInit() LOCSTRINGS = { TITLE = "TEST", } for key, value in pairs(LOCSTRINGS) do LOCSTRINGS[key] = Util_CreateLocString(value) end timer = 1 Rule_AddInterval(reinf, 5) Rule_AddInterval(timer1, 1) end Scar_AddInit(OnInit)

function timer1() timer = timer + 1 if timer == 5 then Util_GlobalMessage(LOCSTRINGS.TITLE, 3) end end

function reinf() if timer >= 30 then targetpos = Util_GetPosition(mkr_2) local sg_reinf = SGroup_CreateIfNotFound("sg_reinf") SGroup_Clear(sg_reinf) target = mkr_1 Util_CreateSquads(player1, sg_reinf, SBP.ALLIES.RIFLEMEN, target, nil, 1) Cmd_Move(sg_reinf, Util_GetPosition(targetpos), 15) end end

function Util_CreateLocString(text) local tmpstr = LOC(text) tmpstr[1] = text return tmpstr end function Util_GlobalMessage(title, displaytime) local _ShowMsg = function() CTRL.Game_TextTitleFade(title, 0, displaytime, 2, "") CTRL.WAIT() end Util_StartIntel(_ShowMsg) end its a simple call for reinforcements, and has a title display.




jet_black

I don't spend enough time here

50 XP

26th October 2007

0 Uploads

19 Posts

0 Threads

#3 10 years ago

sooo... uhh.... what does this do exactly? lol




Sgt. D. Pilla

Uber Geek

50 XP

23rd October 2007

0 Uploads

3,473 Posts

0 Threads

#4 10 years ago

Out of a guess, considering it has a timer, and a squad that is being called to be created (Spawned) I'd say it provides reinforcements when a timer expires, and by the looks of things, at a certain position




$_TEXAS_$

Don't Mess with Texas

50 XP

5th September 2007

0 Uploads

195 Posts

0 Threads

#5 10 years ago

I was in a hurry when I posted it so: 1) is has a title display to apear at 5 seconds (change "TEST" to the title) 2) a reinforcment of riflemen every 5 seconds (timer needed to be increased, this is just a test code) 3) a time delay, before any reinforcemnts, of about 30 seconds (also could be increased) you can expand this to have more reinf, or change timers. This is just a very simplie bit of scar code.




iDeekz

Sniper Regiment

50 XP

15th February 2008

0 Uploads

1,052 Posts

0 Threads

#6 10 years ago

Cheers =]