|
Post by generalthegreat on Sept 29, 2009 19:42:54 GMT 1
i will really thank you for this you helped me and it works for 50%..... thanks for the advance now i got a question.. the objectives dont dissapear..
|
|
|
Post by generalthegreat on Sept 29, 2009 19:58:36 GMT 1
never mind i fixed it
great map for a test map..
the real border offensive is in progress and demo mod would be released in 5 days minimal
|
|
Desert
Vojna Policija - Military Police
Posts: 1,230
|
Post by Desert on Sept 29, 2009 20:19:34 GMT 1
If you have any further problems, it would be best that you send it to me to see what's going on with the map.
Do you have something like this in lua.?
function StartObjective1() ObjectiveChanged(1,0); RunScript("CheckObjective1", 25000); Suicide(); end;
function CheckObjective1() if GetNUnitsInScriptGroup(301) == 0 then ObjectiveChanged(1, 1); Suicide(); end; end;
|
|
kaoz
General
inter faesces et urinam nascimur
Posts: 1,124
|
Post by kaoz on Sept 29, 2009 23:07:35 GMT 1
its in my editor i think it always connects to the wrong maps and other stuff that's what i was saying: select the correct path to your map in the Editor!
|
|
Xmen
Pukovnik
Posts: 373
|
Post by Xmen on Oct 4, 2009 1:43:22 GMT 1
Hi BK Brothers ;D , i want to know how make a LandReinforcement( 2000); with random time? I see that in an other Script but RunScript( "Patrol1I", RandomInt(5000) + 3000 ); Does anyone can explane me that??? Does LandReinforcement(2000, RandomInt(60000) ); make timing variation of this reinforcement??? I know that' s lot of thing for today but .....maybe it can be usefull ;D
|
|
|
Post by jeffcanada on Oct 4, 2009 3:29:49 GMT 1
Itry to open one of my script but sCiTe editor don't want to cooperate with Vista. Damn I hate it.....
|
|
|
Post by Major Pain on Oct 4, 2009 6:21:21 GMT 1
Try this... and modify as needed.
function Init()
RunScript("GBEGIN", 8000); -- START MISSION
end;
----------------------------------------------------------------------------- -- Begin Here -- ----------------------------------------------------------------------------- function GBEGIN() -- RUN ONE TIME TO START ---- This is the Random Timer for reinforcements
RunScript("NewGUYS", (RandomInt(600)+600)*1000); -- CALL NewGUYS Function at conclusion of timer
Suicide(); end;
----------------------------------------------------------------------------- -- New Guys -- ----------------------------------------------------------------------------- function NewGUYS()
LandReinforcement(2000); -- here they come! Suicide(); end;
-----------------------------------------------------------------------------
Notes: The Timer and LandReinforcement cannot reside in the same function. You must use one function for a timer and trigger to call a 2nd function to actually trigger the units.
If you want to recall the same set of triggers, simply place the name of the first function into another function somewhere else in the script.
The Init() will most likely already be in the script. Just add --> RunScript("GBEGIN", 8000); -- You can name the function whatever name you want, but it cannot contain keywords or command names.
Look at the Random function: (RandomInt(600)+600)*1000): This timer is set to call the units between 10 and 20 minutes.
600 * 1000 = 60000 = 10 minutes
RandomInt(600) = number between 0 and 599. Add 600 to it, then multiply total by 1000.
So if you add the random number to the base 10 minutes you will never know exactly when those guys will show up.
|
|
Xmen
Pukovnik
Posts: 373
|
Post by Xmen on Oct 4, 2009 11:06:44 GMT 1
Thank you Major ,that's just all i want to know......
|
|
|
Post by danzig70 on Jan 12, 2010 22:44:36 GMT 1
I am having problems with maps I create that use the TC4 mod. I have placed the map and script in both blitz run/data/maps folder and the TC4 run/data/maps folder.
When running the game with the map from the editor, the script is not read/used.
I have the script path set in the editor to the TC4 maps folder. It did not work either when it was pointing to the blitz run/data/maps folder.
Any suggestions?
thank you
|
|
|
Post by LouisXIV on Jan 13, 2010 16:10:11 GMT 1
Danzig, I think you've been around long enough that you should know this, but, just in case....
Did you use the Map Editor to set the map to recognize the script? With the map loaded into the MapEd, click "map" and "script," and find your script and click OK.
If yoiu've done that and you're still having a problem, obviously you're running Vista.
|
|
|
Post by danzig70 on Jan 13, 2010 19:21:49 GMT 1
Danzig, I think you've been around long enough that you should know this, but, just in case....
Did you use the Map Editor to set the map to recognize the script? With the map loaded into the MapEd, click "map" and "script," and find your script and click OK.
If yoiu've done that and you're still having a problem, obviously you're running Vista. Hello Louis, good to see you. I removed all functions except towin and tobedefeated and it worked. I added function to display trace and it worked also. I must have had a bad function somewhere. I am starting from scratch and retesting tonite. Also, I hate to ask, but what is the most current version of map editor. Mine is 1.3. thanks for your help
|
|
|
Post by danzig70 on Jan 15, 2010 18:52:57 GMT 1
The script is working well now. I had a script ID issue with one set of reinforcements and did not allow enough time for some units to change side in another function. I used a time function to trigger another set of reinforcements.
All is well now. Hurray!
|
|
runrum
Zastavnik 1. klase
Posts: 85
|
Post by runrum on May 5, 2010 18:32:14 GMT 1
Does anyone know anything about Corps-Artillery(Artillery barrage from outside the map)?
Used couple of times in MK. e.g. MK tutorial map.
around lines 180-220
Guess essential is "ReserveAviationForTimes". What kind of command is that and what does it effect? Is this a meta function?
|
|
runrum
Zastavnik 1. klase
Posts: 85
|
Post by runrum on May 17, 2010 22:06:23 GMT 1
"RandomInt" related question:
this is from kursk_startmap ~ line 680
for "RandomInt-commands" zero as a returned value should be avoided.
why was it ("+0)" used in this case?
I so totally don't get this:
just with (5) it would return the values 0,1, 2, 3, 4 and with ((5)+0) it returns the values 0,1, 2 ,3 ,4
or am I wrong?
well, what's the reason for using (+0) here?
Btw:
What happened to hitandrun (aka arditi)?
He knew a lot about scripting. Checked members list but he isn't present. Signed he in under a different name?
|
|
Ocelo
General
Map Artist/Eastern Front enthusiast
Posts: 1,400
|
Post by Ocelo on May 17, 2010 22:16:39 GMT 1
600 * 1000 = 60000 = 10 minutes [/color][/quote] Don't know if it matters, but I believe you left off a 0 in the final value (posted value =1 minute). As for my own 'question', what is making the script in this mission not work? www.mediafire.com/?zmym3moroyqThe script is quite simple and straightforward, but some part of it causes it to not run. I'm really stuck here, any clues would be much appreciated.
|
|