Home   Help Search Login Register  

Author Topic: "Battle Royale" MP level  (Read 23501 times)

0 Members and 1 Guest are viewing this topic.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:"Battle Royale" MP level
« Reply #90 on: 04 Sep 2004, 03:41:34 »
I think you will find that they have been going for longer.   ;D


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

Matt Walter

  • Guest
Re:"Battle Royale" MP level
« Reply #91 on: 04 Sep 2004, 05:08:57 »
I downloaded that map to see what it was... it might as well een called "An Island with a few bridges." It is about as Battle Royale as Star Wars. So nothing to worry about. ;)

Lean Bear

  • Guest
Re:"Battle Royale" MP level
« Reply #92 on: 04 Sep 2004, 14:12:26 »
Yeah, I downloaded that ages ago when I first thought about BR being an OFP mission. If anything we would be copying them!

OK, well I was going to say that I was working on the hunger thing. But while I was writing this post it sorted itself out. DBR_ONIX and I were working on it this morning and then d told me on msn that one of the guys over at RPC is working on it. He is doing the bar as well. Goes by the name of Nuker over at RPC forums. He is willing to help but the script is for a project he is working on.

(I thought it was a pretty original idea)


Lean Bear

  • Guest
Re:"Battle Royale" MP level
« Reply #93 on: 06 Sep 2004, 09:06:59 »
Good news from Skumball (who is doing the main mission and most related scripting) he was gonna upload something today but he was busy doing something else. So he will probably upload something for tomorrow so we will be able to see how he is getting on with it.

Still no luck with the custom animations. General Barron is trying to help me with that. If all else fails I could always turn to Hunter 8).

Progress on the weapons. I will post some new pics soon. I have also almost finished the ratons (food) and water bottles - for the hunger/stamina script. New pix soon ;)

Offline Skumball

  • Members
  • *
Re:"Battle Royale" MP level
« Reply #94 on: 07 Sep 2004, 01:48:21 »
Right peeps, here is the first beta of the zone scripting. It's not quite finished and I realise that there are still problems to be sorted out so I will continue to work on them.

I use the island on the south-east corner of Malden for this testing purpose.

I will explain what happens:

init.sqs:
Code: [Select]
[] exec {me.sqs}
[] exec {zonePlacement.sqs}
[] exec {zoneControl.sqs}
[] exec {dangerZoneCheck.sqs}
exit
Calls four scripts that are covered below.


me.sqs:
Code: [Select]
#loop
~0.5
{me} setMarkerPos (getPos player)
goto {loop}
Justs moves a marker so it is always above players head for testing purposes. Will also be required in game so players know where they are and don't blindly stumble into a prohibited zone and don't know where to go to get out ;)


zonePlacement.sqs:
Code: [Select]
triggerH6 setPos [9600,4480]
{markerH6} setMarkerPos [9600,4480]
triggerI6 setPos [10880,4480]
{markerI6} setMarkerPos [10880,4480]
triggerJ6 setPos [12160,4480]
{markerJ6} setMarkerPos [12160,4480]
triggerH7 setPos [9600,3200]
{markerH7} setMarkerPos [9600,3200]
triggerI7 setPos [10880,3200]
{markerI7} setMarkerPos [10880,3200]
triggerI8 setPos [10880,1920]
{markerI8} setMarkerPos [10880,1920]
exit
Moves zone markers & triggers into their exact locations. You will notice that they are a bit off-centre in the editor so this script overrides that.


