|
Joint Operations Anything about the Joint Operations series of games. |
|
Thread Tools | Search this Thread | Display Modes |
#21
|
||
|
Unfortunately, adding new scripts to the bottom fixed the crashing, but those new scripts would not work. So, I had to resort to removing the vehicle fuel system from the map, which was the most taxing on the WAC. Unfortunate because it was cool for the style of map that I'm making. I may try to add it again later and maybe simplify it, but for now I need to make sure I have room in the WAC.
Speaking of making room, I discovered something in the WAC that I was previously unaware of. I'm curious to see if anyone else has used these before as I don't think I've ever seen them in another map... in addition to the "then" logic, you can also use "enter" or "leave". Then = Script actions will keep firing on every read of the WAC as long as the conditions are true. Example: Text will repeat on screen once every second (every time the game reads the wac) for as long as the player is in area trigger 1. Code:
If area(1) then Text("Area 1") endif Example: Text will display once when player is in area 1, then will display again if player comes back into the area again (left area and came back). Code:
If area(1) enter Text("Area 1") endif Leave = Script actions will fire when the conditions have been met and are no longer true. Example: Text will display if the player leaves the area after having walked into it. only triggers when the conditions are false after being true. Code:
If area(1) leave Text("Area 1") endif Example: Several items in my map will display text when the player is near them, which I didn't want the text to keep repeating when the player was near the object, but I also wanted it to display every time the player was near it, so I couldn't use "Never()". So what I did is used a variable (v7) to break the loop, then reset the variable. like this.. Code:
if ssnnearssn(player, 40, 4) and false(v7) then set(v7, 1) //breaks loop Text("Use this computer to buy repair parts") endif if chain(1) and not ssnnearssn(player, 40, 4) then set(v7, 0) endif Code:
if ssnnearssn(player, 40, 4) enter Text("use this computer to buy repair parts") endif |
#22
|
||
|
I've never heard of the 'enter' or 'leave' (I guess they're called) logic gates. They sound immeasurably useful.
Excellent find, OM! Something I always wished was possible as a trigger, and you might know if this exists, is when Group X is not outside of area Y. As in, if all members of Group X are in area Y. 'Cause I've seen a lot of coop maps that end when a player is in the area trigger around the extract vehicle, and I always thought it'd be better to trigger the mission end when all the players (all players, on both teams, in an MP map are in group 1, by the way) are in the area trigger, you know? Or, 'If group 1 is not outside of Area "Win."' Ever seen something like that?
__________________
////////////////////<- SIGNATURE STARTS ->\\\\\\\\\\\\\\\\\\\\\ The NSO Deadline Mod at NovaHQ.net: /////////////////////<- SIGNATURE ENDS ->\\\\\\\\\\\\\\\\\\\\\\
|
#23
|
|||
|
Quote:
I played around with other possible ways by using a variable and the "humans" variable. The idea was to set up a trigger that would increase v1 when a player steps into an area, and decrease it when they step out. So v1 should reflect the number of players in an area. Then you can just say "If eq(v1, humans) then" and either win the game or whatever. Problem is that the ssn triggers only seem to work on the host side, even when using ploop. so v1 will increase to 1 if the host is in the area, and should increase each time another player walks into the area. Then when v1 is = humans (num of players) then win the game. But it doesn't work on the client side. if you can figure out a trigger that will trigger when any player has met the condition, then this might work. I'm not too familiar with multiplayer and how these scripts work with clients tho. |
#24
|
||
|
Well, I imagine setting up a large area trigger north of the extraction point, a large area trigger south of the extraction point, and wide area triggers west and east of the extraction point, but still overlapping the northern and southern areas a bit, activating the 'Designated Mission Area' checkbox on all of them, and making the win event 'if group 1 is not in mission area," then that'd probably work, but it requires four area triggers covering as much of the playing field and the terrain outside of it as possible, except for the extraction point in the middle, so that the only reasonable way to get out of the designiated mission area is the extraction point. I just thought if the game had a hidden 'if group X is not outside of area y,' or just plain old, 'if all of group X in within area Y, that would streamline such a win event, and make worrying about how far some players might go yet still consider the distance a 'reasonable' way out of the mission area unneccesary.
I think the largest dimension an area trigger can have on a side is [32767][65535], and beyond that length, the area trigger would overlap itself, an idea which sits in my mind like the concept of negative molecular vibration, or dividing by zero. Cthuloid math, if you will. I write the weirdest stuff at 0400 hours.
__________________
////////////////////<- SIGNATURE STARTS ->\\\\\\\\\\\\\\\\\\\\\ The NSO Deadline Mod at NovaHQ.net: /////////////////////<- SIGNATURE ENDS ->\\\\\\\\\\\\\\\\\\\\\\
Last edited by Baldo_the_Don; 07-25-2024 at 12:20 PM. |
#25
|
|||
|
Quote:
wouldnt you also need to have a counter on that situation? something like this: Code:
if chain(1) then inc(v1) endif |
#26
|
|||
|
Quote:
This works fine on the server side. Player walks into the area, v1 increases to 1, step out and it goes back to 0, and you can repeat it as many times as you want. Code:
if ssnarea(player, 1) enter inc(v1) endif if chain(1) and not ssnarea(player, 1) enter dec(v1) endif if eq(v1, humans) then set(win, 1) endif if group 1 is not in area 1 and if group 1 is not in area 2 and if group 1 is not in area 3 and if group 1 is not in area 4 then Win, Blue This worked in LAN. The event was only triggered when all of blue team stepped into the box in the middle (out of all 4 boxes). I wasn't sure if it would work, because the trigger "if group in area x" triggers if at least 1 member of that group is in the area, so I figured that the inverse logic of this trigger would be the same. As in: "if group 1 is not in area x" would trigger if any member was not in the area. But that doesn't seem to be the case. it works great. Now as Baldo mentioned, you have to have large area triggers if you have a large map, and there is a limit to how big they can be, but remember your event will have the "AND" logic, so you can technically create at many triggers as you want to cover everything except your extraction zone. just make sure they all overlap a little bit. Now the weird thing this is that I tried this with designated mission area. When you tick this box on the area trigger, it is supposed to invert the area so that it triggers when you are outside of the area. I figured, "cool, I'll just set up 1 designated area around the extract zone, and then say If group 1 is not in area 1". But I can't seem to get designated area triggers to work. with "designated mission area" ticked, it still only triggers if you're inside the box. I thought this option worked in JO? Maybe I'm thinking of DFX? |
#27
|
||
|
My experience is that activating the 'Designated Mission Area' checkbox on several area triggers means that the game can treat them all essentially as one area trigger, so instead of a separate 'if group 1 is not in area X' event trigger for each of the large mission areas, a single 'if group 1 is not in the designated mission area,' will do.
At least I swear I remember pulling that off in a map once. As for inverted area triggers, if you travel in any direction far enough in a NL game, you will warp through to the other side of the map. In Comanche 4, I figured out that if a map had a single FARP, and you flew 32768m away from it and landed on any random spot on the terrain, you'd repair and rearm, so I used a trick in a map or two where I'd insert a FARP in a corner of the terrain 32km away from the play area, and you could touch down anywhere to rearm and repair. Basically, within about 4m and outside of 32768m of the center of the FARP marker was a health and ammo area trigger. I remember seeing warnings about area trigger marker placement at some point, something about making sure the marker with the higher SSN is northwest of, and at a higher Z than the other marker in a 3D area, and it may be that in older NL games, that placement could invert the area trigger, but I know for sure that doesn't make a difference in DFBHD. But an inverted area trigger would be useful trick for a mapper to have. Has anyone ever tried maybe giving an area trigger a negative number? Like 'if group 1 is in area trigger -2'?
__________________
////////////////////<- SIGNATURE STARTS ->\\\\\\\\\\\\\\\\\\\\\ The NSO Deadline Mod at NovaHQ.net: /////////////////////<- SIGNATURE ENDS ->\\\\\\\\\\\\\\\\\\\\\\
|
#28
|
|||
|
Quote:
I guess in most cases, instead of inverting the area, you just invert the logic in the event to say if not in area x. But I could have sworn that using "designated" meant that it would trigger if the player or AI was outside of the area. Maybe I have that mistaken. Not sure about the negative number, but I don't think it would work that way. would be interesting to try. |
#29
|
||
|
ok, this is mildly off-topic but does fit since it is a discussion about wac scripting.
this example is a NILE generated wac file nesting. the problem with this is, sometimes this type of nesting can break since the map has mission critical events that must frre for the map to end. Code:
if never() and (Never()ssndead(66600)) then //New Event if never() and (Previous()ssndead(66601)) then //New Event if never() and (Previous()ssndead(66767)) then //New Event if never() and (Previous()ssndead(66895)) then //New Event if never() and (Previous()ssndead(67011)) then //New Event win(1) endif endif endif endif endif what i have done in these situations, is to elimintate all of the nesting and just create a large single line event that requires all to happen for the map to end like this: if never() and ssndead(66600) and ssndead(66601) and ssndead(66767) and ssndead(66895) and ssndead(67011) then win(1) endif you still have mission criticals but there is less of a chance that it breaks and the map will end. note: this is a portion of a wac file for a map in my current server rotation. i used this example because the last time i played this map, we met all the requirements but the map didnt end even though the previous time i played the same map, it did in fact end so i will look to rework the wac file to make sure the map end next time. |
#30
|
||
|
Why would it write it like that? It seems a lot more logical to write it the way you have it.
|
#31
|
|||
|
Quote:
thats the way nile sets mission critical events. nile is also fond of using the double never() which might be the cause of some maps breaking. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|