Results 1 to 7 of 7

Thread: Need some help scripting.

  1. #1
    ... 117's Avatar
    Join Date
    Apr 2009
    Location
    Hawthorn Woods, IL
    Posts
    82

    Question Need some help scripting.

    Right, so basically, I'm working on a map, and I want to use some AI as a way to keep people from running to the outer bounds of the map. Problem is, the AI I'm using is supposed to work with trigger volumes, which need scripting to work; I don't understand Halo's scripting language very well, and what I have done has basically not worked. If someone could point out what I've done wrong in these scripts or fix them, that would help a lot.

    Code:
    (script continuous noescape)
    (sleep_until (volume_test_objects map_exterior_1 (players))15)
    (ai_try_to_fight_player sentinels)
    (ai_allegiance_broken "player" "sentinel")
    (ai_allegiance_broken "human" "sentinel")
    Code:
    (script continuous noescape2)
    (sleep_until (volume_test_objects map_exterior_2 (players))15)
    (ai_try_to_fight_player sentinels)
    (ai_allegiance_broken "player" "sentinel")
    (ai_allegiance_broken "human" "sentinel")
    Code:
    (script continuous noescape3)
    (sleep_until (volume_test_objects map_exterior_3 (players))15)
    (ai_try_to_fight_player sentinels)
    (ai_allegiance_broken "player" "sentinel")
    (ai_allegiance_broken "human" "sentinel")
    Code:
    (script continuous noescape4)
    (sleep_until (volume_test_objects map_exterior_4 (players))15)
    (ai_try_to_fight_player sentinels)
    (ai_allegiance_broken "player" "sentinel")
    (ai_allegiance_broken "human" "sentinel")
    Code:
    (script continuous noescapeceiling)
    (sleep_until (volume_test_objects map_ceiling (players))15)
    (ai_try_to_fight_player sentinels)
    (ai_allegiance_broken "player" "sentinel")
    (ai_allegiance_broken "human" "sentinel")
    Code:
    (script continuous returntomap)
    (sleep_until (volume_test_objects map_interior (players))15)
    (ai_try_to_fight_nothing sentinels)
    (ai_allegiance "player" "sentinel")
    (ai_allegiance "human" "sentinel")
    Code:
    (script continuous icanhascheezburger)
    (sleep_until (volume_test_objects cheezburger (players))15)
    (sound_impulse_start sound\dialog\grunt\scripted\grunty_thirst none 1)
    (ai_place roflgrunt)
    (vehicle_load_magic roflgrunt "W-driver" roflhog)
    (sleep_until (= (ai_living_count roflgrunt) 0) 15)
    (sound_impulse_start sound\dialog\multiplayer1\warthog none 1)
    (If you can't tell, this "icanhascheezburger" code is something I was trying to get to work as well, just for fun.)

    Here's the debug code:


    Code:
    04.05.09 18:49:10  Sain   CE 01.00.00.0609 ----------------------------------------------
    04.05.09 18:49:10  reference function: _write_to_error_file
    04.05.09 18:49:10  reference address: 401b13
    04.05.09 18:49:10  Couldn't read map file './sapienbeta.map'
    04.05.09 18:49:10  CreateDevice succeeded with refresh rate = 0
    04.05.09 18:49:11  Increasing sound decompression buffer size to 1048576 bytes
    04.05.09 18:49:12  the meter definition ui\hud\cyborg shield does not specify a stencil bitmap group.
    04.05.09 18:49:12  the meter definition ui\hud\cyborg body does not specify a stencil bitmap group.
    04.05.09 18:49:12  recompiling scripts after scenarios were merged.
    04.05.09 18:49:12  i expected (script <type> <name> <expression(s)>): (script continuous noescapeceiling)
    
    04.05.09 18:49:12  i expected (script <type> <name> <expression(s)>): (script continuous noescape)
    
    04.05.09 18:49:12  i expected (script <type> <name> <expression(s)>): (script continuous noescape2)
    
    04.05.09 18:49:12  i expected (script <type> <name> <expression(s)>): (script continuous noescape3)
    
    04.05.09 18:49:12  i expected (script <type> <name> <expression(s)>): (script continuous noescape)
    
    04.05.09 18:49:12  i expected (script <type> <name> <expression(s)>): (script continuous icanhascheezburger)
    
    04.05.09 18:49:12  i expected (script <type> <name> <expression(s)>): (script continuous returntomap)
    
    04.05.09 18:49:12  local player 0, weapon (0x0), deleted unexpectedly
    04.05.09 18:49:21  [ceiling line 1] i expected (script <type> <name> <expression(s)>): (script continuous noescapeceiling)
    
    04.05.09 18:49:21  [escapeattempt line 1] i expected (script <type> <name> <expression(s)>): (script continuous noescape)
    
    04.05.09 18:49:21  [escapeattempt2 line 1] i expected (script <type> <name> <expression(s)>): (script continuous noescape2)
    
    04.05.09 18:49:21  [escapeattempt3 line 1] i expected (script <type> <name> <expression(s)>): (script continuous noescape3)
    
    04.05.09 18:49:21  [escapeattempt4 line 1] i expected (script <type> <name> <expression(s)>): (script continuous noescape4)
    
    04.05.09 18:49:21  [icanhascheezburger line 1] i expected (script <type> <name> <expression(s)>): (script continuous icanhascheezburger)
    
    04.05.09 18:49:21  [return line 1] i expected (script <type> <name> <expression(s)>): (script continuous returntomap)
    
    04.05.09 18:49:21  recompiling scripts after scenarios were merged.
    04.05.09 18:49:21  i expected (script <type> <name> <expression(s)>): (script continuous noescapeceiling)
    
    04.05.09 18:49:21  i expected (script <type> <name> <expression(s)>): (script continuous noescape)
    
    04.05.09 18:49:21  i expected (script <type> <name> <expression(s)>): (script continuous noescape2)
    
    04.05.09 18:49:21  i expected (script <type> <name> <expression(s)>): (script continuous noescape3)
    
    04.05.09 18:49:21  i expected (script <type> <name> <expression(s)>): (script continuous noescape4)
    
    04.05.09 18:49:21  i expected (script <type> <name> <expression(s)>): (script continuous icanhascheezburger)
    
    04.05.09 18:49:21  i expected (script <type> <name> <expression(s)>): (script continuous returntomap)
    Also, this is for a multiplayer map. (Yes, I know the NPCs won't sync over the internet normally. I saw a tutorial on Halomods that showed how to do some swaps and stuff in HHT to get them to sync. Aside from that, I don't entriely care if they sync or not, as long as they kill things trying to leave, basically.)
    Reply With Quote

  2. #2
    Sarcastic Bitch
    Join Date
    Sep 2006
    Posts
    811

    Re: Need some help scripting.

    Your script syntax is incorrect. Here is an example of a correct script.

    Code:
    (script static unit player0
    (unit (list_get (players) 0))
    )
    Remove the parenthesis that is at the end of the script name in all of your scripts, and place it at the end of the script.
    Reply With Quote

  3. #3
    ... 117's Avatar
    Join Date
    Apr 2009
    Location
    Hawthorn Woods, IL
    Posts
    82

    Re: Need some help scripting.

    I've done that, but I'm still getting errors:
    Code:
    04.05.09 21:11:53  [ceiling line 1] i expected (script <type> <name> <expression(s)>): (script continuous noescapeceiling)
    
    04.05.09 21:11:53  [escapeattempt line 1] i expected (script <type> <name> <expression(s)>): (script continuous noescape)
    
    04.05.09 21:11:53  [escapeattempt2 line 1] i expected (script <type> <name> <expression(s)>): (script continuous noescape2)
    
    04.05.09 21:11:53  [escapeattempt3 line 1] i expected (script <type> <name> <expression(s)>): (script continuous noescape3)
    
    04.05.09 21:11:53  [escapeattempt4 line 1] i expected (script <type> <name> <expression(s)>): (script continuous noescape4)
    
    04.05.09 21:11:53  [icanhascheezburger line 1] i expected (script <type> <name> <expression(s)>): (script continuous icanhascheezburger)
    
    04.05.09 21:11:53  [return line 1] i expected (script <type> <name> <expression(s)>): (script continuous returntomap)
    
    04.05.09 21:11:53  recompiling scripts after scenarios were merged.
    04.05.09 21:11:53  i expected (script <type> <name> <expression(s)>): (script continuous noescapeceiling)
    
    04.05.09 21:11:53  i expected (script <type> <name> <expression(s)>): (script continuous noescape)
    
    04.05.09 21:11:53  i expected (script <type> <name> <expression(s)>): (script continuous noescape2)
    
    04.05.09 21:11:53  i expected (script <type> <name> <expression(s)>): (script continuous noescape3)
    
    04.05.09 21:11:53  i expected (script <type> <name> <expression(s)>): (script continuous noescape4)
    
    04.05.09 21:11:53  i expected (script <type> <name> <expression(s)>): (script continuous icanhascheezburger)
    
    04.05.09 21:11:53  i expected (script <type> <name> <expression(s)>): (script continuous returntomap)
    Reply With Quote

  4. #4
    Senior Membe Syuusuke's Avatar
    Join Date
    Sep 2006
    Location
    Location
    Posts
    3,868

    Re: Need some help scripting.

    You're missing elements in your lines it seems?

    (script <type> <name> <expression(s)>): (script continuous returntomap <expression(s)>)

    or is that last bit optional...?
    Reply With Quote

  5. #5
    ... 117's Avatar
    Join Date
    Apr 2009
    Location
    Hawthorn Woods, IL
    Posts
    82

    Re: Need some help scripting.

    I'm not sure. Polar's trigger volume tut uses the same kind of line, I don't see why it wouldn't work with a different name for the trigger.

    Polar's:


    Code:
    (script startup h4xmb
    (sleep_until (volume_test_objects trig_1 (players))15) ; Pauses script execution, and checks every 1/2 second to see if a player walks into the trigger “trig_1².
    (ai_place encount_1) ; Places the ai encounter “encount_1²
    (sleep_until (= (ai_living_count encount_1) 0) 15) ; Pauses script execution, and checks every 1/2 second to see if the encounter “encount_1² has been totally wiped out.
    (game_save) ; Checkpoint… done.
    (sound_impulse_start sound\dialog\multiplayer1\killtacular none 1) ; Killtacular!
    )
    Mine:

    Code:
    (script continuous noescapeceiling
    (sleep_until (volume_test_objects map_ceiling (players))15)
    (ai_try_to_fight_player sentinels)
    (ai_allegiance_broken "player" "sentinel")
    (ai_allegiance_broken "human" "sentinel")
    )
    I don't get why it's asking for more stuff, considering Polar's is supposed to work just fine with the delay to wait for the trigger to be triggered... and the AI encounter placement shouldn't make a difference.
    Reply With Quote

  6. #6
    Back for the Russian Halo p0lar_bear's Avatar
    Join Date
    Sep 2006
    Location
    Connecticut
    Posts
    5,572

    Re: Need some help scripting.

    Your latest errors still tell us that you did NOT edit the scripts and save them like we said.

    Double check your script files, make sure you saved them after editing them, then post them here.
    Reply With Quote

  7. #7
    ... 117's Avatar
    Join Date
    Apr 2009
    Location
    Hawthorn Woods, IL
    Posts
    82

    Re: Need some help scripting.

    I just figured out what I was doing wrong. It was just because I was editing files under tags, not data. Figures that I'd do something like that. lol
    Reply With Quote

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •