Welcome to Open Carnage

A resource for Halo 1 modding and tech, with unique means of rewarding individual content creation and support. Have a wander to see why we're worth the time! EST. 2012

Down Under

Death Barriers

I successfully added one death barrier to map but I have (2) death barriers that I need to configure. Scenario file says that there already exists a variable for [plr 0]

 

This is the format I have for one of the barriers:

 

(global short plr 0)

(script continuous kill_volume
  (if (volume_test_object "death2" (list_get (players) plr))
    (unit_kill (unit (list_get (players) plr)))
  )
  (if (= plr 15)
    (set plr 0)
    (set plr (+ plr 1))
  )
)

 

I also have a "death1" I need to add but running into a roadblock: Question is how I can incorporate both in this setup, or do I need a separate script?

 

Thanks!

Share this post


Link to post
Share on other sites

Members of Open Carnage never see off-site ads.

Does this not work?

 

(global short plr 0)

(script continuous kill_volume
  (if (volume_test_object "death1" (list_get (players) plr))
    (unit_kill (unit (list_get (players) plr)))
  )
  (if (volume_test_object "death2" (list_get (players) plr))
    (unit_kill (unit (list_get (players) plr)))
  )
  (if (= plr 15)
    (set plr 0)
    (set plr (+ plr 1))
  )
)

 

I don't know a whole lot about Halo's little blam script thing, but it seems reasonable that this would work.

Tucker933 likes this

Share this post


Link to post
Share on other sites

This would also probably work:

 

(global short plr 0)
(script continuous kill_volume
  (if (or (volume_test_object "death1" (list_get (players) plr) (volume_test_object "death2" (list_get (players) plr)))
    (unit_kill (unit (list_get (players) plr)))
  )
  (if (= plr 15)
    (set plr 0)
    (set plr (+ plr 1))
  )
)


dynamic.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.