PDA

View Full Version : Need help!



SOMEGUY789
August 20th, 2009, 06:30 PM
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

UnevenElefant5
August 21st, 2009, 12:03 PM
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.

SOMEGUY789
August 21st, 2009, 02:37 PM
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.

UnevenElefant5
August 21st, 2009, 03:24 PM
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.

p0lar_bear
August 21st, 2009, 04:12 PM
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.

;;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)
)
)
)

Also, welcome to the forums.

SOMEGUY789
August 21st, 2009, 09:15 PM
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

Me KS
August 22nd, 2009, 06:56 PM
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".


And how would i make it to where if you kill enough of your allies that they will betray you

That should happen by default.

SOMEGUY789
August 22nd, 2009, 09:14 PM
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.
Well whenever i kill many of them all they do is stand there?

p0lar_bear
August 23rd, 2009, 01:22 AM
Well whenever i kill many of them all they do is stand there?

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.

SOMEGUY789
August 23rd, 2009, 04:49 PM
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.


I have them set as default (as an ai encounter) and since were on my team by default i didn't use a script.

p0lar_bear
August 23rd, 2009, 04:53 PM
I have them set as default (as an ai encounter) and since were on my team by default i didn't use a script.

Change their team to something else appropriate and add the allegiance function to your script, see if that fixes it. I'm pretty sure broken allegiances are a team-to-team thing, and not unit-to-unit.

SOMEGUY789
August 24th, 2009, 12:43 AM
Change their team to something else appropriate and add the allegiance function to your script, see if that fixes it. I'm pretty sure broken allegiances are a team-to-team thing, and not unit-to-unit.


I already fixed that but what i want t know i how do you have a pelican drop of marines or a dropship dorp of aliens

p0lar_bear
August 24th, 2009, 07:43 AM
Bungie used a feature called "recorded animations" to re-play a dropship being driven in and then flying out, with the script unloading the dropship in-between those animations. This feature has been rendered useless in the public version of Sapien, as Sapien does not accept player control input; this is needed so the game has animations to record.

The only other ways I could think of would be to get an AI to pilot the dropship, and then use command lists to direct it, or to actually animate the dropship in 3dsmax.

SOMEGUY789
August 24th, 2009, 04:39 PM
Bungie used a feature called "recorded animations" to re-play a dropship being driven in and then flying out, with the script unloading the dropship in-between those animations. This feature has been rendered useless in the public version of Sapien, as Sapien does not accept player control input; this is needed so the game has animations to record.

The only other ways I could think of would be to get an AI to pilot the dropship, and then use command lists to direct it, or to actually animate the dropship in 3dsmax.


Is that why pelicans go crazy in maps i edit?

chrisk123999
August 24th, 2009, 11:06 PM
No, that's because HEK+ didn't rip them right.

SOMEGUY789
August 25th, 2009, 02:06 AM
No, that's because HEK+ didn't rip them right.


I tried ripping them so many times and from different maps and they still go crazy.

chrisk123999
August 25th, 2009, 12:30 PM
It just plain doesn't rip right. I don't know why the people who have ripped them right haven't released them in a pack or something.

Try the older HEK+.