Jump to content
Sign in to follow this  
Monsada

UPSMON - Urban Patrol Script Mon

Recommended Posts

thanks for checking, seba. i was curious because of the following text from the devheaven page, detailing the "respawn" parameter: "First will respawn indefinitely until side surrender or enemies too close of respawn position, respawn position is initial position."

Share this post


Link to post
Share on other sites

@HFTB & SavageCDN: Sorry guys, I guess too much time has passed since the last time I've used this mod. After trying to find the number for SavageCDN, I realized there's not such thing in UPSMON. My memories about that feature were from DAC.

UPSMON does not take any consideration when spawning units, so there's no check for any enemy force near the respawn point. Obviously, I may be mistaken again :), but after a quick look at the code I believe this is the right answer.

Ok thanks for checking!!

Share this post


Link to post
Share on other sites
thanks for checking, seba. i was curious because of the following text from the devheaven page, detailing the "respawn" parameter: "First will respawn indefinitely until side surrender or enemies too close of respawn position, respawn position is initial position."

Well guess what? :) Took another look at the code and finally found the bugger. The feature exists, the condition for not respawning is that the distance between the initial position and any known enemy, does not have to be less than the closeenough parameter (that's documented for other purposes). And if the condition is true, meaning there are known enemies too near the intended respawn point, the group is deleted for good.

Share this post


Link to post
Share on other sites

if i have a squad with a few members who have varied probability of presence (so they have a chance of spawning rather than always spawning) and i save them as a template and then reference that template when spawning another squad via trigger, is the template going to be the full squad with their probabilities set as they were in the editor, or will the saved template consist only of the units that actually spawned? hope that makes sense...

Share this post


Link to post
Share on other sites

Hi. I've been over the wiki and I can't make sense of the respawn syntax.

Can you please tell me what is wrong with my syntax. I am wanting the template of the squad to spawn at town2 (marker), and then move to town1 (marker).

Squad Init:

nul=[this,"town1","move","delete:",600,"reinforcement:",1,"template:",2,"respawn"] execvm "scripts\UPSMON.sqf";

Trigger Init:

nul = [2,[getMarkerPos "town2"],1,["town1","respawn","reinforcement:",1]] EXECVM "SCRIPTS\UPSMON\MON_SPAWN.SQF";

I'm also not clear on where I'm supposed to call

KRON_UPS_reinforcementx==true

This code (KRON_UPS_reinforcementx==true) isn't in the sample code or the UPSMON5_6 mission sample at all, but it says it's required for the trigger in the wiki. The default sample uses Alpha and Bravo triggers to place the respawns on the player. I am again, wanting the respawns to occur at a markers and then move to another marker.

The debug states the reinforcements have spawned but nothing appears. I read an earlier thread with a similar issue, but the fix there didn't help at all.

Thanks very much for any direction. :cool:

Share this post


Link to post
Share on other sites

To call a Template you need something like this

nul = [2,[getMarkerPos "town2"],1,["town1","respawn:",2]] execVM "SCRIPTS\UPSMON\MON_SPAWN.SQF";

2 is the template Number and 1 is the amount of templates to create - this will spawn 1x template 2  and Respawn 2 times once group is dead.

Share this post


Link to post
Share on other sites

Thanks for the clarification.

To call a Template you need something like this

nul = [2,[getMarkerPos "town2"],1,["town1","respawn:",2]] execVM "SCRIPTS\UPSMON\MON_SPAWN.SQF";

2 is the template Number and 1 is the amount of templates to create - this will spawn 1x template 2  and Respawn 2 times once group is dead.

I put your code into the trigger. I have the below code in the group unit.

nul=[this,"town1","move","delete:",600,"reinforcement:",1,"template:",2,"respawn"] execvm "scripts\UPSMON.sqf";

When all are dead, they spawn exactly where they were killed and not on marker "town2".

Is there a way to have them spawn at town2 and then procede to town1 marker?

Thanks.

Share this post


Link to post
Share on other sites

Hi

I am making a mission which is set in Fallujah. I have about 20 patrol zones with one OPFOR patrol each. Near the highway in the city centre I have three BLUFOR M1A1s. The patrol zone which is the closest to the tanks is at least three blocks from there. The tanks fight (not against any of the patrols) so they can be heard but are obviously not visible for any of the patrols (there are several buildings blocking their view). I have set both KRON_UPS_sharedist and KRON_UPS_comradio to 0 but I cannot figure out how on earth the patrols still detect the tanks and/or share this information with each other. As the patrols have no anti-tank weapons some time after the tanks are detected, I see the "All retreat" debug message and all the patrols seem to stop and fortify themselves (?).

Is there any way to prevent this?

Thank you for the ideas

Share this post


Link to post
Share on other sites

Start by having only 1 partrol relatively far away and see if he can hear the tank fire/battle. If yes, then this doesn't have anything to do with the patrols communicating, but rather than actually "detecting" the tanks on their own right.

Share this post


Link to post
Share on other sites

I am not exactly sure but it seems that you are right, it's the sound of the tank battle that they recognize (when the tanks do not shoot, they seem to remain unnoticed). It's a bit strange though that the patrols can precisely identify the M1A1s as no human player could do so in an urban environment especially with the random explosions in the background. Anyway, I wrote a script which simply spawns the M1A1s when and where they are needed. Problem solved.

Share this post


Link to post
Share on other sites

Hi all! I've recently joined your forum, both to ask for help and to learn and give some help if possible. Unluckily :) at the begining I certainly won't be a good advisor. To not be groundless, here's my first question...

I have a problem with initializing the UPSMON script before a mission start. It manifests itself with a visible weapon "reholding" (I mean, a player lifts a weapon twice in a second - I suspect that the UPSMON is being initialized then). It happens just two seconds after joining a game as a first player.

It is quite a bit frustrating as it makes it impossible to e.g. start a mission with a HALO jump. Why? It looks like this - I click "continue" -> a game starts -> the HALO jump is being and has been initialized -> now, I'm descending, ready to open a parachute -> the UPSMON is being initialized with that weapon "reholding", of which I wrote above -> the UPSMON has been initialized and now, I'm descending in a standard, ground position "on my feet" - cool, but i'm still falling down to the ground...

I know that the problem is in the init.sqf file, but I can't figure out how to use the commands responsible for waiting with a mission start till all scripts are initialized. Asking you for help, I paste my init.sqf below.

nul=[] execVM "briefing.sqf"; 
execVM "revive\ReviveAceWounds.sqf"; 

if ((!isServer) && (player != player)) then 
{ 

//Init UPSMON scritp (must be run on all clients) 
call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";     
//Process statements stored using setVehicleInit 
processInitCommands; 
//Finish world initialization before mission is launched.  
finishMissionInit; 

waitUntil {player == player}; 

};

Share this post


Link to post
Share on other sites

Hi radeck, have you tried the mission without UPSMON to see if the problem is related? I've never experienced anything like that at any moment. If you haven't done that test already, then I would ask you to do so as a first step.

Share this post


Link to post
Share on other sites

Hi seba. Yes, I've already tested this and I'm 100% sure that the problem occurs when the UPSMON is in use. I've noticed that the time elapsed between a mission start and that weapon "reholding", which I wrote about in my last post, is longer if I put more UPSMON patrols. These times aren't long though - let's say, it's 0s (not noticable) if there are 1-4 patrol zones, to 2s, when I put more than 12 patrol zones. But still, it wrecks most of my ideas...

Share this post


Link to post
Share on other sites
Hi all! I've recently joined your forum, both to ask for help and to learn and give some help if possible. Unluckily :) at the begining I certainly won't be a good advisor. To not be groundless, here's my first question...

I have a problem with initializing the UPSMON script before a mission start. It manifests itself with a visible weapon "reholding" (I mean, a player lifts a weapon twice in a second - I suspect that the UPSMON is being initialized then). It happens just two seconds after joining a game as a first player.

It is quite a bit frustrating as it makes it impossible to e.g. start a mission with a HALO jump. Why? It looks like this - I click "continue" -> a game starts -> the HALO jump is being and has been initialized -> now, I'm descending, ready to open a parachute -> the UPSMON is being initialized with that weapon "reholding", of which I wrote above -> the UPSMON has been initialized and now, I'm descending in a standard, ground position "on my feet" - cool, but i'm still falling down to the ground...

I know that the problem is in the init.sqf file, but I can't figure out how to use the commands responsible for waiting with a mission start till all scripts are initialized. Asking you for help, I paste my init.sqf below.

nul=[] execVM "briefing.sqf"; 
execVM "revive\ReviveAceWounds.sqf"; 

if ((!isServer) && (player != player)) then 
{ 

//Init UPSMON scritp (must be run on all clients) 
call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";     
//Process statements stored using setVehicleInit 
processInitCommands; 
//Finish world initialization before mission is launched.  
finishMissionInit; 

waitUntil {player == player}; 

};

this is straight out of the upsmon init file from demo.. i have found out the hard way myself that variations can cause unexplained issues. maybe this will help..

if ((!isServer) && (player != player)) then
{
 waitUntil {player == player};
};

//Init UPSMON scritp (must be run on all clients)
call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";	
//Process statements stored using setVehicleInit
processInitCommands;
//Finish world initialization before mission is launched. 
finishMissionInit;

Share this post


Link to post
Share on other sites

Nimrod, I've checked it out and still no result. By the way, I have tried again without UPSMON - I've deleted from the init.sqf these lines:

//Init UPSMON scritp (must be run on all clients)
call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";	
//Process statements stored using setVehicleInit
processInitCommands;
//Finish world initialization before mission is launched. 
finishMissionInit;

and the HALO jump works great then, as well as there is no "reholding" there. However, there is one thing I'm wondering about. I use this HALO jump code:

[this, 1000] exec "ca\air2\halo\data\Scripts\HALO_init.sqs"

I've noticed that at the mission start, before i was doing the HALO, i had been standing at the ground for 1-2 seconds. Is it normal?

Share this post


Link to post
Share on other sites

this is going to be a complete stab in the dark, but i was actually battling a large pause when upsmon and several other scripts were all starting at 1 time.. i know thats not the issue you are haveing but it helped my problem and might help you as well...(worth a try anyway) i put a handle on upsmon compile and actually started my other script then run upsmon after that script is started..

//Init UPSMON scritp (must be run on all clients) 
_upsmon = compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";     
//Process statements stored using setVehicleInit 
processInitCommands; 
//Finish world initialization before mission is launched.  
finishMissionInit;  

[player, 1000] exec "ca\air2\halo\data\Scripts\HALO_init.sqs";
[] spawn _upsmon; 

as far as your halo i cant say that i ever noticed it but i havnt used it in a while. and with the way arma is and all the constant changes it would not surprise me that u teleport to sky then start falling.. how about using a titlecut/blackout to hide it for a few seconds..

titlecut [" ","BLACK IN",5];

Share this post


Link to post
Share on other sites

UPSMON shouldn't be causing any of these issues. Try removing everything from your init.sqf and just have:

call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";

And see how it works out. I don't know exactly what processInitCommands and finishMissionInit do, but they aren't needed and could have something to do with your problem.

Share this post


Link to post
Share on other sites

@galzohar

You've hit the nail on the head. After deleting the lines processInitCommands; and finishMissionInit; there is no "reholding" at the mission start. Also, the HALO jump works perfectly now, even with the UPSMON. In short, problem solved. Thank you very much!

@Nimrod, @seba

Thanks for your time!

Share this post


Link to post
Share on other sites
@galzohar

You've hit the nail on the head. After deleting the lines processInitCommands; and finishMissionInit; there is no "reholding" at the mission start. Also, the HALO jump works perfectly now, even with the UPSMON. In short, problem solved. Thank you very much!

@Nimrod, @seba

Thanks for your time!

So UPSMON had nothing to do with your problem :).

