I made a scenario using the a10 bsp's and i wanted to make it to were you can go to one bsp the go back to the other but whenever you go to one bsp you cna't go back to the previous one
Printable View
I made a scenario using the a10 bsp's and i wanted to make it to were you can go to one bsp the go back to the other but whenever you go to one bsp you cna't go back to the previous one
It's done through trigger volumes and scripting.
So, at the end of BSP 1, place a trigger volume, let's say you named it "end" the script would look like this:
(sleep_until (volume_test_objects end (players)) 15)
(switch_bsp 1)
Because, the first bsp is 0, second is 1, etc.
Then, if you wanted the player to go back, you place a trigger volume at the beginning of BSP 2, name it "beginning" and then put this script:
(sleep_until (volume_test_objects beginning (players)) 15)
(switch_bsp 0)
I haven't tested that, but it should work.
I tried that and he activates the secondscript first for some reason.
thn i trie making thre second script drmant and wake it when the first script activates but that didn't work either.
Oh, crap I completely didn't think of that.
You could do it with variables maybe, it'd be something like, if variable X = 1, then wake the dormant script. And X would be controlled by whether or not the player has entered the trigger volume. Look at Gamma927's variable scripting tutorial on hce.halomaps.org for more info.
This script assumes you have two scenario_structure_bsp tags defined in your scenario, and two trigger volumes named "vol1" and "vol2". vol1 is placed at the "end" of the first BSP, and vol2 should actually be placed "before" vol1. This way, a player who would trip vol1 needs to walk through vol2 first, and vice-versa.
Also, welcome to the forums.Code:;;Variables
(global short currentBSP 0)
;;Scripts
(script continuous switchbsp
;;Changing from BSP 0 to BSP 1.
(if (and (volume_test_objects vol1 (players)) (= currentBSP 0))
(begin
(switch_bsp 1)
(set currentBSP 1)
)
)
;;Changing from BSP 1 to BSP 0
(if (and (volume_test_objects vol2 (players)) (= currentBSP 1))
(begin
(switch_bsp 0)
(set currentBSP 0)
)
)
)
Thanks and i got it to work now:woop:
And how would i make it to where if you kill enough of your allies that they will betray you
For future reference, if you want a spot to go back and forth through BSPs, you don't need any scripts.
Just name the trigger volumes using this syntax and the game automatically switches BSPs:
bspx,y
Where:
x = BSP number you need to be in to trigger the switch
y = BSP number you want to switch to
So, if I want a trigger volume that activates in BSP index 0 that switches to BSP index 1, then this is what I would name the volume:
bsp0,1
As for the setup in this case, you would use the same setup polar_bear described. Except, you would rename "vol1" to "bsp0,1" and "vol2" to "bsp1,0".
That should happen by default.
Did you set up an AI encounter and squad, or did you just put place bipeds?
If you did, did you make sure that the "blind," "deaf," and "braindead" flags for the encounter are not checked?
Is the team of your encounter set to player, or something else? I'm fairly sure (not 100%, haven't tried it) that the encounter needs to be a team other than player (human, covenant, flood, sentinel), and to ally them you need to have (ai_allegiance player <team 2>) in your script.