Jump to content

Sign in to follow this  
Woodpeckersam

Just some questions, may benefit others?

Recommended Posts

Hiya all,

I just have a few questions that should hopefully be simple to answer. I cannot find an appropriate thread or someone else asking these questions.

1. How would I get my group leader to issue a waypoint for JUST the player?

Would i need to

[player] join grpNull;

then when I have completed a task

[player] joinSilent _group;

I have created tasks with success so i have no problems there. Same goes for setting the task destination to a marker, but if a player plays this mission, how will he/she know where to go, as there is no indication other than the marker on the map.

primTskObj3=player createSimpleTask ["Move to Position"];
primTskObj3 setSimpleTaskDescription ["I need to move into position inside the same building that Young has entered, but on the ground floor.","Move to Position","Move to Position"];	
player setCurrentTask primTskObj3;
primTskObj3 setSimpleTaskDestination (getMarkerPos "MovePos");
[primTskObj3] call mk_fTaskHint; 
poshouse = player addWaypoint [getPos point, 0];
[player,1] setWaypointType "Move";
poshouse setWaypointDescription "Move to this Position";

obviously this doesnt work because the addWaypoint is used for groups...

2.Change Grouping Order?

Throughout the mission 2 other guys join my player's group. They are higher in rank than the player. However when they join my group, they tend to follow me around as if the player is higher in rank.

I have used

[player] join grpnull;
[tmm3,tmm4] join _plygrp; 
sleep 0.5;
[player] joinSilent _plygrp;
_plygrp setCombatMode "Green";
_plygrp setBehaviour "CARELESS";

however SOMETIMES they dont follow me and the other times they do. It's weird.

3. Is there any way of Disabling and Enabling grouplink 4 on a group?

At the start of the mission my guys are parachuting down to earth. Then they are required to get into a car. However they take bleeding long to get into a car even when they are in safe mode and careless... they keep scouting an empty area for enemies.

4. Why can AI spot enemies so far away....

What could be the reason why the AI in my group can spot enemies 1000 meters away in FULL fog and Pitch Black darkness, with no NVG Goggles or Guns? (They spot enemies as they are parachuting down)

5. I have read these documentations..

http://community.bistudio.com/wiki/SQS_to_SQF_conversion and i cant just seem to understand the "Cycle with step" part of it. I havent implemented it in my code, but i am very familiar with things in a .sqs file such as...

#Loop
if (!alive man): goto "Loop";

man2 doMove getPos player;
if (!alive man2):goto "End";

man2 groupChat "Hello!";

#end

This is a bit rubbish lol, it prolly dont work anyway, but im not bothered about that... all i want to understand is how can one jump around the script in .sqf?

I just dont understand how this works. It could be me being tired and stressed with packing (for moving out) or im just clueless lol.

for [{_n = 0},{_n <= COUNT},{_n = _n+1}] do {
COMMAND;
};

Edited by WoodyUK

Share this post


Link to post
Share on other sites

1. By reading your comprehensive Briefing Notes and Task Descriptions. If your players are stupid or can't read, don't make up for that with waypoints.

2.

group player selectLeader player;

3. What's GroupLink?

4. They are AI. They are our friends. I for one welcome our new AI overlords.

5. GOTO is the Devil, SQS is dead, long live SQF. Forget your first example. One does not "jump around" a script in SQF. You create functions to do .. well, functions, and call them if/when you need them. Read up on while, waitUntil, for and foreach. Taurus' Guide to Writing SQF is a required read. It covers a lot of these syntax type things.

Share this post


Link to post
Share on other sites

1. I just wanted to make it feel more game like, with simple helpers thats all.

2. Sorry but i dont want to be the leader of a group, i want people who join my group later in the mission to not follow someone who is lower in rank than them. Lets say I am the player is the rank of "Private" and two "Corporal's" join the group, i want them to follow the "Major" in formation rather than the player who is lower in Rank.

3. Grouplink is the "sort of" total conversion mod for Armed Assault 2. Titled "Grouplink 4 Special FX edition". http://forums.bistudio.com/showthread.php?t=92269&highlight=grouplink.

4. Yes i do too, however i want to start off the mission so that the player and his group does not know about the enemy until a certain moment in the mission. Lets say the the group parachutes down, i want them to do that without spotting the enemy. Then i want them to go to a house near the village the enemy is holding. I want this to happen without the group spotting the enemy. Then 1 hour later (titletext and time change in script) i want an enemy to come down the road and my team has to hide. At THAT point i want the group to know about the enemy.

