Home   Help Search Login Register  

Author Topic: Newbie here, need some help please (three specific questions)  (Read 1610 times)

0 Members and 1 Guest are viewing this topic.

Offline Fmrfox

  • Members
  • *
Ok so I am quite new to ARMA scripting and I'm making a multiplayer coop mission. There are three things I cant quite figure out and it would be great if someone could help me with them. (I can fully test and release the first basic version of the mission when these are done)

1) I have a respawn script to respawn vehicles at the players base. On two jets however I am using Mando's missile script package to give them different weapons. I can remove their weapons initially, but when they respawn the stock weapons reappear. I have tried so many different methods to try and fix this but Im stumped.

2) I want to prevent the players from having to spend ages searching enemy zones for "that one last guy in a bush somewhere". So instead of a simple "not present" trigger I want something else. How would I go about checking each enemy zone and marking them as cleared when a certain number of enemy are left. Maybe also make them flee, or just drop their weapons?

3) One of the objectives I have is for the players to capture or some critical personnel. I know how to allow players to capture them thats ok. However how do I define an area for the players to bring them and then mark the objective complete. Or become complete if they are killed instead?

I'm pretty sure all these things are achievable its just like I said I'm pretty new to all this. Thanks in advance, any help is greatly appreciated :)

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
1 - may you post your respawn script here?
2 - in the triggers condition put present instead of not present and in the condition: count thisList < numberofenemiesleft
3 - with a trigger or two grouped with the captive units (if present, the trigger will activate).

Offline Fmrfox

  • Members
  • *
1) Note that I didn't write the script, I got it from a thread on the BIS forums:

Code: [Select]
; Call in initline with (120 for 120 seconds, 2 minutes) :
;
;   [this, 120] exec "vehirespawn.sqs"
;
; Note - This script needs a "GameLogic" trigger named "SERVER" or else spawning will be nuts
;

?! (local server): exit
~3
_vehicle = _this select 0
_delay = _this select 1
_empty = true
_disabled = false
_moved = false

_startpos = getpos _vehicle
_startdir = getdir _vehicle
_type = typeof _vehicle

#waiting
~2
_newpos = getpos _vehicle
?! (_newpos select 0 in _startpos) or not (_newpos select 1 in _startpos): _moved = true

?! (isnull driver _vehicle) or not (isnull gunner _vehicle) or not (isnull commander _vehicle): _empty = false
? (isnull driver _vehicle) and (isnull gunner _vehicle) and (isnull commander _vehicle): _empty = true

?! (canmove _vehicle) or (canfire _vehicle): _disabled = true
? (canmove _vehicle) and (canfire _vehicle): _disabled = false
? (_disabled) and (_empty): goto "spawn"
? (_moved) and (_empty): goto "spawn"
goto "waiting"

#spawn
~_delay
?! (isnull driver _vehicle) or not (isnull gunner _vehicle) or not(isnull commander _vehicle): _empty = false
?! (_empty): goto "waiting"
deletevehicle _vehicle
~0.5
_newveh = _type createvehicle _startpos
_newveh setpos _startpos
_newveh setdir _startdir
[_newveh, _delay] exec "vehirespawn.sqs"
exit

2) So for the trigger I could put:

Code: [Select]
count thisList < 5
If I read this correctly it is looking at the units inside the trigger and counting them. If thats correct I may have a problem. When the mission first starts there are no enemy units, they are spawned in via scripts. The trigger will be empty at mission start as the scripts spawn the units by zone. Since the triggers will probably initialize before the scripts are finished some or all of the objectives would be marked complete instantly.

3) Ok so I just drag a group line from the trigger to the units, excellent!

Offline myke13021

  • Contributing Member
  • **
  • Myke
1.:
You can remove all weapons from the "respawned" vehicle (well, in fact it isn't a respawn by it's meaning, just delete destroyed and create a new one) at the end of the script when its created:
Code: [Select]
~0.5
_newveh = _type createvehicle _startpos
removeallweapons _newveh
_newveh setpos _startpos
_newveh setdir _startdir
[_newveh, _delay] exec "vehirespawn.sqs"
exit

2.:
I guess you're using my DGC:r to create the enemies. Create a second trigger, make it size similar to the one you alredy have, make it "Playerside" present repeatedly. In on activation put:
Code: [Select]
mysidelist = thislist
mysidelist is a variable and you're free to name it whatever you want, this is just for example. Now the trigger you already have, extend the condition to this:
Code: [Select]
(count thisList < 5) AND (count mysidelist > 0)
This should prevent the trigger from firing right at beginning.


Myke out

Offline Fmrfox

  • Members
  • *
1) Great that seems to have worked! Though strangely the missiles still appear on the model but you cant use them. Thats fine though, in fact its quite a good thing.

2) I'm using the sixth sense AI manager. I was hoping it would make the AI a bit more dynamic and more of a challenge but they aren't really acting any smarter. Though thats probably got something to do with the way I'm using it I expect. The package seems amazing but If someone could suggest a similar package with better documentation maybe I would have more luck with it. (Though I kind of balk at the amount of work required to switch at this stage)

3) How can I check if the critical personnel are alive?


Edit: I was just looking at your DGC:r Myke. It looks good, really easy to use, but it doesn't  incorporate group link or any of the AI enhancements?
« Last Edit: 25 Aug 2007, 21:52:49 by Fmrfox »

Offline myke13021

  • Contributing Member
  • **
  • Myke
Quote
Edit: I was just looking at your DGC:r Myke. It looks good, really easy to use, but it doesn't  incorporate group link or any of the AI enhancements?

Sadly no AI enhancment at this stage. I've tried to contact SNKMAN about to include GroupLinkIIPlus into the DGC:r but no response till today.

Myke out