Home   Help Search Login Register  

Author Topic: Territory control - Some help please  (Read 2077 times)

0 Members and 1 Guest are viewing this topic.

Offline IGWedge

  • Members
  • *
  • Internal Coordinator @ www.ic-arma.com
    • International Conflict Armed Assault
Territory control - Some help please
« on: 17 Apr 2007, 13:49:10 »
Hi Guys

Im am asking for some help here as i have had more luck finding people to help in these forums than over at BIS.

I think what im asking is not too difficult but unfortunatly as much as ive tried to understand scripting i just cant seem to get my head round it.
Norrin our resident scripter has had to stand down due to time constraints, so now i find my self with no options but to ask for help.

What i basicly need is a map with 5 points on it.

I wanted something similar to the new seized by trigger, what i mean by this is something that calculates the strength of an army in the zone and caps it according to who has the stronger force or numbers. Norrin and myself were testing some scripts using the siezed by trigger and had some problems. Whenever the zone was larger than 25m it stopped working and also it didnt seem to like JIP either.....but im not sure if this is something to do with needing an update script. I also find it strange that there is an East and west but not for Anybody.

Currently we were just using the stock Sector Control points to get us by but in all honesty for the kind of organised gameplay we use....they suck.

Maybe this sector control map can be modified im not sure but the other problem with it is that the point can be held by one guy laying in a bush hiding even if there is 10 enemy in the zone. Hence the need to calculate strength within the zone.

Lastly we would need some kind of scoreboard that showed the current status from time to time and also the winning army at the end.

I am asking if someone would like to take this on as a small project with full and complete credits and thanks to that person.
I am running a tournament which currently as of this morning has 390 members....so quite a few. The people who play are very dedicated and train regularly. This will be the basis on which the whole tournament is played so ....... trying not to sound it ......im desperate lol.

If anybody can help that would be awesome

Many thanks

Wedge

Internal Coordinator
International Conflict Armed Assault
www.ic-arma.com

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Territory control - Some help please
« Reply #1 on: 17 Apr 2007, 16:02:24 »
Try seeing if the Triggers page on the Biki helps you, Maruk has just updated the explanation for the 'seized by' trigger.

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

Planck
I know a little about a lot, and a lot about a little.

Offline IGWedge

  • Members
  • *
  • Internal Coordinator @ www.ic-arma.com
    • International Conflict Armed Assault
Re: Territory control - Some help please
« Reply #2 on: 17 Apr 2007, 20:38:10 »
Thanks for the info there Planck

It gives a good insight into the seized by trigger.

This still leaves me with the problem of starting the whole thing off. If someone could at least start me off
i could then play around and tweak it.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Territory control - Some help please
« Reply #3 on: 18 Apr 2007, 02:30:07 »
This may be useful for you: Trigger power balance calculation

Offline IGWedge

  • Members
  • *
  • Internal Coordinator @ www.ic-arma.com
    • International Conflict Armed Assault
Re: Territory control - Some help please
« Reply #4 on: 18 Apr 2007, 08:19:21 »
Thats an awesome little script. Im not sure how i would implement it...

Maybe this would help.... i am attaching the misiion that myself and Norrin were working on. I have tested it on our Dedicated Battle server and it all seems to work fine with points up to 200m  i didnt go any bigger.
It uses the seized by trigger which automatically calculates strength according to the info above.
Im thinking for the kind of battles we would be having it would be better that the enemy did not know the strength of the holding army.

The problems i am having with it is with JIP. People who are joining can not see the colour changes of the flag/zone or the capping text that comes across sidechat.
I know this has to do with an update script or looking at Karrilions maps he has a JIP.sqs. Can you take a quicklook at the attached map and maybe show me what to add in, as i dont really know anything about variables etc.

many thanks again

Offline ViperMaul

  • Members
  • *
    • Theatre Of War (Team PvP Campaign)
Re: Territory control - Some help please
« Reply #5 on: 19 Apr 2007, 06:50:22 »
Hi Wedge,

Well one thing is for sure. If you are having JIP issues then I would at least suggest using publicvariables to broadcast the variables you are having trouble with.

But I am sure you know that already because you specifically mention JIP.sqs and we know the RTS mission is working for the most part.

ViperMaul
Theatre of War (Co-Lead Dev)
ACE (Jr Project Manager)

Offline IGWedge

  • Members
  • *
  • Internal Coordinator @ www.ic-arma.com
    • International Conflict Armed Assault
Re: Territory control - Some help please
« Reply #6 on: 19 Apr 2007, 07:42:46 »
Hows it goin vipe

i know its with the variables but as i said up there