5. Thanks for that, i hadnt found that, i wonder why(!) :P

Cheers for the reply Kylania.

Share this post


Link to post
Share on other sites

@kylania I read on WIKI that the extension of a script file can be anything and they are only named .sqs or .sqf because of the convention. I really dont get it.

Share this post


Link to post
Share on other sites

ziip...

From what I understand (and sort of guess), sqf and sqs has certain commands and functions that would only work in certain file formats. If you use an extension an extension such as .txt for your scripts... it will either...

1. Not understand type of script it is therefore the commands you use wont work

or

2. Possibly run that script assuming it's using the default type of commands for the game (i think Arma2 uses mainly sqf than sqs).

Can i someone correct me if i am wrong?

Thanks.

As for my question number 4.

I have a feeling that i was have to use

enableRadio false;

There are pro's and cons of that however...

Pros..

- Shuts the mouth of my group

Cons..

- If i want my leader to command the player to do something, the player will be clueless

- I would have to keep turning it on and off in the script

Can someone help me find any better way of doing this? I have been thinking... creating groups later on in the script. This will be a nuisance however... i have over 50 groups, all using UPSMON... with waypoints.

*groan* If i could only completely disable spotting in my group or change the group's view distance to like 100 meters making them almost blind... hmmm

Share this post


Link to post
Share on other sites
  WoodyUK said:
2. Sorry but i dont want to be the leader of a group, i want people who join my group later in the mission to not follow someone who is lower in rank than them. Lets say I am the player is the rank of "Private" and two "Corporal's" join the group, i want them to follow the "Major" in formation rather than the player who is lower in Rank.

This is the command you are looking for: http://community.bistudio.com/wiki/rank

After you add new units to a group, loop through the group checking the rank, once you find the highest rank, use the command kylania referenced to assign the leader.

Share this post


Link to post
Share on other sites

Hi Grizzle thanks for the reply. Yes that command will work if the player joins groupnull then rejoins the same group. I would just use that command for the leader of the current group.

i mean... he is already a leader but the new team members would benefit from that command.

I guess this will have to do. It happens in the space of a second so its rather difficult to spot whether the player has left the group quickly or not. Either way there really is no issue with tricking the system. Thanks for the help Kylania and Grizzle :D

Now for the rest of my questions...

Share this post


Link to post
Share on other sites

Regarding SFQ vs SQS, I don't think the file extensions matter. It depends on how you call the script. If you note, 'exec' expects a script to be in SQS format:

http://community.bistudio.com/wiki/exec

execVM compiles and executes a script in SQF format:

http://community.bistudio.com/wiki/execVM

So far example if you call a script with SQF specific commands with 'exec' then you should receive an error. The 3 letter extension is just to help us stay organized with the code we are working with. Someone please correct me if I'm off here :)

Share this post


Link to post
Share on other sites

SQS and SQF syntax is quite different. SQS is better for a very limited amount of things and SQF is better for basically everything else. I can't seem to find the post that details the differences, but use SQF and leave SQS for camera work. :)

File extensions don't technically matter, but like AZ said, it keeps things easy.

Share this post


Link to post
Share on other sites

The only things that needs SQS are event scripts. Of course you only need them to execVM the corresponding SQF script, but hey :p

Share this post


Link to post
Share on other sites

Lol, no, event scripts. I'm not using all of them, but I don't think onFlare and onPlayerKilled will look for anything else than their SQS scripts. Even BIS use onPlayerKilled.sqs only to start onPlayerKilled.sqf. (Edit: Oh, that was even mentioned)...

Share this post


Link to post
Share on other sites

Ah i see thanks for the tip Carl :D It's getting much clearer to me know. Smart :D

Can anyone still be able to answer my questions from first page? Im still gutted about how AI can see so far in the night with full fog.. does it have something to do with ACE 2?

If its not... then does anyone know a way where i can save all the current enemy groups on the map, the spawn them when i need to later on in the script?

If its a case of using createunit for each enemy groups i need... then this is gonna take forever to do isnt it?

edit:::::

Scrap the GL4 question, i'll stick with UPSMON for now :D

Edited by WoodyUK

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  

×