Home   Help Search Login Register  

Author Topic: King off the Hill quistions  (Read 2058 times)

0 Members and 1 Guest are viewing this topic.

SH@dow 113

  • Guest
King off the Hill quistions
« on: 05 Sep 2003, 19:37:56 »
K i did almost every kinds off MP but not King off the Hill yet,
so i would like to ask some quistions ;D

i would like to know how i make the message "West is King off the Hill" apear when west gots the hill, same for East.
I know this has somthing to do whit Score.sqs, but im not good @ score.sqs so if anyone has a KoH score.sqs lying around would u pls give me, thx in advanced :cheers: ;D

Other ppl feel free to ask other quistons, and awnsers of course  ;D

P.S. srry for the bad english

SH@dow 113

  • Guest
Re:King off the Hill quistions
« Reply #1 on: 05 Sep 2003, 19:40:18 »
ow yeah srry forgot somthing

how do i make a flag change texture when, like, West captures the Hill, the flag changes to American textures.

Thx in advanced :cheers:

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:King off the Hill quistions
« Reply #2 on: 06 Sep 2003, 19:30:21 »



The following set of lines is what you will need placed in the relevant locations in your script to do what you have asked
Flagname is the name you have given to the flagpole





#WESTOWNS
Flagname setflagtexture "usa_vlajka.pac"
Titletext[format["WEST owns the hill!"],"PLAIN DOWN"]

#EASTOWNS
Flagname setflagtexture "rus_vlajka.pac"
Titletext[format["East owns the hill!"],"PLAIN DOWN"]
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

SH@dow 113

  • Guest
Re:King off the Hill quistions
« Reply #3 on: 07 Sep 2003, 11:32:12 »
thx, that helped me alot :cheers:
I own u one  ;)

P.S.Could u maybe give me an example for a King off the Hill score.sqs  ???
thx in advance :cheers:

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:King off the Hill quistions
« Reply #4 on: 07 Sep 2003, 11:49:32 »
that wont be possible unless you give us some criteria


for instance what when how do you want the scoring to work

eg when more west than east are on the hill, when only west are on the hill, when the flag changes color

do you just want a static score added when the flag is captured and no incremented score afterwards

do you want the same points added to the flag per minute it's owned

do you want an incremeted scoring system so that the longer they hold the flag the more points per minute they score.

How are you switching flags, triggers scripts etc etc

therer are so many versions of a scoring system that could be made, a little info from you would help to reduce those options

also it may help if you show us the scripts that are used, so that we can tie it into that
« Last Edit: 07 Sep 2003, 11:53:06 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

SH@dow 113

  • Guest
Re:King off the Hill quistions
« Reply #5 on: 07 Sep 2003, 18:56:04 »
k il do that,

Quote
for instance what when how do you want the scoring to work

eg when more west than east are on the hill, when only west are on the hill, when the flag changes color
The scoring should work when onley 1 side is on the hill (castle in this case  ;D)

Quote
do you just want a static score added when the flag is captured and no incremented score afterwards

do you want the same points added to the flag per minute it's owned
This 2 quistions i don't understand so good, but the flag has nothing to do whit it, it onley has to change texture to who owns the Hill

Quote
How are you switching flags, triggers scripts etc etc
This i don't know because i don't know how to change flag textures whitout the whole actions menu, but if possible i would like it to change (whit a trigger) when a side captures the hill (like after 5 secs or so)

Quote
also it may help if you show us the scripts that are used, so that we can tie it into that
k il do that but i think u should have to know i copyd it from a C&H or CTF tut (i don't remmember)

Hope that helped :cheers:

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:King off the Hill questions
« Reply #6 on: 10 Sep 2003, 17:09:12 »
I have adopted my c&h script to accomodate your King of the hill mission


ok first thing to do is create a trigger of ellipse type that encompasses the area that you want to class as the Hill

The way the system is basically going to work is to count how many east or west players are within the trigger area. If only 1 side are present then we will change the flag texture to that side, change an area marker colour and add a score.
Also when the hill is captured the players on the side of the team that has captured will hear an alarm sound, if they are in the trigger area

The score will continue to add for that side until they are not present and the opposing forces are

so first things first

1) Create a trigger
Set both axis to whatever size you want, and set it to ANYBODY and REPEATING
name the trigger "atFlag1"
condition: this