zoneControl.sqs:
Code: [Select]
_H6 = [{H6}, triggerH6, {markerH6}]
_I6 = [{I6}, triggerI6, {markerI6}]
_J6 = [{J6}, triggerJ6, {markerJ6}]
_H7 = [{H7}, triggerH7, {markerH7}]
_I7 = [{I7}, triggerI7, {markerI7}]
_I8 = [{I8}, triggerI8, {markerI8}]
_zones1 = [_J6, _I8, _I7, _I6, _H7, _H6]
_zones2 = [_I8, _J6, _I7, _I6, _H7, _H6]
_zones3 = [_J6, _I8, _I7, _H7, _I6, _H6]
_zones4 = [_I8, _J6, _I7, _H7, _I6, _H6]
_zones5 = [_J6, _I8, _I7, _H7, _H6, _I6]
_zones6 = [_I8, _J6, _I7, _H7, _H6, _I6]
_zones7 = [_J6, _I8, _I7, _I6, _H6, _H7]
_zones8 = [_I8, _J6, _I7, _I6, _H6, _H7]
_zones9 = [_I8, _I7, _H7, _H6, _I6, _J6]
_zonesAll = [_zones1, _zones2, _zones3, _zones4, _zones5, _zones6, _zones7, _zones8, _zones9]
_zones = _zonesAll select (random ((count _zonesAll) - 1))
_i = 0
dangerZones = []

~1

hint {Welcome students!\n\nI hope that you are all fit and ready to fight!}

~3

#newZone

hint format [{Warning!\n\nSector Zone %1 will become a forbidden zone in 5 minutes.}, ((_zones select _i) select 0)]
((_zones select _i) select 2) setMarkerColor {colorYellow}

~3

hint format [{Warning!\n\nSector Zone %1 will become a forbidden zone in 20 seconds.}, ((_zones select _i) select 0)]

~3

_k = 10
#loop
hint format [{Warning!\n\nSector Zone %1 will become a forbidden zone in %2 seconds.}, ((_zones select _i) select 0), _k]
~1
_k = _k - 1
? _k > 0 : goto {loop}

hint format [{Warning!\n\nSector Zone %1 is now a forbidden zone.}, ((_zones select _i) select 0)]
((_zones select _i) select 2) setMarkerColor {colorRed}
dangerZones = dangerZones + [(_zones select _i)]

_i = _i + 1

~3

? _i < ((count _zones) -1) : goto {newZone}

hint {There is now only one safe zone remaining. If a winner is not decided in the next 15 minutes, there will be no safe zones and no-one will survive.}

~3

[] exec {killAll.sqs}

exit
First, each grid coordinate (zone) that will be required has the name, trigger and marker stored in their own array.

Then based on this example I have created a number of different orders that the zones can be activated in. I then store all of these in an array and choose one randomly.

Then the newZone loop comes next and is the main bit here.  It uses the order of the zones picked randomly above, and tells the player that the next zone will become a danger zone. I specify 5 minutes but change this to whatever length required. You'll notice that it doesn't wait for these times, but I put in 3 seconds just for testing purposes. The zone turns yellow in the map.

It then gives a warning at 20 seconds, then counts down from 10. The zone will then turn red signifying danger zone. This is then added to the global dangerZone array which is made available to another script below.

The script loops until all but one zone remains. The players are then informed that if a winner is not decided in the next 15 minutes then the remaining safe zone will become a danger zone and no-one will win (bye bye neck).

killAll.sqs has not yet be implemented.

Now this next bit is where I am having problems.


dangerZoneCheck.sqs
Code: [Select]
#wait
~1
? (count dangerZones) == 0 : goto {wait}

#start
~1
_i = 0
victims = []

#collect
~0.1
victims = victims + [list ((dangerZones select _i) select 1)]
_i = _i + 1
? _i < (count dangerZones) : goto {collect}

_i = 0
#death
~0.1
{[_x] exec {dangerZone.sqs}} forEach (victims select _i)
_i = _i + 1
? _i < (count victims) : goto {death}

goto {start}

exit
This basically checks each player for their position. If any are in danger zones then execute dangerZone.sqs for each of them. The problem is that they will keep getting the script executed for them over and over again until they leave the danger zone. I only want it to happen once.


dangerZone.sqs
Code: [Select]
_unit = _this select 0