Share this post


Link to post
Share on other sites

I think it did, though. I inserted all these lines to my init.sqf because they had already been in the init.sqf from the UPSMON package. So I copied them.

I've just looked up these commands on the BI Wiki and, unfortunatelly, I don't understand why they aren't working as they should. The Wiki says that finishMissionInit is finishing the world initialization before a mission is launched, so all the more it's incomprehensible to me. However, I'm not that curious to investigate all these relations. The most important for me is that the problem is solved.

Share this post


Link to post
Share on other sites

Hi. I recently had a chance to try UPSMON. So far it's awesome. Regarding fortify, is there any parameter to set the maximum distance a unit can look for a building / static to fortify? For example, I want units to primarily fortify a mosque, but they seem to detect and occupy buildings farther away. While only a couple units will occupy the mosque.

---------- Post added at 06:58 ---------- Previous post was at 06:40 ----------

Also, if I use group style reinforcement (KRON_UPS_reinforcementx = true), do I have to set a position as well? I would like to have a small pool of groups in a specific area, reinforce each other, rather than a position. Though I could use a group leader or member as the position, that's not a very dynamic solution.

Share this post


Link to post
Share on other sites
I think it did, though. I inserted all these lines to my init.sqf because they had already been in the init.sqf from the UPSMON package. So I copied them.