2) Place a flagpole on the hill at name the flagpole "Flag1"

3) Create a marker, either of icon type or an ellipse marker. If its an icon, use flag and place it right where the flag is, if you are going to use an ellipse marker then its size and location needs to be the3 same as the trigger, set its colour so that at the start it isnt blue or red, (green or black will do). Name the marker "Hillmarker"

then in the init.sqs type the following line

[] exec "checkhill.sqs"
@ time>1

then create the following script


;;checkhill.sqs
;;captime is the amount of time in seconds that only 1 side has to be on the hill to allow capping of the flag, change this value as you please
captime=5
;;Flagcap is the value you want to give in points everytime the hill changes hands
Flagcap=3
Flag1stat = 0
WScore = 0
EScore = 0
~0.25
?(isnull Flag1):goto "end"
Flag1 setflagtexture "flag.jpg"

#START
~1
?(EAST countside list AtFlag1 == 0 ) && (WEST countside list AtFlag1 > 0 ):Goto "WSTART"
?(WEST countside list AtFlag1 == 0 ) && (EAST countside list AtFlag1 > 0 ):Goto "ESTART"
Goto "START"  

#WSTART
_Wloop = Captime
#WCHECKLOOP
~1
?(WEST countside list AtFlag1 == 0) OR (EAST countside list AtFlag1 > 0):goto "START"
?(WEST countside list AtFlag1 > 0) && (EAST countside list AtFlag1== 0):_Wloop = _Wloop - 1
?(_Wloop <= 0):[] exec "Score.sqs"; goto "WCAPS"
goto "WCHECKLOOP"


#ESTART
_Eloop = Captime
#ECHECKLOOP
~1
?(EAST countside list AtFlag1 == 0) OR (WEST countside list AtFlag1 > 0):goto "START"
?(EAST countside list AtFlag1 > 0) && (WEST countside list AtFlag1 == 0):_Eloop = _Eloop - 1
?(_Eloop <= 0):[] exec "score.sqs"; goto "ECAPS"
goto "ECHECKLOOP"



;;;;;;;;;;;;;;;;;;;;;;;;; __________ WEST FLAG SYSTEM __________ ;;;;;;;;;;;;;;;;;;;;;;;;;

#WCAPS
?(Time>=Param1):exit
?!(local Server):goto "W_ALL"
#WSERVER
WScore=WScore+Flagcap; PublicVariable "WScore"
Flag1stat = 1; PublicVariable "Flag1stat"

#W_ALL
Flag1 setflagtexture "usa_vlajka.pac"
"Hillmarker" setMarkerColor "ColorBLUE"
?(Side player == WEST && Player in list AtFlag1):playsound "alarm"
~0.5
?Side Player == WEST:titletext[format["We have  taken the hill"],"PLAIN DOWN"]
?Side Player == EAST:titletext[format["The enemy has the hill"],"PLAIN DOWN"]

#WLOOPSTART
_Wcount = Captime
#WESTLOOP
~1
?(WEST countside list AtFlag1 > 0) OR (EAST countside list AtFlag1 == 0):goto "WLOOPSTART"
?(WEST countside list AtFlag1 == 0) && (EAST countside list AtFlag1 > 0):_Wcount = _Wcount -1
?(_WCount <= 0):goto "ECAPS"
goto "WESTLOOP"
;;;;;;;;;;;;;;;;;;;;;;;;; __________       end of west flag     __________ ;;;;;;;;;;;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;;;;;;;;;;;; __________ EAST FLAG SYSTEM __________ ;;;;;;;;;;;;;;;;;;;;;;;;;
 
#ECAPS
?(Time>=Param1):exit
?!(local Server):goto "E_ALL"
#ESERVER
EScore=EScore+Flagcap; PublicVariable "EScore"
Flag1stat = 2; PublicVariable "Flag1stat"