hint {Warning!\n\nYou have entered a forbidden zone.\n\nYou have 20 seconds to evacuate or your collar will detonate.}

~10

_i = 10
#countdown
_k = 0
_count = 0

#check
~0.01
? _unit in (victims select _k) : _count = _count + 1
_k = _k + 1
? _k < (count victims) : goto {check}
? _count == 0 : goto {safeZone}

hint format [{%1...}, _i]
~1
_i = _i - 1
? _i > 0 : goto {countdown}

? !(alive _unit) : goto {exit}
_unit setDammage 1
{grenade} camCreate (getPos _unit)
goto {exit}

#safeZone
hint {You have entered a safe zone.}

#exit
exit
This gives a warning and a countdown much like that found when a zone is about to be made dangerous. A check is made during each second of the 10 second countdown to see if the player has entered a safe zone. If not, bye bye player.

This works fine, it is just the repeat calling of this script that is the problem from dangerZoneCheck.sqs.

There also seems to be a problem with the zone detecting for a couple of zones so I'll sort that out. Remember, beta beta beta !!

*edit*edit*edit* stupid stupid me. I had placed the triggers differently to the markers and I just realised. What a monkey. Ok it's just the repeat calls to the dangerZone script that is the problem now.

Also the same zone orders keep getting picked so I'll have to tweak that.
« Last Edit: 09 Sep 2004, 02:17:43 by Skumball »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:"Battle Royale" MP level
« Reply #95 on: 07 Sep 2004, 03:51:47 »
Maybe you could set a variable to 'true' once the script has run for the first time.

Initialise the variable somewhere as 'false'.

You would then need to check the condition of this variable at the start of the script, if it is 'false' the script carries on, if it is 'true' the script exits.

Of course it will probably need to be reset as false afterwards in order to be effective for next time.

Just a thought.


Planck
« Last Edit: 07 Sep 2004, 03:53:27 by Planck »
I know a little about a lot, and a lot about a little.

Lean Bear

  • Guest
Re:"Battle Royale" MP level
« Reply #96 on: 07 Sep 2004, 10:00:26 »
Try putting this in somewhere, har har.

Code: [Select]
_zonesAll = ["zones1" ,"zones2" ,"zones3" ,"zones4" ,"zones5" ,"zones6" ,"zones7" ,"zones8" ,"zones9"]
_r = random (Count _zonesAll)
_r = _r - _r %1
[] exec (_Fzones select _r)

perhaps instead of
Code: [Select]
_zonesAll = [_zones1, _zones2, _zones3, _zones4, _zones5, _zones6, _zones7, _zones8, _zones9]
_zones = _zonesAll select (random ((count _zonesAll) - 1))
_i = 0
dangerZones = []

in the "zoneControl.sqs".
To fix doing the same patterns of zones.

I've yet to check it out but I can't see anything wrong with the script. ;)

Quote
This basically checks each player for their position. If any are in danger zones then execute dangerZone.sqs for each of them. The problem is that they will keep getting the script executed for them over and over again until they leave the danger zone. I only want it to happen once.

Well, surely if the script is executed the player will be dead so it won't need to exeute it again?

OK. About the finshed mission. Well, djackl gave me the idea about using setAccTime or doing what they use in NogVille.

So, I tried them out and the setAccTime is good, but it looks a bit wierd. Then I stated to move. It was like being in the laggiest mission ever but trying to move at the fastest speed doing the most possible things!!!

So that's prob. a no to using that. I am trying to see if there is a way to affect the time of day. But not the players.

But the NogVille thing works really well. Its a bit sudden and jerky when it changes, but its OK. This way the mission can actually last for "three days". Maximum of course.

Offline Skumball

  • Members
  • *
Re:"Battle Royale" MP level
« Reply #97 on: 07 Sep 2004, 12:48:37 »
Quote
Maybe you could set a variable to 'true' once the script has run for the first time.

Initialise the variable somewhere as 'false'.