I've just looked up these commands on the BI Wiki and, unfortunatelly, I don't understand why they aren't working as they should. The Wiki says that finishMissionInit is finishing the world initialization before a mission is launched, so all the more it's incomprehensible to me. However, I'm not that curious to investigate all these relations. The most important for me is that the problem is solved.

The problem must be very specific. It's either a conflict between finishMissionInit and the HALO script you're using, or with the way you're calling it. I've used finishMissionInit in all types of scenarios, SP, hosted MP, and dedicated server, and never had any problem. It was a very strange interference indeed. Anyway, I'm glad you've sorted it out.

Share this post


Link to post
Share on other sites
Hi. I recently had a chance to try UPSMON. So far it's awesome. Regarding fortify, is there any parameter to set the maximum distance a unit can look for a building / static to fortify? For example, I want units to primarily fortify a mosque, but they seem to detect and occupy buildings farther away. While only a couple units will occupy the mosque.

---------- Post added at 06:58 ---------- Previous post was at 06:40 ----------

Also, if I use group style reinforcement (KRON_UPS_reinforcementx = true), do I have to set a position as well? I would like to have a small pool of groups in a specific area, reinforce each other, rather than a position. Though I could use a group leader or member as the position, that's not a very dynamic solution.

I don't think you can change that distance value (200m?) with any parameter you might have to find it within the UPSMON core files.

As far as reinforcement goes I think the reinforcement group moves to a marker position not the group's position if my memory serves?

Share this post


Link to post
Share on other sites

Hello everyone,

new to UPSMON and reading my way through this thread. Can i bother you with a pretty basic question, which nevertheless took me a couple of hours already and i wasnt able to figure it out.

I think i am missing some very basic understanding of how UPSMON works.

I am NOT working in the editor, i am directly scripting everything i want my MP mission to achieve.

Question is a simple one:

Consider a scenario where i spawn in (while the mission is running) a group of units and a vehicle, add the vehicle to the group, and now want the whole group to move to a certain location AND fortify this location.

If i try to do this via the normal patrol functionality the team gets where it is supposed to get and starts patrolling that area.

HOW do i now change them into fortify mode AFTER they have reached their destination? The vehicleinit for the leader is only executed once when creating the unit(if i am right), so i cant override / reset this.

Thx a lot for helping me out,

cheers

Sarge

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×