jacksonloyal
Vojnik
It is our historical Duty to fight back!
Posts: 3
|
Post by jacksonloyal on Dec 23, 2017 13:48:41 GMT 1
Hey Guys,
im new here and i created a map but i dont know nothing about Lua Scripting. I just want to know how can i bring reinforcements every 10 minuets into the game!?
Maybe someone of you can help me with a ready wroten script and an advice how to use it.
Thanks a lot.
Many greetings from Germany
|
|
|
Post by Quintaxel on Dec 23, 2017 14:37:50 GMT 1
Welcome jacksonloyal I assume you know how to put reinforcements on the map. function Reinforce100 ()
LandReinforcement (100);
end;
function Init()
DisplayTrace ("Init is Running");
RunScript ("Reinforce100", 600000);-- 600000 miliseconds = 10 minutes
end;
I suggest you test the function first with smaller intervals (replace 600000 by 6000). Maybe check out this thread if you want to understand the basics of Lua
|
|
jacksonloyal
Vojnik
It is our historical Duty to fight back!
Posts: 3
|
Post by jacksonloyal on Dec 23, 2017 16:13:17 GMT 1
Hi Quintaxel, thank you for the fast answer. But no i dont know how to put reinforcements on the map. I tried now for a half our but it doesnt work. In which file i have to put the script. What name should have the script!? Do i have to write something else in the script you gave me? You see iam desperate...
|
|
|
Post by Quintaxel on Dec 23, 2017 16:31:38 GMT 1
Okay, now need to be desperate. Let's go through this step by step.
1) put a unit on the map. 2) Double click on the unit to see the unit properties 3) Double click on Sript ID. The value should be -1, change it to 100 4) Click Left mouse button somewhere on the map to close the unit properties window.
Now for the Reïnforcements, see next post
|
|
jacksonloyal
Vojnik
It is our historical Duty to fight back!
Posts: 3
|
Post by jacksonloyal on Dec 23, 2017 16:38:58 GMT 1
YYYYYEEEEEAAAAAHHHHH it worked.
THANK YOU SO MUCH
NOw i can create really nice maps
|
|
|
Post by Quintaxel on Dec 23, 2017 16:47:09 GMT 1
5) On the 'workspace bar' usually on the left of your screen select 'Reinforcement Groups' 6) Select 'New Group', You'll get a pop-up window. 7) Enter a number to identify the reinforcement group. It can be any number but let's use 100. You will see 'Group N:100' now under 'Groups' in the 'workspace bar'
You have now created a reinforcement group with ScriptID = 100. Now let's add units to that Group.
8) Select 'Group N:100' by L-clicking on it. 9) Now Add click on 'Group with ScriptID' at the bottom of the'workspace bar'. You will get a pop-up window. 10) Enter 100 to add the Unit with ScripID 100 to the Reinforcement Group with ScripID 100.
That's it. You can add more units to the reinforcement Group 100 if you want, using the same method as described above. You will notics that the unit and the Reinforcement Group have the same ScriptID 100 but that is not necessary.
Try to put 6 units on the map now. ScriptID 100,110,120, 200, 210 and 230 Then create 2 Reinforcement Groups 1000 and 2000 Add Units 100, 200, 210 and 230 to Reinforcement Group 1000 Add Units 110,120 and 230 to Reinforcement Group 2000
Then change the script so that Reinforcement Group 1000 appears after 10 seconds and Reinforcement Group 2000 after 15 seconds.
|
|