A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »OMG... This is retarded. Please help!

Author Topic: OMG... This is retarded. Please help! (4 messages, Page 1 of 1)
Moderators: Dennis

MoooseGuy
Joined: Aug 10, 2008

I Approve This Message.


Posted: Oct 20, 2010 03:10 PM    Msg. 1 of 4       
Ok, so I have added a life counting system to my map, much like the one in solitude-firefight, but better. After doing this, my map starts up the first time without loading the life system properly, and it sets my lives to 1 for some reason (so, when I die, the out-of-lives cutscene begins).
The second time (and times after that) I load the map, the lives system loads properly, but then parts of my map startup script don't run. WTF is going on???

Here's a video:
http://www.youtube.com/watch?v=25O1V7A27qg

Thanks guys.


EDIT: If anyone wants to see the scripts, PM or Xfire me.
Edited by MoooseGuy on Oct 20, 2010 at 03:11 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Oct 20, 2010 06:18 PM    Msg. 2 of 4       
Send me the script. Just the portion for the lives, don't need to see all the rest.

Who wrote these? The formatting is making me sad :[

One thing. If the player has deathless player on, then it would be easy for you to just use:

(sleep_until (= (unit_get_health player) 0) 15)

rather than doing <= 0.01 as you are now.

Second, the death cutscene is extremely inefficient. For every second, you're continuously invoking the death cutscene command, which wouldn't play until lives = 0. What's an O(1) exercise suddenly becomes an O(n) exercise. Just make it a dormant, and use the (wake death_cutscene) command when you want to play it, when lives = 0. Speaking of which...

Your title display script is also extremely inefficient. It's a continuous which plays everything in order. What you have right now, is:

if lives = 5, then display the title, and sleep until lives = 4. Then check again, and see if lives = 4. If yes, display the title. Again, an O(n) exercise becomes O(n^2), because you have to check it twice.

What you should do instead:
(script continuous lives
(if
(>= lives 0)
(begin
(if
(= lives 11)
(cinematic_set_title livesmax)
)
(if
(= lives 10)
(cinematic_set_title lives9)
)
(if
(= lives 9)
(cinematic_set_title lives8)
)
(if
(= lives 8)
(cinematic_set_title lives7)
)
(if
(= lives 7)
(cinematic_set_title lives6)
)
(if
(= lives 6)
(cinematic_set_title lives5)
)
(if
(= lives 5)
(cinematic_set_title lives4)
)
(if
(= lives 4)
(cinematic_set_title lives3)
)
(if
(= lives 3)
(cinematic_set_title lives2)
)
(if
(= lives 2)
(cinematic_set_title lives1)
)
(if
(= lives 1)
(cinematic_set_title lives0)
)
)
(wake death_cutscene)
)
)


Once you finish adding in this optimization code, one of the prerequisites for it to run is that lives >= 0, and the first cutscene title would be displayed by lives = 11. Your old script would check that lives = 11 as well. However, a quick scroll to the top of the script reveals that lives = 10. Change that to 11, and you're set.

List of things to do:

  • Use my optimization script

  • At the very beginning of the script, set (cheat_deathless_player true)

  • At the very top of the lives and cutscenes.hsc, set lives = 11

  • Change death_cutscene to a dormant script, and remove the check for whether no_lives = true.


Edited by Gamma927 on Oct 20, 2010 at 07:25 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Oct 20, 2010 08:40 PM    Msg. 3 of 4       
No worries. The original made my notepad freeze :|


MoooseGuy
Joined: Aug 10, 2008

I Approve This Message.


Posted: Oct 22, 2010 02:11 AM    Msg. 4 of 4       
Alright, I'll try this out when my computer starts working again.
Thanks for the help!
Oh, and btw, all the ugly code was hand-done by me, that's why it's so ugly. XD
Edited by MoooseGuy on Oct 22, 2010 at 02:11 AM

 

 
Previous Older Thread    Next newer Thread







Time: Sat January 21, 2023 1:50 AM 297 ms.
A Halo Maps Website