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 General Discussion »A few scripting problems

Author Topic: A few scripting problems (26 messages, Page 1 of 1)
Moderators: Dennis

cybykillers
Joined: Feb 12, 2009

Tanky likes to eat babies for lunch >:)


Posted: Sep 1, 2009 06:19 AM    Msg. 1 of 26       
#1: How do i script the game to end without having the player press esc and quiting?
#2: Does (ai_follow_target_players h1) make them follow the encounter h1 or does it make the encounter h1 follow the player
I'll post new problems here later when i have them
Edited by cybykillers on Sep 1, 2009 at 06:38 AM
Edited by cybykillers on Sep 1, 2009 at 10:16 AM
Edited by cybykillers on Sep 1, 2009 at 07:56 PM


sierra117
Joined: Jan 10, 2008

If sex is good exercise, why are there fat sluts?


Posted: Sep 1, 2009 06:30 AM    Msg. 2 of 26       
Quote: (script startup wait_til_dead
(sleep_until (= (ai_living_count [encounter] ) 0 ) 1 )
(game_save ) )

[encounter] is replaced with the encounter and the "0" means that there it "0" health altogether in the encounter. so if i wanted to wait til half the encounter is dead then i would do this:

Quote: (script startup wait_til_half_dead
(sleep_until (= (ai_living_fraction [encounter] ) 0.5 ) 1 )
(game_save ) )


notice that i replace the "ai_living_count" command with the "ai_living_fraction" command.

and the "=" is the condition that is to be met. So nothing will happen until the 0.5 is met exactly. If you wanted to wait till there was less that 0.5 a any value lower that that, you would replace "=" with a "" means that it will wait til more than 0.5 of the encounter's health is still active.


cybykillers
Joined: Feb 12, 2009

Tanky likes to eat babies for lunch >:)


Posted: Sep 1, 2009 07:08 AM    Msg. 3 of 26       
thanks. i'll try it out later.

But can anyone tell me if there is any problem with this script. i expect there will be a lot of mistakes since this is my first script. so tell me where i went wrong.

(script startup Assault_On_Bloodgulch
(begin
(ai_place c1
(ai_command_list c1 c1)
(ai_place h1)
(script startup cutscene
(player_enable_input 0)
(camera_control 1)
(cinematic_start)
(cinematic_show_letterbox 1)
(sleep 60)
(cinematic_start)
(cinematic_show_letterbox 1)
(camera_set 1 200)
(sleep 200)
(camera_set 2 200)
(sleep 90)
(camera_set 3 200)
(sleep 90)
(camera_set 4 200)
(sleep 90)
(camera_set 5 200)
(sleep 90)
(camera_set 6 200)
(sleep 90)
(camera_set 7 200)
(sleep 90)
(camera_set 8 200)
(sleep 120)
(camera_set 9 200)
(sleep 90)
(camera_control 0)
(cinematic_stop)
)
(

(script startup Assault_On_Bloodgulch_2
(begin
(hud_set_objective_text Rendezvous with red team on the other side of the baricade)
(sleep 15)
(ai_follow_target_players h1)
)
(

(script startup Assault_On_Bloodgulch_3
(begin
(sleep_until (volume_test_objects 1 (players))15)
(ai_place c2)
(game_save_no_timeout)
)
(

(script startup Assault_On_Bloodgulch_4
(begin
(sleep_until (volume_test_objects 2 (players))15)
(ai_place h2)
(ai_place h3)
(object_create warthog)
(game_save_no_timeout)
(sleep_until (volume_test_objects 3 (players))15)
(hud_set_objective_text Follow your allies and attack the Covenant Base
(ai_command_list h2 h2)
(ai_command_list h3 c1)
)
(

(script startup Assault_On_Bloodgulch_5
(begin
(sleep_until (volume_test_objects 4 (players))15)
(hud_set_objective_text Kill all the covenant in the base!!
(game_save_totally_unsafe)
(sleep_until (=(ai_living_count c1)0)1)
(hud_set_objective_text Enter the teleporter
(sleep_until (volume_test_objects 5 (players))15)
(sleep 5)
(script startup cutscene
(player_enable_input 0)
(camera_control 1)
(cinematic_start)
(cinematic_show_letterbox 1)
(sleep 60)
(cinematic_start)
(cinematic_show_letterbox 1)
(camera_set 10 200)
(sleep 200)
(camera_set 11 200)
(sleep 90)
(camera_set 12 200)
(sleep 90)
(camera_control 0)
(cinematic_stop)
)
(


Legend: c1= command list/ encounter
c2= command list/encounter
h1= command list/encounter
h2=command list/encounter
h3=encounter
Edited by cybykillers on Sep 1, 2009 at 07:10 AM


UnevenElefant5
Joined: May 3, 2008

its been fun yall, i'll never forget this site :')


Posted: Sep 1, 2009 09:54 AM    Msg. 4 of 26       
You're ending your scripts with (
and they should be )
like this:

(script startup Assault_On_Bloodgulch
(begin
(ai_place c1
(ai_command_list c1 c1)
(ai_place h1)
(script startup cutscene
(player_enable_input 0)
(camera_control 1)
(cinematic_start)
(cinematic_show_letterbox 1)
(sleep 60)
(cinematic_start)
(cinematic_show_letterbox 1)
(camera_set 1 200)
(sleep 200)
(camera_set 2 200)
(sleep 90)
(camera_set 3 200)
(sleep 90)
(camera_set 4 200)
(sleep 90)
(camera_set 5 200)
(sleep 90)
(camera_set 6 200)
(sleep 90)
(camera_set 7 200)
(sleep 90)
(camera_set 8 200)
(sleep 120)
(camera_set 9 200)
(sleep 90)
(camera_control 0)
(cinematic_stop)
)
)

(script startup Assault_On_Bloodgulch_2
(begin
(hud_set_objective_text Rendezvous with red team on the other side of the baricade)
(sleep 15)
(ai_follow_target_players h1)
)
)

(script startup Assault_On_Bloodgulch_3
(begin
(sleep_until (volume_test_objects 1 (players))15)
(ai_place c2)
(game_save_no_timeout)
)
)

(script startup Assault_On_Bloodgulch_4
(begin
(sleep_until (volume_test_objects 2 (players))15)
(ai_place h2)
(ai_place h3)
(object_create warthog)
(game_save_no_timeout)
(sleep_until (volume_test_objects 3 (players))15)
(hud_set_objective_text Follow your allies and attack the Covenant Base
(ai_command_list h2 h2)
(ai_command_list h3 c1)
)
)

(script startup Assault_On_Bloodgulch_5
(begin
(sleep_until (volume_test_objects 4 (players))15)
(hud_set_objective_text Kill all the covenant in the base!!
(game_save_totally_unsafe)
(sleep_until (=(ai_living_count c1)0)1)
(hud_set_objective_text Enter the teleporter
(sleep_until (volume_test_objects 5 (players))15)
(sleep 5)
(script startup cutscene
(player_enable_input 0)
(camera_control 1)
(cinematic_start)
(cinematic_show_letterbox 1)
(sleep 60)
(cinematic_start)
(cinematic_show_letterbox 1)
(camera_set 10 200)
(sleep 200)
(camera_set 11 200)
(sleep 90)
(camera_set 12 200)
(sleep 90)
(camera_control 0)
(cinematic_stop)
)
)

Edited by UnevenElefant5 on Sep 1, 2009 at 10:17 AM


cybykillers
Joined: Feb 12, 2009

Tanky likes to eat babies for lunch >:)


Posted: Sep 1, 2009 10:16 AM    Msg. 5 of 26       
so is there anything else wrong? and thanks for the suggestion. i'll fix them later.


UnevenElefant5
Joined: May 3, 2008

its been fun yall, i'll never forget this site :')


Posted: Sep 1, 2009 10:18 AM    Msg. 6 of 26       
Not that I can see, but then again, I'm not that great at scripting.


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Sep 1, 2009 06:31 PM    Msg. 7 of 26       
Quote: --- Original message by: UnevenElefant5
(script startup Assault_On_Bloodgulch
(begin
(ai_place c1)
(ai_command_list c1 c1)
(ai_place h1)
(player_enable_input 0)
(camera_control 1)
(sleep 60)
(cinematic_start)
(cinematic_show_letterbox 1)
(camera_set 1 200)
(sleep 200)
(camera_set 2 200)
(sleep 90)
(camera_set 3 200)
(sleep 90)
(camera_set 4 200)
(sleep 90)
(camera_set 5 200)
(sleep 90)
(camera_set 6 200)
(sleep 90)
(camera_set 7 200)
(sleep 90)
(camera_set 8 200)
(sleep 120)
(camera_set 9 200)
(sleep 90)
(camera_control 0)
(cinematic_stop)
)
)

(script startup Assault_On_Bloodgulch_2
(hud_set_objective_text SEE COMMENTS FOR DETAILS)
(sleep 15)
(ai_follow_target_players h1)
)

(script startup Assault_On_Bloodgulch_3
(sleep_until (volume_test_objects 1 (players)) 15)
(ai_place c2)
(game_save_no_timeout)
)

(script startup Assault_On_Bloodgulch_4
(sleep_until (volume_test_objects 2 (players)) 15)
(ai_place h2)
(ai_place h3)
(object_create warthog)
(game_save_no_timeout)
(sleep_until (volume_test_objects 3 (players))15)
(hud_set_objective_text SEE COMMENTS FOR DETAILS])
(ai_command_list h2 h2)
(ai_command_list h3 c1)
)

(script startup Assault_On_Bloodgulch_5
(sleep_until (volume_test_objects 4 (players))15)
(hud_set_objective_text SEE COMMENTS FOR DETAILS)
(game_save_totally_unsafe)
(sleep_until (= (ai_living_count c1) 0) 1)
(hud_set_objective_text SEE COMMENTS FOR DETAILS)
(sleep_until (volume_test_objects 5 (players)) 15)
(sleep 5)
(player_enable_input 0)
(camera_control 1)
(sleep 60)
(cinematic_start)
(cinematic_show_letterbox 1)
(camera_set 10 200)
(sleep 200)
(camera_set 11 200)
(sleep 90)
(camera_set 12 200)
(sleep 90)
(camera_control 0)
(cinematic_stop)
)

Edited by UnevenElefant5 on Sep 1, 2009 at 10:17 AM


You have so many redundancies, it's not even funny. List of wrong things

-Cutscene scripts. Don't add (script startup cutscene UNLESS you're starting a brand new script. You threw it in there like a command.
-Closing parentheses. Every command MUST have a closed parentheses, or the command will not function. You had a few (ai_place ai, but no ending ).
-The big one. hud_set_objective_text. From what I can see, you didn't compile any .hmt file at all. You can't just list the text. You have to type that into a text file, save as a .hmt using unicode encoding, compile it through tool, then add the reference name into the script. There's a tutorial on how to do that somewhere.
-begins. You're using begins at the end of every script. That will eventually cause problems for you, especially for cutscenes. I've taken all the begins out except for the very first script.

I may have forgotten something, as I'm only human, but those are the main basic errors.
Edited by Gamma927 on Sep 1, 2009 at 06:31 PM


cybykillers
Joined: Feb 12, 2009

Tanky likes to eat babies for lunch >:)


Posted: Sep 1, 2009 07:21 PM    Msg. 8 of 26       
thanks :D i'll fix them when i have the chance and hopefully, it will work.

Edit: one more question. the script command (ai_follow_target_players h1) makes the encounter h1 follow the player around right?
Edited by cybykillers on Sep 1, 2009 at 07:54 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Sep 1, 2009 08:46 PM    Msg. 9 of 26       
Only if you set up the firing position groups, empty squads, and migration correctly.


cybykillers
Joined: Feb 12, 2009

Tanky likes to eat babies for lunch >:)


Posted: Sep 1, 2009 10:33 PM    Msg. 10 of 26       
for the hud thing. im using tool++ instead of tool because i think its easier. what do i put in path?


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Sep 1, 2009 10:38 PM    Msg. 11 of 26       
I'm not sure whether tool++ compiles HUD messages. I always do it in tool.


cybykillers
Joined: Feb 12, 2009

Tanky likes to eat babies for lunch >:)


Posted: Sep 1, 2009 11:07 PM    Msg. 12 of 26       
can u tell me what to type in tool? i have it and i know how to use it.


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Sep 1, 2009 11:18 PM    Msg. 13 of 26       
tool hud-messages [DIRECTORY] [SCENARIO]

So something like this:

tool hud-messages levels\test\tutorial sp_test

A space between the directory and the scenario name.


cybykillers
Joined: Feb 12, 2009

Tanky likes to eat babies for lunch >:)


Posted: Sep 1, 2009 11:30 PM    Msg. 14 of 26       
thanks but i for some reason, when i type the command in sapien. ai_command_list c3 c1 it doesnt work. c3 is the encounter and c1 is the command list. but nothing happens when i type it. the ai is supposed to enter a vehicle but doesnt.

Edit: and for some reason, the script wont compile. i dont know where i went wrong. it just says "recompiling scripts after scenarios were merged. I expected a script or variable definition" what does that mean.
And i tried doing the hud messages on tool, i have no idea how to use it. so can anyone tell me what i put in tool++

Edited by cybykillers on Sep 1, 2009 at 11:49 PM
Edited by cybykillers on Sep 2, 2009 at 02:20 AM
Edited by cybykillers on Sep 2, 2009 at 02:31 AM


sierra117
Joined: Jan 10, 2008

If sex is good exercise, why are there fat sluts?


Posted: Sep 2, 2009 03:46 AM    Msg. 15 of 26       
1. does your command have any data in it? and is the radius set to the right distance? d you even have a vehicle for the ai to go into? and if you do; untick the "allow initiative" box. it makes them (if they want to which is usually right when they spawn) cancel the command list, and not run it.

2. post the last paragraph of the debug text. Sapien should of said which line that the problem is at. (all you have is a extra parenthesis.)

3. i dont use tool++ so go with what gamma said. and when you saved the "hud messages.hmt" file did you make sure that it had "unicode" encoding? you have to get these exactly right to get the desired effect.


cybykillers
Joined: Feb 12, 2009

Tanky likes to eat babies for lunch >:)


Posted: Sep 2, 2009 04:15 AM    Msg. 16 of 26       
what is tool supposed to say when i type the hud message command in it. cause all i'm getting is either errors or cannot read map file './toolbeta.map'

i typed

tool hud-messages levels\test\bloodgulch (my scenario name).scenario

did i do it right or wat?

o and i fixed the grunt problem


sierra117
Joined: Jan 10, 2008

If sex is good exercise, why are there fat sluts?


Posted: Sep 2, 2009 04:59 AM    Msg. 17 of 26       
eg. my scenario is name "hello"

Quote: tool hud-messages levels\hello hello


then it should display the messages after a few seconds.


cybykillers
Joined: Feb 12, 2009

Tanky likes to eat babies for lunch >:)


Posted: Sep 2, 2009 05:10 AM    Msg. 18 of 26       
it doesnt work. i tried tool hud-messages levels\bloodgulch Assault On Bloodgulch

but it doesnt work. i did wat u said or did i misunderstand you?
bloodgulch is the folder my scenario is in and Assault On Bloodgulch is the scenario. why wont it work
Edited by cybykillers on Sep 2, 2009 at 05:11 AM


sierra117
Joined: Jan 10, 2008

If sex is good exercise, why are there fat sluts?


Posted: Sep 2, 2009 05:56 AM    Msg. 19 of 26       
put quotes around the "assault on bloodgulch" because your scenario has spaces.


cybykillers
Joined: Feb 12, 2009

Tanky likes to eat babies for lunch >:)


Posted: Sep 2, 2009 06:04 AM    Msg. 20 of 26       
still doesnt work... tool hud-messages levels\bloodgulch "Assault On Bloodgulch"\\

WTF.... nvm i thought it was hud-messages. it was really hud_messages.

lol gamma

i got that fixed but for some reason the script still wont compile. heres the last paragraph of debug.txt

09.02.09 18:08:54 sapien pc 01.00.00.0609 ----------------------------------------------
09.02.09 18:08:54 reference function: _write_to_error_file
09.02.09 18:08:54 reference address: 401b13
09.02.09 18:08:54 Couldn't read map file './sapienbeta.map'
09.02.09 18:08:55 CreateDevice succeeded with refresh rate = 0
09.02.09 18:08:55 Increasing sound decompression buffer size to 1048576 bytes
09.02.09 18:08:58 recompiling scripts after scenarios were merged.
09.02.09 18:08:58 i expected a script or variable definition.: ?
09.02.09 18:08:59 local player 0, weapon (0x0), deleted unexpectedly
09.02.09 18:09:08 i expected a script or variable definition.: ?
09.02.09 18:09:08 recompiling scripts after scenarios were merged.
09.02.09 18:09:08 i expected a script or variable definition.: ?

Edited by cybykillers on Sep 2, 2009 at 06:05 AM
Edited by cybykillers on Sep 2, 2009 at 06:06 AM
Edited by cybykillers on Sep 2, 2009 at 06:11 AM


sierra117
Joined: Jan 10, 2008

If sex is good exercise, why are there fat sluts?


Posted: Sep 2, 2009 08:10 AM    Msg. 21 of 26       
ok im not sure why tool let you use hud_messages and i dont want to start a argument over it.
and for the debug; ive got the "i expected a script or variable definition" error before. but i have never got the weird character code before the question mark. So for that your guess is as good as mine. D:


cybykillers
Joined: Feb 12, 2009

Tanky likes to eat babies for lunch >:)


Posted: Sep 2, 2009 08:13 AM    Msg. 22 of 26       
eh its nothin. its just probably an error with the copy and paste. so how did u fix your script?


sierra117
Joined: Jan 10, 2008

If sex is good exercise, why are there fat sluts?


Posted: Sep 2, 2009 08:17 AM    Msg. 23 of 26       
i just got rid of my extra parenthesis (s)


cybykillers
Joined: Feb 12, 2009

Tanky likes to eat babies for lunch >:)


Posted: Sep 2, 2009 08:28 AM    Msg. 24 of 26       
but do i have extras? look at my script above. look at the one gamma quoted he helped me edit it
Edited by cybykillers on Sep 2, 2009 at 08:29 AM

wait let me see what i may have done wrong. in my script, i began like 4 scripts. and in sapien i got to AI. then scripts. and i create the 4 scripts and name them the scripts i said in my script. could tat be why?
Edited by cybykillers on Sep 2, 2009 at 09:02 AM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Sep 2, 2009 10:07 AM    Msg. 25 of 26       
Delete all the ones you created in Sapien.


cybykillers
Joined: Feb 12, 2009

Tanky likes to eat babies for lunch >:)


Posted: Sep 2, 2009 08:00 PM    Msg. 26 of 26       
i deleted the ones in sapien but i just keep getting the same error. take a look at my script again

(script startup Assault_On_Bloodgulch
(begin
(ai_place c1)
(object_create turret1)
(object_create turret2)
(ai_command_list c1 c1)
(ai_place h2)
(object_create warthog)
(ai_command_list h2 h3)
(ai_place h1)
(player_enable_input 0)
(camera_control 1)
(sleep 60)
(cinematic_start)
(cinematic_show_letterbox 1)
(camera_set 1 200)
(sleep 200)
(camera_set 2 200)
(sleep 90)
(camera_set 3 200)
(sleep 90)
(camera_set 4 200)
(sleep 90)
(camera_set 5 200)
(sleep 90)
(camera_set 6 200)
(sleep 90)
(camera_set 7 200)
(sleep 90)
(camera_set 8 200)
(sleep 120)
(camera_set 9 200)
(sleep 90)
(camera_control 0)
(cinematic_stop)
)
)

(script startup Assault_On_Bloodgulch_2
(hud_set_objective_text obj1)
(sleep 15)
(ai_follow_target_players h1)
)

(script startup Assault_On_Bloodgulch_3
(sleep_until (volume_test_objects 1 (players)) 15)
(ai_place c2)
(game_save_no_timeout)
)

(script startup Assault_On_Bloodgulch_4
(sleep_until (volume_test_objects 2 (players)) 15)
(ai_place h2)
(ai_place h3)
(game_save_no_timeout)
(sleep_until (volume_test_objects 3 (players))15)
(hud_set_objective_text obj2)
(ai_command_list h2 h2)
(ai_command_list h3 c1)
(ai_command_list h3 c1)
)

(script startup Assault_On_Bloodgulch_5
(sleep_until (volume_test_objects 4 (players))15)
(hud_set_objective_text obj3)
(game_save_totally_unsafe)
(sleep_until (= (ai_living_count c1) 0) 1)
(hud_set_objective_text obj4)
(sleep_until (volume_test_objects 5 (players)) 15)
(sleep 5)
(player_enable_input 0)
(camera_control 1)
(sleep 60)
(cinematic_start)
(cinematic_show_letterbox 1)
(camera_set 10 200)
(sleep 200)
(camera_set 11 200)
(sleep 90)
(camera_set 12 200)
(sleep 90)
(camera_control 0)
(cinematic_stop)
)


edit: o and ya. if i have like 2 scripts in my scripts folder. how do i choose which script i want to comile?
Edited by cybykillers on Sep 2, 2009 at 09:04 PM

edit: o ya. for some reason in sapien, it says i dont have a solo something.item collection. does anyone know where it is?
Edited by cybykillers on Sep 2, 2009 at 10:51 PM

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 7:12 AM 172 ms.
A Halo Maps Website