You would then need to check the condition of this variable at the start of the script, if it is 'false' the script carries on, if it is 'true' the script exits.

Of course it will probably need to be reset as false afterwards in order to be effective for next time.

I've been trying to work out how to implement that but it is difficult, or maybe I am missing something obvious. Because the dangerZone script is activated for everyone there needs to be a flag which sets to true once each player is in a danger zone. But how do you set a flag for each person? It'll come to me eventually :) I may have to juggle the scripts about to get it to work.


Quote
Try putting this in somewhere, har har.

That may be the problem. Even though the random number picks a non-integer value (1.235 or something), it still manages to pick the closest whole number. But I have only once seen the _zones9 order picked so I'll se if that code helps.


Quote
Well, surely if the script is executed the player will be dead so it won't need to exeute it again?

I have given a 20 second countdown to evacuate the zone, otherwise an accidental crossing into a danger zone with an instant death is quite harsh, as the map needs to be consulted to find your position. This gives the foolish player a chance to get back to a safe zone. So all the time that you sit in a danger zone, a new call to the dangerZone.sqs is called and these build up in the background. So you eventually get a number of 20 second countdowns all happening at the same time! If you get to a safe zone before the first one expires you hear the hint popping up ("You have entered a safe zone") for each countdown script that was called whilst in the danger zone.

Bit complex to take in I know. I'll sort it eventually :D

Lean Bear

  • Guest
Re:"Battle Royale" MP level
« Reply #98 on: 07 Sep 2004, 16:33:42 »
20 secs? That's a long time. You could probably run through a zone in that time. The player should have to look at his map to find out where he/she is and where the forbidden zones are. That's half the point.

Its a harsh world out there. You gotta live it to learn it. as a wise man once told me

OK. So a newbie to the scene might accidentaly walk into one and get his head blown off. But after that checking the map and the hints are second nature. Would I be wrong to say that?
« Last Edit: 07 Sep 2004, 16:34:58 by Lean Bear »

DBR_ONIX

  • Guest
Re:"Battle Royale" MP level
« Reply #99 on: 07 Sep 2004, 17:56:32 »
Hmm.. Are you making new units for the children?
Or editing them atleast?
If so, you could make a hidden selection for the head.. And when the neckless blows up, you do the hiddenselection on the head...
(And the colar too, of course)

Kinda sick, but it would add to the "I don't want my head-blowen off" fell
Anyway, gd work Skumball ;)
- Ben

Lean Bear

  • Guest
Re:"Battle Royale" MP level
« Reply #100 on: 07 Sep 2004, 18:18:28 »
Yeah, good work indeed! I checked the mission out and, apart from the fact that none of the time on the hints relates to th mission, the only thing I found that was in need of a de-bug was what you said:

Quote
So you eventually get a number of 20 second countdowns all happening at the same time!

Eventually it just crashed, but, in between the hints of 20 secs remaining I saw a glimpse of "10...." Which means that the script is running further in the "dangerZone.sqs". If you re-jig this part:-

Code: [Select]
? !(alive _unit) : goto {exit}
_unit setDammage 1
{grenade} camCreate (getPos _unit)
goto {exit}

and basically just take out of the first line:-

Code: [Select]
: goto {exit}.

Yes. I was planning on doing new models for the kids. But from existing ones of course. The animations thing is almost done. As in, I can almost get the weapons to move. The hiddenslection is a good idea.
It will look pretty sick with fx added to to it! ;D

Matt Walter

  • Guest
Re:"Battle Royale" MP level
« Reply #101 on: 07 Sep 2004, 21:10:03 »
I just thought of something... since the zones are random, what do we do if the map gets split up. Is there a way for that not to happen?

Lean Bear

  • Guest
Re:"Battle Royale" MP level
« Reply #102 on: 07 Sep 2004, 22:25:44 »
Nope. But that's kinda part of the fun isn't it? Sometimes you'll be left with almost no room after a few zones are forbidden. Sometimes you'll end up with loads of room for almost the whole thing!