#E_ALL
Flag1 setflagtexture "rus_vlajka.pac"
"Hillmarker" setMarkerColor "ColorRED"
?(Side player == EAST && Player in list AtFlag1):playsound "alarm"
~0.5
?Side Player == EAST:titletext[format["We have  the Hill"],"PLAIN DOWN"]
?Side Player == WEST:titletext[format["The enemy has  the Hill"],"PLAIN DOWN"]

#ELOOPSTART
_Ecount = Captime
#EASTLOOP
~1
?(EAST countside list AtFlag1 > 0) OR (WEST countside list AtFlag1 == 0):goto "ELOOPSTART"
?(EAST countside list AtFlag1 == 0) && (WEST countside list AtFlag1 > 0):_Ecount = _Ecount -1
?(_ECount <= 0):goto "WCAPS"
goto "EASTLOOP"
;;;;;;;;;;;;;;;;;;;;;;;;; __________       end of east flag     __________ ;;;;;;;;;;;;;;;;;;;;;;;;;

 
#END
hint "Debug: Flag 1 doesn't exist, exiting checkhill.sqs"
exit
________________________________________________________________________

Then you will need a scoring script

;;;score.sqs, this is started up by the checkhill.sqs
?!(local Server):exit
#START
~1
?(Flag1stat == 0):goto "START"
?(Flag1stat == 1):goto "WEST"
?(Flag1stat == 2):goto "EAST"


;;;;;;;;;;;;;;;;;;;;;;;;; __________ WEST FLAG SCORE __________ ;;;;;;;;;;;;;;;;;;;;;;;;;
#WEST
_westcount = 0
_westcycle = 0.5

#WESTLOOP
?(Flag1stat != 1):goto "START"
~1
_westcount = _westcount + 1
~0.5
?(Time>=Param1):exit
?(_westcount == 30):WScore=WScore + _westcycle; PublicVariable "WScore"
~0.5
?(_westcount == 30):_westcount = 0; _westcycle = _westcycle + 0.5
?(Time>=Param1):exit
goto "WESTLOOP"
;;;;;;;;;;;;;;;;;;;;;;;;; __________       end of west flag     __________ ;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;; __________ EAST FLAG SYSTEM __________ ;;;;;;;;;;;;;;;;;;;;;;;;;
#EAST
_eastcount = 0
_eastcycle = 0.5

#EASTLOOP
?(Flag1stat != 2):goto "START"
~1
_eastcount = _eastcount + 1
~0.5
?(Time>=Param1):exit
?(_eastcount == 30):EScore=EScore + _eastcycle; PublicVariable "EScore"
~0.5
?(_eastcount == 30):_eastcount = 0; _eastcycle = _eastcycle + 0.5
?(Time>=Param1):exit
goto "EASTLOOP"
;;;;;;;;;;;;;;;;;;;;;;;;; __________       end of east flag     __________ ;;;;;;;;;;;;;;;;;;;;;;;;;

--------------------------------------------------------------------------------------------------------------------
You now have a fully working king of the hill script, untested but it should work.

You will however have to do some work yourself.

You will need to figure out how to show the score to everybody, this is fairly simple, but if i do everything for you, you wont learn a thing
My suggestion is to use a hint box and also to create a radio trigger so that at will anybody can call the score to show as well as automatically done in the scripting system

Oh 1 more thing, you will need to create a jpg file for your neutral flag texture, call this file flag.jpg and place it in your mission folder
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

SH@dow 113

  • Guest
Re:King off the Hill quistions
« Reply #7 on: 12 Sep 2003, 18:05:04 »
thx bro i REALLY own u one now :cheers:
If u need a back up in MP il be there  ;D

Thx for doing all the scripts (but i onley needed the score.sqs, not that i mind ;D)

the last thing u sed,
Quote
You will need to figure out how to show the score to everybody, this is fairly simple, but if i do everything for you, you wont learn a thing
i think i can figure that one out  ;D

im really thank full hope i can do somthing in return :cheers:


:gunman:Ur enemy is my enemy:gunman:
:cheers:Ur friend is my friend:cheers: