-
Content Count
228 -
Joined
-
Last visited
-
Medals
Posts posted by Monsada
-
-
I'm not into all the scripting stuff, and I've searched everywhere, and tried everything now. :mad:Everything but the addaction issues is sorted out. (bombs, triggers and so on)
.My team needs to disarm a bomb.
.The actions must work for everyone, online.
.There will be 5 actions, one that does nothing and works as a headline, and 4 choices. 1 of the 4 choises will be correct. The other three is wrong.
The team can only choose one of 4 choises, and when chosen the 5 actions must disapear.
My scripting skills only leads me to making a object, calling it "trigger" and adding this to its init:
trigger addaction ["Question", "nothing.sqf"]; trigger addAction ["option1", "true.sqf"]; trigger addAction ["option2", "false.sqf"]; trigger addAction ["option3", "false.sqf"]; trigger addAction ["option4", "false.sqf"];
The true.sqf is just a defuse = true; and false.sqf the opposite.
I've tried with player removeAction trigger; without any luck.
Also, I know there is some issues with addaction, and not working online on dedicated servers.?
Hopefully, someone will answer my prayers. Thanks in advance! :)
Hi DampetDK,
is easy:
In the init of the object you want de actions put next code:
this addaction ["Question", "nothing.sqf"]; this addAction ["option1", "response.sqf",[true]]; this addAction ["option2", "response.sqf",[false]]; this addAction ["option3", "response.sqf",[false]]; this addAction ["option4", response.sqf",[false]];
now came on with response.sqf a
//response.sqf private ["_obj","_caller","_id","_response"]; _obj = _this select 0; _caller = _this select 1; _id = _this select 2; //Parameters _response = (_this select 3) select 0; // remove the action once it is activated _obj removeAction _id; //Now set defuse defuse = _response; /*public variable to all clients. this is very important if you want that all clients knows about the action being done. if not doing only player who does de action will be informed about result.*/ publicvariable "defuse"; hintsilent format ["defuse=%1",defuse];
-
you must use call and gestuff must return a variable for cheking continue or not:
the best in converting genstuff in a function like this
// TestExecute.sqf; //Inside TestExecute.sqf creates a genstuff function genstuff = { private["_exit"]; _exit=true; //put code of genstuff.sqf here //Now evaluate if must continue or not _exit = true; //Returns _continue must be the last command _exit; }; //main of TestExecute.sqf private["my_condition_to_exit_var"]; my_condition_to_exit_var = false; my_condition_to_exit_var = call genstuff; if (my_condition_to_exit_var) exitwith{};if what you want is to kill genstuf process u need to do something diferent:
// TestExecute.sqf; //Only need if used with spawn genstuff = preprocessFileLineNumbers "genstuff.sqf"; //main of TestExecute.sqf private["my_condition_to_exit_var, _handle"]; //Initialice _handle to null _handle = 0 spawn {}; my_condition_to_exit_var = false; _handle = execvm "genstuff.sqf"; // or with spawn //_handle = spawn genstuff; //code of your program my_condition_to_exit_var = true; if (my_condition_to_exit_var && !scriptDone _handle) then{ Terminate _handle; }; -
I like xeno's solution
-
You answered me, I have sent a mail to sickboy to explain me if is posible to get a space for UPSMON project.
Thanks for the info mr.g-c
-
Hi mr.g-c
I uknown about dev-heaven.net, who can explain me how to make a project there? sickboy?
what means developing in dev-heaven?
-
Yes they are the same, the only difference is that the second one will save the script into the variable UPSMON, and unless you intend to ever use that variable again there is no point storing it there. In general storing a script in a variable once and then just spawning that code instead of reading the script file helps performance, but to do that you would have to make sure the variable is defined before you use it which causes all new kinds of (usually unnecessary) complications, and in addition if there is an error you will not know what line in the .sqf file caused it because from the engine's perspective it is a compiled script variable and not an actual file.better explain is imposible
---------- Post added at 05:38 PM ---------- Previous post was at 05:37 PM ----------
ok - thanks again my friend. When do you think the new version of UPSMON is ready?soon my friend, I espect will be released soon. ;)
-
Hi Madmike,
nul=[this,"town", "move","reinforcement", "delete:",600] execVM "scripts\upsmon.sqf
and
UPSMON = compile preprocessFile "scripts\UPSMON.sqf"; nul=[this,"town", "move","reinforcement", "delete:",600] spawn Upsmon;
Are exactly the same.
Last one was a test I did for check calling upsmon in a new thread as spawn does, but in the experiment I did not notice any diference, so u can exec UPSMON as always does :o
-
thanks Ramadi,
Now I'm working in a system for surrender AI, all squads in UPSMON forms an army, so when debilited so much they will surrender, throwing weapons and raising arms. For knowing when AI has been surrended there will be these variables
KRON_UPS_EAST_SURRENDED
KRON_UPS_WEST_SURRENDED
KRON_UPS_GUER_SURRENDED
these will be informed to true when army of that side has been surrended and you will chek it for ending your mission.
in this new version I will add variable KRON_UPS_searchVehicledist = 800 for avoiding that problem in big areas.
-
Monsada, I am new at using your script and am having a hard time with Spanish. I am using your script for my mission. I placed a empty Hind D just as part of a Russian Camp. My problem is, when we come into the area, the helicopter is flying and dudes start jumping out like it is Red Dawn. I used Random for the patroling Russians and fortify for the Camp Guards. How do I turn off the helicopters and the paratroopers?Hi Ramadi,
Sorry, but I don't understand very well your question, you want paratroopers not to get out of hely? or not to get in hely?
AI will use vehicles if they are far from next objective, which squad are get in the Hely? I supose that does the patroling squad, maybe the patrol area is so big, if distance to move is more than 600 m they will search for a vehicle.
you may lock the hely in the editor or reduce the dimensions of mark, aswell u can increase KRON_UPS_safedist or KRON_UPS_CLOUSENOUGH or both in init_upsmon.sqf, the sum of these (600) is the distance considered close, if distance to objective is greater than that then AI looks for vehicles.
maybe I would have to add a global variable for controling that.
KRON_UPS_searchVehicledist = 800.
So u can put here the parameter that fits your mission.
-
Minimalaco would like to know if was posible to make "NOMOVE"squads to aproach buildings that haven't positions inside.
I answered him that is not posible, I need positions in buildings to aproach and not aply either because AI does that automatically when enemy is known.
-
hola monsada, me lleve una grata sorpresa hace poco, hice una mision en razani, y puse varias casas con el editor, la sorpresa fue que al ponerle el parametro "fortify", la patrulla cogio los puestos dentro de ellas :D , con el UPS normal eso no pasaba, no funcionaba con las casas puestas del editor.y aca te hago una sugerencia. es posible hacer algo que haga que la AI al darle el parametro "nomove" sin el "fortify" verifique si dentro de su rango hay algun objeto con el cual curbrirse y asi evitar que queden parados y estaticos en medio de la nada ? ... tomalo como casas que no son habitables (que se ubiquen pegados a ellas) , vehiculos, torres, paredes, etc.... muy dificil ? la idea seria simplemente agregarlo al "nomove" dentro de un rango obviamente que verifiquen eso :D
saludos wn :D
Hola Mini, eso lo hace automáticamente la IA normal cuando detecta al enemigo, respecto lo de que se ubiquen pegados a las casas q no son habitables,no puedo indicarles que se aproximen ya que no tienen posiciones.
-
Hi bardosy, this seems you are not executing init_upsmon in init.sqf as I explain in main post.
try to put this in init.sqf and only in init.sqf
//Init UPSMON scritp
call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";
if it not solves the problem send me your mision by email to check it. chs.monsada@gmail.com
-
this is exactly as does in UPS, in runtime, when mission begins, creates a number of clones that you defined in the group in witch you put this parameter in.
-
Sorry if this was asked before, but after scanning through posts I could not find how to stop the messeges from AI groups along with the markers from being visible?in init_upsmon.sqf there is a variable KRON_UPS_Debug
//Enable messages and position marks.
KRON_UPS_Debug = 1;
//Disable messages and position marks
KRON_UPS_Debug = 0;
-
Hola Monsada!1., If I turn OFF the debug, they also share info, is they? Just don't write on the screen. Am I right?
.
Yes, functionality is the same, the only that does is not loging messages and not puting marks of squads positions.
Hola Monsada!At the weekend I tested hardly a mission with your script and I got error messages (in my ArmA errors show on the screen) several times (at least two times). But I forgot to bring it to the office. As far as I know, ArmA log somewhere the errors, so I'll find it and post here tomorrow.
The only error I have seen in arma log is:
Error O 1-1-F:4: Invalid path - length 1
this Is produced sometimes when patroling some buildings, I think is a problem with the definition of the positions of that builiding object.
-
Hi,how can i turn off the text messages that tell me what the AI does ?
And how can you turn of the patrol zones at the beginning (briefing) too ?
And how to turn of the use of smokegrenades ?
For disabling messages only turn it of:
KRON_UPS_Debug = 0;
smoke grenades canot be turned of
---------- Post added at 10:22 PM ---------- Previous post was at 10:15 PM ----------
Hey, I tested this script yesterday. I don't used all of features. The only I need is a better AI:1., groups communicate
2., flanking manouver
3., use static weapons
4., use smoke grenades
2, and 3, worked fine, but I'm not sure in 1. and absolutley nothing in 4.,
Any suggestion, how can I set in the init (or anywhere else) the groups use smoke grenade and share the info?
Anyway: muchas gracias! Los commentos (en el script) estan en espanol y muy dificil entender... :)
Hi Bardosi,
1. AI comunicates presence of enemy. If you have enabled debug
KRON_UPS_Debug = 1;
the leader group will put message "enemy detected" if in a range of 1.5km of enemy.
4. grenades only throws in random situations when supresed by fire.
Please, don't beg for translation to english.
-
I think you need to use the "NOSLOW" parameter if you want them to run even if no enemies are detected."NOSLOW" parameter only determines initial behaviour and speed.
if SLOW, or not defined then puts on initialiation of squad Limited speed and behaviour safe. Not used anymore.
-
How do to escape?I want to use the script in the attack but the AI in the mode of walking.
I don't understand you, can you explain a litle more please?
-
fortify is in the same level of "move" and "nome", this means that u can put:
"move" or "nomove" or "fortify".
they are exclusive, if u put fortify the rol is more extreme than "nomove"
"move" :squad moves constantly, if no enemy they patrol inside the "mark", if known enemy they flank and engage.
"nomove": squad moves little, if no enemy the stay at starting position, if known enemy the will tend to mantain but probability of engage increases when enemy aproaches
"fortify": squad do not move, it has a little probability to move and engage enemy of 1%, they will take defence positions in buildings near.
thinking about may be would be better to adjust the rates of "nomove" to:
more than 1500m 1% of moving (not senses because of limitation of KRON_ups_sharedist to 1500m).
less than 1500m -5% of moving
less than 600 m - 25% of moving
less than 300 m - 50% of moving
-
@MonsadaIs it possible to implement something that the units MUST stay in their area. I always used the "nofollow" order - but mostly when we are near their area the ai leaves the sector searching for us and attacking us. I tried "group this enableattack false", but then they dont flank anymore.
Maybe you got an idea?
Yes, if u want a squad do not move then try "fortify" instead of "nomove" they will do what u want ;)
"nomove" is a rol that usually makes AI not to move but it does in some cases when enemy is near:
less than 1500m -10% of moving
less than 600 m - 40% of moving
less than 300 m - 70% of moving
"Fortify"
always 1% of moving less when reinforcement called and squad has "reinforcement" too, Then he looses the state of fortify.
-
Do you plan to use the fixes made by the latest version of UPS?in UPSMON this fixes not aply because I changed all and that bug I corrected long time ago.
-
I really liked! Always use in my mission! Thank you!But how to change the zone patrols?
Patrol zone "town1" and how to patrol the new zone "town2"?
Hi Pioneer I like u like it, it means my work is well done.
About patrols canot be changed, sorry, but u could define diferent patrol squads but each one in his zone.
-
New version released: 5.0.2
Changes in version:
//Version: 5.0.2
// Added
// KRON_UPS_useStatics, enables AI to use Static weapons.
// KRON_UPS_useMines, enables AI to put mines when enemy armored vehicles near
// Now vehicles can be used for patrol, not only with target.
// Modified:
// Fixed Bug that do not sent reinforcement if parameter "reinforcement"
// Fixed bug with random 1 ocasiolly has been returned more than 1.
// Fixed bug that eventually do not change dead leader
//Download
From CHS: http://www.simulacion-esp.com/v3/index.php?app=core&module=attach§ion=attach&attach_id=1448
Megaupload: UPSMON.RAR
Video:
-

UPSMON - Urban Patrol Script Mon
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted
Hi oldy41,
I don't know about GL4 but I can tell u about UPSMON.
UPSMON only uses waypoints for moving squads and direct orders to soldiers from leader to make using of enviroment.
Things you must know:
-any waypoints put in UPSMON squads will be updated by UPSMON script.
so if any script adds waypoints on squad leader they will get in troubles with UPSMON.
litle example, "fortify" squads uses "hold" waypoints, if another script creates a waypoint of move squad, may be change actual waypoint of guard.