Alright! I've finally worked out how to put custom weapons in a .p3d and then use them in custom
animations!! 8)
OK, so I've done a basic attack animation for the baseball bat (pretty much a baseball swing but aiming for the upper body/head and down to the waist at the side), the axe/hatchet
(like the baseball bat swing but with one hand on the axe the other for stability/balance also aiming for the upper body/chest) and the fork:D (a one-handed thrust into the adversairy's
stomach  :P)
Can't really get pics at the moment. When I do the config and stuff I will check it out in game
and see if I can get some snapshots of the anims in full glory.  ;)

Offline Skumball

  • Members
  • *
Re:"Battle Royale" MP level
« Reply #103 on: 08 Sep 2004, 00:54:30 »
Quote
20 secs? That's a long time. You could probably run through a zone in that time.
You could run through the small sub-sectors in that time, but not the big ones, they are 10 times that size! Immediate death would make my life a bit easier (there's a joke in there somewhere) and I could have a working script for you tomorrow (roughly), so let me know what you all think.


Quote
apart from the fact that none of the time on the hints relates to th mission
Yeah that'll be amended for the final :)


Quote
Eventually it just crashed, but, in between the hints of 20 secs remaining I saw a glimpse of "10...." Which means that the script is running further in the "dangerZone.sqs".
Yeah the 10... 9... 8... will appear in between the new calls to the script whilst u are in a danger zone, they just overlap each other.

Quote
If you re-jig this part:-

Code:
? !(alive _unit) : goto {exit}
_unit setDammage 1
{grenade} camCreate (getPos _unit)
goto {exit}


and basically just take out of the first line:-

Code:
: goto {exit}
I'm not sure why I need to take out that part. The reason that check is there is to stop the player getting exploded even after he has died. But that all goes back to the multiple calls problem so if I can sort that then that will be that.


Quote
I just thought of something... since the zones are random, what do we do if the map gets split up. Is there a way for that not to happen?
Thats why I incorporated a number of different zone orders in zoneControl.sqs, 9 in all. I made sure that there were no options for a player to become stranded in a safe zone which might later turn into a danger zone. This in effect 'herds' the players to the final zone, which is why there are danger zones in BR, to encourage conflict. You basically want the zones to contract from the outside inwards in a random fashion.

Glad u all like. I will endeavour to meet your needs !!!

Lean Bear

  • Guest
Re:"Battle Royale" MP level
« Reply #104 on: 08 Sep 2004, 20:12:45 »
Quote
You could run through the small sub-sectors in that time, but not the big ones, they are 10 times that size!

Here's what I meant. Say all the zones except one are fobidden. If you go into a forbidden zone and the 20secs remaing thing starts going and you enter the zone near another boundary; you can run into the next zone (just crossing into it) then run back into the first one going forwards all the time. Using this tecnique, I managed to easily move accross the island without being blown up. And if you are playing a multiplayer game and there is only you and one other person left. And this other guy keeps doing the above. The mission could last for ages (well, only until the tree day mark). But it would be realy unfair on the other player since he can't do it. See what I mean? Try it if you don't believe me. And if immediate death upon entering a forbidden zone would make your life easier, it would prob. make the players' lives easier as well.

Sorry about the delays of pics from the modeling, island and animations departments. I went into OFP and then remembered I had to write loads of configs for the animations and the models. But since I can't find any to use as a guide, (they are all in .bin and I dunno how to un-bin them  ::)) And I've had to update the config for th island.

But they will come. Incedentaly, if any of yous guys want to test them out, feel free to ask me for them and I will send them to you. Just give me your msn or your e-mail (note: some e-m@il companies have a limit to the size of files attached and the inbox ie. msn is probably better) I'll get it down to the smallest that I can (.rar is best is you have WinRar) and you can check it out! ;)