Quote
Can you take a quicklook at the attached map and maybe show me what to add in, as i dont really know anything about variables etc
  ??? :(

For someone who knows what they are doing im sure it would take no time at all.

Wedge


Offline WhisperOFP

  • Members
  • *
  • I'm a llama!
Re: Territory control - Some help please
« Reply #7 on: 19 Apr 2007, 10:35:22 »
beware, people who join in progress do NOT launch the init.sqs script.
You can update their game status by using onClientConnected call, making the server publicVariable the important game status variable (mainly, bases ownership)

Offline IGWedge

  • Members
  • *
  • Internal Coordinator @ www.ic-arma.com
    • International Conflict Armed Assault
Re: Territory control - Some help please
« Reply #8 on: 19 Apr 2007, 22:24:15 »
I really dont know how to impelement this ??? ??? ??? ........ I need some help actually doing it.

Offline IGWedge

  • Members
  • *
  • Internal Coordinator @ www.ic-arma.com
    • International Conflict Armed Assault
Re: Territory control - Some help please
« Reply #9 on: 20 Apr 2007, 07:37:40 »
OK

This is what i have so far......

Trigger "Seized By" set to Blufor

Condition
Code: [Select]
this && cap_flag4 == 0 || this && cap_flag4 == 1
On Act
Code: [Select]
[flag_E4] exec "Flag_capture\flag_capture_west.sqs"
Flag Capture West.sqs looks like this(3 flag example)......

Code: [Select]
;flag_capture.sqs'

_flag = _this select 0
_flag_name = call compile format ["%1", _flag]
player Sidechat "Blufor is capping a flag"
~5

# START
? (cap_flag1 == 0 && _flag_name == flag_E1 || cap_flag1 == 1 && _flag_name == flag_E1): goto "W_ONE"
? (cap_flag2 == 0 && _flag_name == flag_E2 || cap_flag2 == 1 && _flag_name == flag_E2): goto "w_TWO"
? (cap_flag3 == 0 && _flag_name == flag_E3 || cap_flag3 == 1 && _flag_name == flag_E3): goto "W_THREE"

exit

#W_ONE
_flag setFlagTexture "\ca\misc\data\usa_vlajka_co.paa"
"Sector1" setMarkerColor "Colorgreen"
"Sector1flag" setMarkerColor "Colorgreen"
titleText ["US forces have captured SECTOR 1 flag", "PLAIN"]
playsound "UCapture"
cap_flag1 = 2
~5 
exit

#W_TWO
_flag setFlagTexture "\ca\misc\data\usa_vlajka_co.paa"
"Sector2" setMarkerColor "Colorgreen"
"Sector2flag" setMarkerColor "Colorgreen"
titleText ["US forces have captured SECTOR 2 flag", "PLAIN"]
playsound "UCapture"
cap_flag2 = 2
~5
exit

#W_THREE
_flag setFlagTexture "\ca\misc\data\usa_vlajka_co.paa"
"Sector3" setMarkerColor "Colorgreen"
"Sector3flag" setMarkerColor "Colorgreen"
titleText ["US forces have captured SECTOR 3 flag", "PLAIN"]
playsound "UCapture"
cap_flag3 = 2
~5 
exit


Init.sqs contains

Code: [Select]
this exec "Flag_capture\mission_start.sqs";
And lastly the Mission_start.sqs contains this ....

Code: [Select]
;mission_start.sqs
~2
_timeStart = time

?(_timeStart <=10):goto "set_var"
?(_timeStart > 10):goto "var"
exit


#set_var
cap_flag1 = 0
cap_flag2 = 0
cap_flag3 = 0
cap_flag4 = 0
cap_flag5 = 0
exit

#var
player getVariable "cap_flag1"
player getVariable "cap_flag2"
player getVariable "cap_flag3"
player getVariable "cap_flag4"
player getVariable "cap_flag5"
exit

There is also the same for the East side with a slightly different code bu essentially the same.


Here are my current problems..

1: There is no way to score at the end of the round, all it needs is something that comes up "Blufor wins" or "Opfor wins".

2: The join in progress doesnt work and i have no idea how to make it work.

3: Another problem after testing the mission was people taking the territories by hovering in a heli...is there something i can add to the above trigger in order to only make it trigger below 2m?

Thanks

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Territory control - Some help please
« Reply #10 on: 20 Apr 2007, 08:19:34 »
IGWedge, do not double post.
If you have something to add, edit your post instead of replying to yourself, unless at least 2 (preferrably 3) days has passed since your reply..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline norrin

  • Tutorial Writer
  • **
Re: Territory control - Some help please
« Reply #11 on: 20 Apr 2007, 08:50:16 »
Wedge I've just posted over at IC-ArmA a revised flag change script that uses HAILO's JIP script amongst other things and as far as my testing is concerned it works a treat when players JIP. :)

For anybody else interested you can get the new version from here

I'll also post the new version with updated details on how to implement it in your own missions in my flag change thread first chance I get.  Now we just need to sort out the probs with scoring. 

Offline IGWedge

  • Members
  • *
  • Internal Coordinator @ www.ic-arma.com
    • International Conflict Armed Assault
Re: Territory control - Some help please
« Reply #12 on: 20 Apr 2007, 18:09:19 »
Thanks Norrin got your post

Your a ledgend mate thanks

Wedge